test case for Drizzle:
try to record the result for it and observe the crash
#/* Begin test case for query 0 */
--disable_warnings
DROP TABLE /*! IF EXISTS */ A;
DROP TABLE /*! IF EXISTS */ C;
DROP TABLE /*! IF EXISTS */ BB;
DROP TABLE /*! IF EXISTS */ B;
--enable_warnings
CREATE TABLE `A` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) ;
CREATE TABLE `C` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) AUTO_INCREMENT=21 ;
INSERT INTO `C` VALUES (1,2);
INSERT INTO `C` VALUES (2,9);
INSERT INTO `C` VALUES (3,3);
INSERT INTO `C` VALUES (4,9);
INSERT INTO `C` VALUES (5,NULL);
INSERT INTO `C` VALUES (6,9);
INSERT INTO `C` VALUES (7,3);
INSERT INTO `C` VALUES (8,8);
INSERT INTO `C` VALUES (9,8);
INSERT INTO `C` VALUES (10,53);
INSERT INTO `C` VALUES (11,0);
INSERT INTO `C` VALUES (12,5);
INSERT INTO `C` VALUES (13,166);
INSERT INTO `C` VALUES (14,3);
INSERT INTO `C` VALUES (15,0);
INSERT INTO `C` VALUES (16,1);
INSERT INTO `C` VALUES (17,9);
INSERT INTO `C` VALUES (18,5);
INSERT INTO `C` VALUES (19,6);
INSERT INTO `C` VALUES (20,2);
CREATE TABLE `BB` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) AUTO_INCREMENT=11 ;
INSERT INTO `BB` VALUES (10,8);
CREATE TABLE `B` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) AUTO_INCREMENT=2 ;
INSERT INTO `B` VALUES (1,7);
SELECT table1 .`int_key`
FROM BB table1 LEFT JOIN BB table2 LEFT JOIN B table4 JOIN C table5 ON table5
.`pk`
ON table4 .`pk` LEFT JOIN A JOIN BB table8 ON table8 .`pk` RIGHT JOIN BB table9
JOIN C table10 ON table10 .`int_key` ON table9 .`pk` ON table5 .`int_key` = table9
.`pk` RIGHT JOIN BB table11 LEFT JOIN C table12 JOIN BB table14 ON table12 .`pk`
=
table14 .`int_key` ON table11 .`int_key` = table12 .`pk` ON table5 .`int_key` =
table14 .`int_key` ON table2 .`pk`
WHERE table1 .`pk`
HAVING 55 ;
DROP TABLE A;
DROP TABLE C;
DROP TABLE BB;
DROP TABLE B;
#/* End of test case for query 0 */
test case for Drizzle:
try to record the result for it and observe the crash
#/* Begin test case for query 0 */
--disable_warnings
DROP TABLE /*! IF EXISTS */ A;
DROP TABLE /*! IF EXISTS */ C;
DROP TABLE /*! IF EXISTS */ BB;
DROP TABLE /*! IF EXISTS */ B;
--enable_warnings
CREATE TABLE `A` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) ;
CREATE TABLE `C` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) AUTO_INCREMENT=21 ;
INSERT INTO `C` VALUES (1,2);
INSERT INTO `C` VALUES (2,9);
INSERT INTO `C` VALUES (3,3);
INSERT INTO `C` VALUES (4,9);
INSERT INTO `C` VALUES (5,NULL);
INSERT INTO `C` VALUES (6,9);
INSERT INTO `C` VALUES (7,3);
INSERT INTO `C` VALUES (8,8);
INSERT INTO `C` VALUES (9,8);
INSERT INTO `C` VALUES (10,53);
INSERT INTO `C` VALUES (11,0);
INSERT INTO `C` VALUES (12,5);
INSERT INTO `C` VALUES (13,166);
INSERT INTO `C` VALUES (14,3);
INSERT INTO `C` VALUES (15,0);
INSERT INTO `C` VALUES (16,1);
INSERT INTO `C` VALUES (17,9);
INSERT INTO `C` VALUES (18,5);
INSERT INTO `C` VALUES (19,6);
INSERT INTO `C` VALUES (20,2);
CREATE TABLE `BB` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) AUTO_INCREMENT=11 ;
INSERT INTO `BB` VALUES (10,8);
CREATE TABLE `B` (
`pk` int NOT NULL AUTO_INCREMENT,
`int_key` int DEFAULT NULL,
PRIMARY KEY (`pk`),
KEY `int_key` (`int_key`),
KEY `varchar_key` (`int_key`)
) AUTO_INCREMENT=2 ;
INSERT INTO `B` VALUES (1,7);
SELECT table1 .`int_key`
FROM BB table1 LEFT JOIN BB table2 LEFT JOIN B table4 JOIN C table5 ON table5
.`pk`
ON table4 .`pk` LEFT JOIN A JOIN BB table8 ON table8 .`pk` RIGHT JOIN BB table9
JOIN C table10 ON table10 .`int_key` ON table9 .`pk` ON table5 .`int_key` = table9
.`pk` RIGHT JOIN BB table11 LEFT JOIN C table12 JOIN BB table14 ON table12 .`pk`
=
table14 .`int_key` ON table11 .`int_key` = table12 .`pk` ON table5 .`int_key` =
table14 .`int_key` ON table2 .`pk`
WHERE table1 .`pk`
HAVING 55 ;
DROP TABLE A;
DROP TABLE C;
DROP TABLE BB;
DROP TABLE B;
#/* End of test case for query 0 */