"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/tests/suite/regression/t/639716.test" (6 May 2012, 1406 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 `a`;
    3 DROP TABLE IF EXISTS `aa`;
    4 DROP TABLE IF EXISTS `c`;
    5 --enable_warnings
    6 
    7 CREATE TABLE `a` (
    8   `pk` INT NOT NULL DEFAULT '0',
    9   `col_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,
   10   PRIMARY KEY (`pk`),
   11   KEY `col_enum_key` (`col_enum_key`)
   12 ) ENGINE=InnoDB COLLATE = utf8_general_ci;
   13 
   14 CREATE TABLE `aa` (
   15   `pk` INT NOT NULL DEFAULT '0',
   16   `col_int_not_null_key` INT NOT NULL,
   17   PRIMARY KEY (`pk`),
   18   KEY `col_int_not_null_key` (`col_int_not_null_key`)
   19 ) ENGINE=InnoDB COLLATE = utf8_general_ci;
   20 
   21 INSERT INTO `aa` VALUES (1,-523436032),(2,1),(3,621543424),(4,880148480),(5,1963982848),(6,8),(7,1445462016),(8,0),(9,-747241472),(10,6);
   22 
   23 CREATE TABLE `c` (
   24   `pk` INT NOT NULL DEFAULT '0',
   25   `col_int_key` INT DEFAULT NULL,
   26   `col_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,
   27   PRIMARY KEY (`pk`),
   28   KEY `col_int_key` (`col_int_key`),
   29   KEY `col_enum_key` (`col_enum_key`)
   30 ) ENGINE=InnoDB COLLATE = utf8_general_ci;
   31 
   32 INSERT INTO `c` VALUES (1,NULL,'h');
   33 
   34 --error ER_INVALID_ENUM_VALUE
   35 SELECT X . `col_int_key` FROM `c` AS X LEFT JOIN `a` AS Y USING ( `col_enum_key` ) WHERE X . `col_enum_key` = ( SELECT `col_int_not_null_key` FROM `aa` WHERE `pk` = 5 ) LIMIT 8 ;
   36 
   37 DROP TABLE `a`,`aa`,`c`;