Comment 1 for bug 628397

Revision history for this message
Patrick Crews (patrick-crews) wrote :

test-suite testcase:
try to record via ./test-run --record <test_case_name>

--disable_warnings
DROP TABLE IF EXISTS `o`;
DROP TABLE IF EXISTS `b`;
DROP TABLE IF EXISTS `f`;
DROP TABLE IF EXISTS `c`;
DROP TABLE IF EXISTS `e`;
DROP TABLE IF EXISTS `g`;
--enable_warnings

CREATE TABLE `o` (
  `pk` int NOT NULL DEFAULT '0',
  `col_int_key` int DEFAULT NULL
) ENGINE=InnoDB COLLATE = utf8_general_ci;
INSERT INTO `o` VALUES (1,4);
INSERT INTO `o` VALUES (2,-867368960);
INSERT INTO `o` VALUES (3,655032320);
INSERT INTO `o` VALUES (4,1);
INSERT INTO `o` VALUES (5,NULL);
INSERT INTO `o` VALUES (6,-118751232);
INSERT INTO `o` VALUES (7,7);
INSERT INTO `o` VALUES (8,1);
INSERT INTO `o` VALUES (9,3);
INSERT INTO `o` VALUES (10,-518324224);
INSERT INTO `o` VALUES (11,7);
INSERT INTO `o` VALUES (12,1129709568);
INSERT INTO `o` VALUES (13,-2081357824);
INSERT INTO `o` VALUES (14,6);
INSERT INTO `o` VALUES (15,NULL);
INSERT INTO `o` VALUES (16,NULL);
INSERT INTO `o` VALUES (17,NULL);
INSERT INTO `o` VALUES (18,NULL);
INSERT INTO `o` VALUES (19,4);
INSERT INTO `o` VALUES (20,1049690112);
INSERT INTO `o` VALUES (21,NULL);
INSERT INTO `o` VALUES (22,5);
INSERT INTO `o` VALUES (23,431292416);
INSERT INTO `o` VALUES (24,2);
INSERT INTO `o` VALUES (25,6);

CREATE TABLE `b` (
  `pk` int NOT NULL DEFAULT '0',
  `col_int_key` int DEFAULT NULL,
  `col_varchar_1024_key` varchar(1024) DEFAULT NULL,
  `col_varchar_10_key` varchar(10) DEFAULT NULL,
  `col_varchar_10` varchar(10) DEFAULT NULL
) ENGINE=InnoDB COLLATE = utf8_general_ci;
INSERT INTO `b` VALUES (1,NULL,'she','okay','we');

CREATE TABLE `f` (
  `pk` int NOT NULL DEFAULT '0',
  `col_int` int DEFAULT NULL,
  `col_int_key` int DEFAULT NULL,
  `col_varchar_1024_key` varchar(1024) DEFAULT NULL
) ENGINE=InnoDB COLLATE = utf8_general_ci;
INSERT INTO `f` VALUES (1,1230307328,-180486144,'can\'t');
INSERT INTO `f` VALUES (2,NULL,NULL,'gbawadfszkpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjit');
INSERT INTO `f` VALUES (3,NULL,NULL,'think');
INSERT INTO `f` VALUES (4,0,NULL,'jqgbawadfszkpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdm');
INSERT INTO `f` VALUES (5,2,0,'u');
INSERT INTO `f` VALUES (6,1,NULL,'your');
INSERT INTO `f` VALUES (7,NULL,9,'at');

CREATE TABLE `c` (
  `pk` int NOT NULL DEFAULT '0'
) ENGINE=InnoDB COLLATE = utf8_general_ci;
INSERT INTO `c` VALUES (1);
INSERT INTO `c` VALUES (2);

CREATE TABLE `e` (
  `pk` int NOT NULL DEFAULT '0',
  `col_varchar_10_key` varchar(10) DEFAULT NULL,
  `col_varchar_1024_key` varchar(1024) DEFAULT NULL
) ENGINE=InnoDB COLLATE = utf8_general_ci;
INSERT INTO `e` VALUES (1,'were','poyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfep');
INSERT INTO `e` VALUES (2,'ok','kpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmo');
INSERT INTO `e` VALUES (3,'yes','w');
INSERT INTO `e` VALUES (4,'adfszkpoyx','will');
INSERT INTO `e` VALUES (5,'m','wadfszkpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtb');
INSERT INTO `e` VALUES (6,'k','all');

