Comment 7 for bug 439719

Revision history for this message
fmpwizard (diego-fmpwizard) wrote :

Thanks Lee for adding the other test, and thanks Brian and Stewart for the pointers.

I was able to reduce the steps to reproduce the crash to:

drizzle> create database test;
drizzle> use test;
drizzle> CREATE TABLE `table1_innodb_int_autoinc` (
    -> `int` int DEFAULT NULL,
    -> `int_not_null_key` int NOT NULL,
    -> `enum` enum('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') DEFAULT NULL,
    -> `char_key` varchar(1) DEFAULT NULL,
    -> `int_not_null` int NOT NULL,
    -> `char_not_null` varchar(1) NOT NULL,
    -> `enum_not_null` enum('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') NOT NULL,
    -> `enum_key` enum('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') DEFAULT NULL,
    -> `char` varchar(1) DEFAULT NULL,
    -> `pk` int NOT NULL AUTO_INCREMENT,
    -> `enum_not_null_key` enum('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z') NOT NULL,
    -> `int_key` int DEFAULT NULL,
    -> `char_not_null_key` varchar(1) NOT NULL,
    -> PRIMARY KEY (`pk`),
    -> KEY `int_not_null_key` (`int_not_null_key`),
    -> KEY `char_key` (`char_key`),
    -> KEY `enum_key` (`enum_key`),
    -> KEY `enum_not_null_key` (`enum_not_null_key`),
    -> KEY `int_key` (`int_key`),
    -> KEY `char_not_null_key` (`char_not_null_key`)
    -> ) ENGINE=InnoDB
    -> ;

drizzle> UPDATE `table1_innodb_int_autoinc` SET `enum_not_null` = CONVERT( 'what' , CHAR) WHERE `enum_key` IN ( REPEAT( x'8156' , 165 ) , REPEAT( x'BF8D' , 40 ) , CONVERT( 'yeah' , CHAR) , CONVERT( 'ewscwgufzogybtkjkpttdftjvpfgwdleinctcibsanrkxmtskurjkbrfthplegltfvvbmyihkjcrhcfjqsgroeyjvqheofvdcujkgvyanveuqlyhnkwizomgnqqxmctihkgrzvgoxwzoaoqfhjaj' , CHAR) , CONVERT( 'okay' , CHAR) , CONVERT( 'we' , CHAR) , CONVERT( 'sewscwgufzogybtkjkpttdftjvpfgwdleinctcibsanrkxmtskurjkbrfthplegltfvvbmyihkjcrhcfjqsgroeyjvqheofvdcujkgvyanveuqlyhnkwizomgnqqxmctihkgrzvgoxwzoaoqfhjajxhchyeexglnxgoruczozuiawdckfqxatruutqbytleszhxgopyizrctmefncptaa' , CHAR) ) ORDER BY `pk` LIMIT 2;

As soon as you run the update statement, drizzled fails on the assert(). I'll see if I can make the table a bit simpler and then move to add a test case and come up with the fix.

-Diego