From: <sfr...@us...> - 2010-06-02 12:43:04
|
Revision: 704 http://treebase.svn.sourceforge.net/treebase/?rev=704&view=rev Author: sfrgpiel Date: 2010-06-02 12:42:58 +0000 (Wed, 02 Jun 2010) Log Message: ----------- This is the solution recommended by Rutger for fixing issue 2992022, which is an inability to view study 2164 Added Paths: ----------- trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/ trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/README.txt trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/fix_S2164.sql Added: trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/README.txt =================================================================== --- trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/README.txt (rev 0) +++ trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/README.txt 2010-06-02 12:42:58 UTC (rev 704) @@ -0,0 +1,36 @@ +To apply, run fix_S2164.sql + +-------- + +Hi all, + +I'm trying to fix issue 2992022, which was hypothesised to be a +character encoding problem. This is not the case, it has nothing to do +with UTF-8 handling. It's a database inconsistency: + +* in the person table, there's both an entry for "Balázs Tímea", +person_id=3971 and for "Tímea Balázs", person_id=5609 + +* in the latter record, first and last name are in the correct order, +but the author's email address is missing, and the author order index +is 5, on a three-author paper. In the former record, the first and +last name are switched around, but everything else is in the correct +order. It looks like the nullpointer exception is thrown because there +is no author 4 (see: +http://www.mycologia.org/cgi/content/abstract/101/2/247). + +* here's my suggested fix: correct the name order in record 3971, +purge record 5609 from person and from citation_author, i.e.: + +update person set firstname='Tímea', lastname='Balázs' where person_id=3971; +delete from citation_author where authors_person_id=5609; +delete from person where person_id=5609; + +On the test instance this fixes the exception, the citation is +serialised correctly. Can someone fix this on the production instance? +I re-assigned this bug to Bill, but whoever has access to the prod +server can run those SQL snippets and everything should be OK. + +Cheers, + +Rutger \ No newline at end of file Added: trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/fix_S2164.sql =================================================================== --- trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/fix_S2164.sql (rev 0) +++ trunk/treebase-core/db/cleaning/2010-06-02_fix_S2164/fix_S2164.sql 2010-06-02 12:42:58 UTC (rev 704) @@ -0,0 +1,13 @@ +-- beware that the inspection tool to apply these statements needs to be +-- utf-8 aware + +BEGIN WORK; + +UPDATE person SET firstname='Tímea', lastname='Balázs' WHERE person_id=3971; + +DELETE FROM citation_author WHERE authors_person_id=5609; + +DELETE FROM person WHERE person_id=5609; + +COMMIT; + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |