Bug 9520 - Update default LOC Z39.50 target
Summary: Update default LOC Z39.50 target
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Z39.50 / SRU / OpenSearch Servers (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bernardo Gonzalez Kriegel
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 9494
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-31 19:20 UTC by Bernardo Gonzalez Kriegel
Modified: 2014-05-26 21:04 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 9520 - Update default LOC Z39.50 target (1.13 KB, patch)
2013-01-31 19:25 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 9520 - Update default LOC Z39.50 target (1.20 KB, patch)
2013-02-01 13:39 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 9520 -[Revised] - Update default LOC Z39.50 target (1.42 KB, patch)
2013-02-28 14:33 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
Bug 9520 -[Revised] - Update default LOC Z39.50 target (1.34 KB, patch)
2013-02-28 14:50 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bernardo Gonzalez Kriegel 2013-01-31 19:20:31 UTC
Followup to Bug 9494
Comment 1 Bernardo Gonzalez Kriegel 2013-01-31 19:25:24 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2013-02-01 13:39:03 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2013-02-28 09:19:49 UTC
QA comment:

The query is not the good one, mysql raises a warning:
  Data truncated for column 'type' at row 4
type is an enum (cf kohastructure:  `type` enum('zed','opensearch') NOT NULL default 'zed')

Marked as Failed QA.
Comment 4 Bernardo Gonzalez Kriegel 2013-02-28 12:08:45 UTC
(In reply to comment #3)
> QA comment:
> 
> The query is not the good one, mysql raises a warning:
>   Data truncated for column 'type' at row 4
> type is an enum (cf kohastructure:  `type` enum('zed','opensearch') NOT NULL
> default 'zed')
> 
> Marked as Failed QA.

Sorry but.. did the comment applies to this bug?

bgkriegel@sentey:~/kohaclone$ mysql -uUUU -pPPP kohadev --verbose -e "UPDATE z3950servers SET host = 'lx2.loc.gov', port = 210, db = 'LCDB', type = 'USMARC', encoding = 'utf8' WHERE name = 'LIBRARY OF CONGRESS'"
--------------
UPDATE z3950servers SET host = 'lx2.loc.gov', port = 210, db = 'LCDB', type = 'USMARC', encoding = 'utf8' WHERE name = 'LIBRARY OF CONGRESS'
--------------

No warnings :)
Comment 5 Jonathan Druart 2013-02-28 12:34:28 UTC
(In reply to comment #4)

> Sorry but.. did the comment applies to this bug?

Yes!

mysql> show create table z3950servers;
[...]
  `type` enum('zed','opensearch') NOT NULL DEFAULT 'zed',
[...]

mysql> UPDATE z3950servers SET host = 'lx2.loc.gov', port = 210, db = 'LCDB', type = 'USMARC', encoding = 'utf8' WHERE name = 'LIBRARY OF CONGRESS';
Query OK, 0 rows affected, 1 warning (0.06 sec)
Rows matched: 1  Changed: 0  Warnings: 1

mysql> show warnings;
+---------+------+-------------------------------------------+
| Level   | Code | Message                                   |
+---------+------+-------------------------------------------+
| Warning | 1265 | Data truncated for column 'type' at row 4 |
+---------+------+-------------------------------------------+
1 row in set (0.00 sec)

mysql> select type from z3950servers where name='LIBRARY OF CONGRESS';
+------+
| type |
+------+
|      |
+------+
1 row in set (0.00 sec)
Comment 6 Jonathan Druart 2013-02-28 12:35:20 UTC
Bug 9494 does not update the type column.
Comment 7 Bernardo Gonzalez Kriegel 2013-02-28 14:33:32 UTC Comment hidden (obsolete)
Comment 8 Bernardo Gonzalez Kriegel 2013-02-28 14:39:39 UTC
(In reply to comment #6)
> Bug 9494 does not update the type column.
It doesn't need to. The correct column to update is 'syntax'.
I was fooled by the name. I'm sorry (again).
Comment 9 Jonathan Druart 2013-02-28 14:50:29 UTC
(In reply to comment #8)
> (In reply to comment #6)
> > Bug 9494 does not update the type column.
> It doesn't need to. The correct column to update is 'syntax'.
> I was fooled by the name. I'm sorry (again).

Don't worry, thanks for your quick revised patch!
Now it is good.

This patch updates the LOC z3950 server for current installations.

Marked as Passed QA.
Comment 10 Jonathan Druart 2013-02-28 14:50:46 UTC
Created attachment 15771 [details] [review]
Bug 9520 -[Revised] - Update default LOC Z39.50 target

This patch updates (if present) target settings
of Library of Congress Z39.50 server.

Revision: Was trying to update wrong column 'type',
now correct column 'syntax'.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Amended patch: add the SetVersion call
Comment 11 Jared Camins-Esakov 2013-03-02 17:12:37 UTC
This patch has been pushed to master.
Comment 12 Chris Cormack 2013-03-11 09:15:43 UTC
Pushed to 3.8.x and 3.10.x will be in 3.8.11 and 3.10.4