CREATE TABLE `g` (
  `pk` int NOT NULL DEFAULT '0',
  `col_varchar_1024_key` varchar(1024) DEFAULT NULL
) ENGINE=InnoDB COLLATE = utf8_general_ci;

INSERT INTO `g` VALUES (1,'pkmxffjqgbawadfszkpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpn');
INSERT INTO `g` VALUES (2,'sydpkmxffjqgbawadfszkpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngdjiawsiarcbkgoudqpkecymujxlwfzdeqnrumctcfmndgknecfzkndoohlpkgksukysorfgkvvkreijhlyhznczsxfdezymeqjpdeydhvhrxolrlxmxxdmajqwizwmyvustnzbrbopxmspxnazyxzmuysgonfckdeurqnroljslhdnjmdetcftzsrkjzmhimfmsbhnsgriqkaejakxzbldvftdcaugaahtcwtnujxmwqvkfepcswvrvqhibmuutnuhmvcnctfzmswcmtsrpmyedqxpoluufzbhwbrmcdiwytofotjitmaijfpfbpdwickgvibccphunilmnxvdsykirhgxvyehxyhixejfktoptnpveambxrovrpulkkjqccekfbfamsuiwhofodwrlsvwmxtvaoazfufeehwftkaugjsnebabzsscqhnafqodwrvohesokjrzhnkjhqowroirjsmofgfvfuomwlcdytimiwybmtuheejeitapnjnestutftmutidlvdubbjdznrxsrrmahxsxurpk');
INSERT INTO `g` VALUES (3,'bmsydpkmxffjqgbawadfszkpoyxyczdvoleqxermmjkovqnoqhpubzfjxwqacdiwyekwemegyaluzytnccflbvqnqnmfvvlhitckzgppyilihmleccmmxqxcilxqvfikqseftdkgtlqzbwpucapktdeqxndcqytizhxaaiyashfuwbyynvenjcsmasklnxxtbzrqxmoupppjcctptgoksleizxkrbednzzwgvlnnghjvvtlpajyalhsygtjrhjxreywihgnxlevtsvfzsztftgvgzkqhwpnbztbcpoqdmhgjffokjvoaejwgqpnhemopbmrkfnkwngd');
INSERT INTO `g` VALUES (4,'are');
INSERT INTO `g` VALUES (5,'p');
INSERT INTO `g` VALUES (6,'now');
INSERT INTO `g` VALUES (7,'k');
INSERT INTO `g` VALUES (8,'h');

SELECT STRAIGHT_JOIN table1 . `col_int_key` AS field1
FROM o AS table1 RIGHT OUTER JOIN b AS table2 LEFT JOIN f AS table3 ON table2 . `col_varchar_1024_key` = table3 . `col_varchar_1024_key` LEFT JOIN c AS table4 ON table3 . `pk` = table4 . `pk` ON table1 . `pk` = table3 . `pk` LEFT OUTER JOIN e AS table5 LEFT JOIN b AS table6 ON table5 . `col_varchar_10_key` = table6 . `col_varchar_10` ON table2 . `col_varchar_10_key` = table5 . `col_varchar_1024_key` RIGHT OUTER JOIN g AS table7 ON table2 . `col_varchar_10_key` = table7 . `col_varchar_1024_key` WHERE ( ( ( table6 . `pk` = table3 . `col_int` OR table1 . `pk` < table2 . `pk` ) OR table3 . `col_int_key` > 7 ) OR table2 . `col_int_key` = 5 ) GROUP BY field1 ORDER BY field1 ;

DROP TABLE `o`;
DROP TABLE `b`;
DROP TABLE `f`;
DROP TABLE `c`;
DROP TABLE `e`;
DROP TABLE `g`;