"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/tests/suite/regression/t/632755.test" (6 May 2012, 2920 Bytes) of package /linux/misc/old/drizzle-7.1.36-stable.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 --disable_warnings
    2 DROP TABLE IF EXISTS AA;
    3 DROP TABLE IF EXISTS BB;
    4 --enable_warnings
    5 
    6 CREATE TABLE `aa` (
    7   `pk` int NOT NULL DEFAULT '0',
    8   `col_text_not_null_key` text NOT NULL,
    9   `col_int_not_null_key` int NOT NULL,
   10   `col_bigint_not_null_key` bigint NOT NULL,
   11   `col_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,
   12   `col_int_key` int DEFAULT NULL,
   13   `col_int` int DEFAULT NULL,
   14   `col_char_1024_not_null_key` varchar(1024) NOT NULL
   15 ) ENGINE=InnoDB COLLATE = utf8_general_ci;
   16 
   17 INSERT INTO `aa` VALUES (1,'',-523436032,-6388637546401759232,'s',2071265280,9,'well'),(2,'',1,5,'p',1,-1692139520,'on'),(3,'',621543424,1,'n',NULL,4,'ASUNK'),(4,'',880148480,-9123448420122492928,'o',1734213632,9,'d'),(5,'',1963982848,9,'b',1505558528,-1091567616,'m'),(6,'',8,6,'c',8,126156800,'to'),(7,'',1445462016,5,'p',NULL,534904832,'t'),(8,'',0,5903374686552588288,'i',-1685520384,8,'m'),(9,'',-747241472,2,'f',NULL,NULL,'USQVA'),(10,'',6,-3207125884641214464,'p',-1431502848,NULL,'FUBQO');
   18 
   19 CREATE TABLE `bb` (
   20   `pk` int NOT NULL DEFAULT '0',
   21   `col_text` text,
   22   `col_text_not_null_key` text NOT NULL,
   23   `col_char_1024_key` varchar(1024) DEFAULT NULL,
   24   `col_char_10_not_null` varchar(10) NOT NULL,
   25   `col_char_1024_not_null_key` varchar(1024) NOT NULL,
   26   `col_bigint_key` bigint DEFAULT NULL
   27 ) ENGINE=InnoDB COLLATE = utf8_general_ci;
   28 
   29 INSERT INTO `bb` VALUES (1,NULL,'','ANVSO','f','IHTVZ',NULL),(2,NULL,'','JBJPT','GQPHI','a',NULL),(3,NULL,'','KAHJT','her','s',-647673921411219456),(4,NULL,'','q','you','d',-5702401553181179904),(5,NULL,'','l','but','TTNNK',NULL),(6,NULL,'','ULWFL','XDMGU','GKTRR',4),(7,NULL,'','YOIXU','NGHIX','ZZDWO',NULL),(8,NULL,'','that\'s','u','up',8),(9,NULL,'','ZPPIG','l','would',NULL),(10,NULL,'','like','MDJAH','JNAFV',NULL);
   30 
   31 SELECT table1 . `col_text_not_null_key` AS field1 , table2 . `col_int_not_null_key` AS field2 , table2 . `col_bigint_not_null_key` AS field3 , table1 . `col_enum_not_null_key` AS field4 FROM ( AA AS table1 STRAIGHT_JOIN AA AS table2 ON (table2 . `pk` = table1 . `col_int_key` ) ) WHERE ( table1 . `col_int_key` IN ( SELECT 1 UNION SELECT 5 ) ) AND ( table1 . `pk` != table1 . `col_int` OR table1 . `col_int` < table1 . `col_int` ) GROUP BY field1, field2, field3, field4 HAVING ( 'm', 'u' ) IN ( SELECT SUBQUERY2_t1 . `col_text` AS SUBQUERY2_field1 , SUBQUERY2_t1 . `col_text_not_null_key` AS SUBQUERY2_field2 FROM ( BB AS SUBQUERY2_t1 RIGHT JOIN BB AS SUBQUERY2_t2 ON (SUBQUERY2_t2 . `col_char_1024_key` = SUBQUERY2_t1 . `col_char_10_not_null` ) ) WHERE ( SUBQUERY2_t1 . `col_text` > SUBQUERY2_t1 . `col_char_1024_not_null_key` AND SUBQUERY2_t2 . `col_bigint_key` < SUBQUERY2_t2 . `col_bigint_key` ) ) ORDER BY table1 . `col_char_1024_not_null_key` , field1 DESC , table1 . `col_text_not_null_key` ASC, field1, field2, field3, field4 LIMIT 2 ;
   32 
   33 DROP TABLE AA;
   34 DROP TABLE BB;
   35