Segfault - operator= (join=0x1fd0fd8, tables=<value optimized out>, conds=<value optimized out>, keyuse_array=<value optimized out>) at ./drizzled/join_table.h:73
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Drizzle |
Fix Released
|
Medium
|
PrafullaT | ||
Dexter |
Fix Released
|
Medium
|
PrafullaT |
Bug Description
We are seeing a segfault here for certain queries - particularly those generated by the randgen grammar outer_join_
Test case is forthcoming.
Backtrace:
#0 operator= (join=0x1fd0fd8, tables=<value optimized out>, conds=<value optimized out>, keyuse_array=<value optimized out>) at ./drizzled/
#1 get_best_
#2 make_join_
#3 0x0000000000591c99 in drizzled:
#4 0x00000000006147a5 in drizzled:
og_num=4, order=0x0, group=0x1f54328, having=0x0, select_
#5 0x0000000000615120 in drizzled:
#6 0x000000000060ecd5 in drizzled:
#7 0x000000000060e94e in mysql_execute_
#8 drizzled:
#9 0x0000000000610b12 in drizzled:
packet=
#10 0x00000000005de61f in drizzled:
#11 0x00000000005dffe2 in drizzled:
#12 0x00007f5914728083 in MultiThreadSche
#13 session_thread (arg=<value optimized out>) at plugin/
#14 0x00007f59185af9ca in start_thread (arg=<value optimized out>) at pthread_
#15 0x00007f591830d6cd in clone () at ../sysdeps/
#16 0x0000000000000000 in ?? ()
It is possible that https:/
Related branches
- Patrick Crews: Approve
-
Diff: 521 lines (+361/-33)8 files modifieddrizzled/item.h (+5/-0)
drizzled/join.cc (+65/-20)
drizzled/nested_join.h (+10/-0)
drizzled/optimizer/range.cc (+5/-2)
drizzled/sql_select.cc (+8/-10)
drizzled/sql_select.h (+1/-1)
tests/r/optimizer.result (+141/-0)
tests/t/optimizer.test (+126/-0)
Test case (sorry it is still pretty large, but automated simplification isn't working yet):
DROP TABLE IF EXISTS `p`;
CREATE TABLE `p` (
`pk` int NOT NULL AUTO_INCREMENT,
`col_int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `col_int_key` (`col_int_key`)
) ENGINE=InnoDB;
ALTER TABLE `p` DISABLE KEYS; ,(2,261947392) ,(3,-1761017856 ),(4,NULL) ,(5,NULL) ,(6,NULL) ,(7,1941635072) ,(8,-610992128) ,(9,NULL) ,(10,-148661862 4),(11, 1047199744) ,(12,5) ,(13,2) ,(14,NULL) ,(15,NULL) ,(16,-828899328 ),(17,5) ,(18,NULL) ,(19,-157332275 2),(20, NULL),( 21,1),( 22,1080360960) ,(23,NULL) ,(24,9) ,(25,243335168) ,(26,NULL) ,(27,2) ,(28,351469568) ,(29,NULL) ,(30,0) ,(31,1626865664 ),(32,NULL) ,(33,NULL) ,(34,6) ,(35,NULL) ,(36,6) ,(37,NULL) ,(38,838598656) ,(39,-173270630 4),(40, -120061952) ,(41,NULL) ,(42,3) ,(43,2) ,(44,8) ,(45,-123443609 6),(46, 4),(47, -1542324224) ,(48,NULL) ,(49,1607073792 ),(50,0) ,(51,9) ,(52,NULL) ,(53,NULL) ,(54,-921174016 ),(55,- 184877056) ,(56,NULL) ,(57,-129105920 0),(58, 0),(59, NULL),( 60,565379072) ,(61,NULL) ,(62,506855424) ,(63,NULL) ,(64,NULL) ,(65,NULL) ,(66,5) ,(67,5) ,(68,5) ,(69,2) ,(70,6) ,(71,NULL) ,(72,9) ,(73,7) ,(74,-210855526 4),(75, 6),(76, 1057095680) ,(77,8) ,(78,-409468928 ),(79,- 438960128) ,(80,-939393024 ),(81,- 927203328) ,(82,NULL) ,(83,-183468032 0),(84, NULL),( 85,1984561152) ,(86,8) ,(87,NULL) ,(88,8) ,(89,-326500352 ),(90,NULL) ,(91,4) ,(92,NULL) ,(93,NULL) ,(94,-136983347 2),(95, NULL),( 96,0),( 97,31260672) ,(98,NULL) ,(99,NULL) ,(100,0) ;
INSERT INTO `p` VALUES (1,NULL)
ALTER TABLE `p` ENABLE KEYS;
DROP TABLE IF EXISTS `n`; varchar_ 10_key` varchar(10) DEFAULT NULL, 10_key` (`col_varchar_ 10_key` )
CREATE TABLE `n` (
`pk` int NOT NULL AUTO_INCREMENT,
`col_
PRIMARY KEY (`pk`),
KEY `col_varchar_
) ENGINE=InnoDB;
ALTER TABLE `n` DISABLE KEYS; ),(2,'corrdtxod t'),(3, 'v'),(4, 'dcorrdtxod' ),(5,'s' ),(6,'my' ),(7,'e' ),(8,'qxszmrdco r'),(9, 'bqxszmrdco' ),(10,' wbqxszmrdc' ),(11,' v'),(12, 'kywbqxszmr' ),(13,' v'),(14, 'lngrakywbq' ),(15,' umtlngraky' ),(16,' could') ,(17,'peiywumtl n'),(18, 'will') ,(19,'tell' ),(20,' w'),(21, 'jenpeiywum' ),(22,' cejenpeiyw' ),(23,' x'),(24, 'vxcejenpei' );
INSERT INTO `n` VALUES (1,'rdtxodtcmi'
ALTER TABLE `n` ENABLE KEYS;
DROP TABLE IF EXISTS `d`;
CREATE TABLE `d` (
`pk` int NOT NULL AUTO_INCREMENT,
`col_varchar_10` varchar(10) DEFAULT NULL,
PRIMARY KEY (`pk`)
) ENGINE=InnoDB;
ALTER TABLE `d` DISABLE KEYS; ,(2,'zdvoleqxer '),(3,' i'),(4, 'u'),(5, 'q');
INSERT INTO `d` VALUES (1,'f')
ALTER TABLE `d` ENABLE KEYS;
DROP TABLE IF EXISTS `h`; varchar_ 10_key` varchar(10) DEFAULT NULL, 10_key` (`col_varchar_ 10_key` ),
CREATE TABLE `h` (
`col_varchar_10` varchar(10) DEFAULT NULL,
`pk` int NOT NULL AUTO_INCREMENT,
`col_
`col_int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `col_varchar_
KEY `col_int_key` (`col_int_key`)
) ENGINE=InnoDB;
ALTER TABLE `h` DISABLE KEYS; 'rshrrbmsyd' ,4),('h' ,2,'okay' ,NULL), ('ok',3, 'i',-802095104) ,('just' ,4,'z', 6),('hfnrshrrbm ',5,'his' ,8),('f' ,6,'xhfnrshrrb' ,1),('h' ,7,'wxhfnrshrr' ,7),('wtwxhfnrs h',8,'v' ,7),('of' ,9,'cwtwxhfnrs' ,-1258487808) ;
INSERT INTO `h` VALUES ('n',1,
ALTER TABLE `h` ENABLE KEYS;
DROP TABLE IF EXISTS `a`;
CREATE TABLE `a` (
`pk` int NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`pk`)
) ENGINE=InnoDB;
DROP TABLE IF EXISTS `k`;
CREATE ...