Ticket #716 (closed Bug)

Opened 3 years ago

Last modified 3 years ago

Updating daisyrepository SQL db to daisy 2.3-RC1 via daisy-2_2-to-2_3.sql fails during modification of the 'document_tasks' table

Reported by: matthias.bauer.drs@… Owned by: somebody
Priority: Minor Milestone:
Component: Installation Version: 2.3
Keywords: Cc:

Description

[jira2trac import : issue created on May 20, 2009 1:12:50 PM CEST http://issues.cocoondev.org/browse/DSY-716 ]

Updating the daisyrepository SQL db from daisy 2.2 to 2.3-RC1 via supplied sql file misc/daisy-2_2-to-2_3.sql fails during modification of the 'document_tasks' table. The error occurs, if there are javascript document tasks present in the table.

Error message:

| ...\daisy-2.3-RC1>mysql -u root -p -- daisyrepository < misc\daisy-2_2-to-2_3.sql
| Enter password:
| ERROR 1406 (22001) at line 7: Data too long for column 'action_type' at row 1

To Reproduce: Insert the following line into the document_tasks table and run misc\daisy-2_2-to-2_3.sql

| INSERT INTO document_tasks VALUES (95,'javascript',3,'2009-05-13 13:18:27','2009-05-13 13:18:29','F',,'Correct Field12 Names','var document = repository.getDocument(variantKey, true);\ndocument.setField(\'Field12\', \'abcdefg\');\ndocument.save();',NULL)

I've solved it for me by deleting the old document tasks before doing the update. Anyway, an improved sql script would be helpful.

Change History

comment:1 Changed 3 years ago by paul

  • Status changed from new to closed

[jira2trac import : comment created by karel on May 20, 2009 5:27:51 PM CEST]

Thanks for reporting

The upgrade script is messed up:

script (longtext) becomes action_type varchar(100) NOT NULL;
scriptlanguage (varchar) becomes action_parameters (longtext);

It should of course be

script -> action_parameters
scriptlanguage -> action_type

It should not be necessary to remove old tasks;

My mysql doesn't complain about the data truncation - I wonder what setting causes the difference in behaviour.

Fixed in r5237

Note: See TracTickets for help on using tickets.