"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/tests/suite/regression/r/686197.result" (6 May 2012, 1380 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 CREATE TABLE t1 (A SERIAL);
    2 INSERT INTO t1 VALUES (), (), ();
    3 SELECT A from t1 ORDER BY A;
    4 A
    5 1
    6 2
    7 3
    8 ALTER TABLE t1 ADD COLUMN b INT NOT NULL;
    9 ERROR HY000: Either a DEFAULt value or NULL NULL description is required for a new column if table is not empty
   10 SELECT A from t1 ORDER BY A;
   11 A
   12 1
   13 2
   14 3
   15 SHOW CREATE TABLE t1;
   16 Table	Create Table
   17 t1	CREATE TABLE `t1` (
   18   `A` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
   19   UNIQUE KEY `A` (`A`) USING BTREE
   20 ) ENGINE=InnoDB COLLATE = utf8_general_ci
   21 ALTER TABLE t1 ADD COLUMN b INT DEFAULT 1 NOT NULL;
   22 SELECT A,B from t1 ORDER BY A;
   23 A	B
   24 1	1
   25 2	1
   26 3	1
   27 DROP TABLE t1;
   28 CREATE TABLE t1 (A SERIAL, b int);
   29 INSERT INTO t1 VALUES (), (), ();
   30 SELECT A,B from t1 ORDER BY A;
   31 A	B
   32 1	NULL
   33 2	NULL
   34 3	NULL
   35 ALTER TABLE t1 MODIFY COLUMN b int not null;
   36 ERROR 01000: Data truncated for column 'b' at row 1
   37 SELECT A,B from t1 ORDER BY A;
   38 A	B
   39 1	NULL
   40 2	NULL
   41 3	NULL
   42 SHOW CREATE TABLE t1;
   43 Table	Create Table
   44 t1	CREATE TABLE `t1` (
   45   `A` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
   46   `b` INT DEFAULT NULL,
   47   UNIQUE KEY `A` (`A`) USING BTREE
   48 ) ENGINE=InnoDB COLLATE = utf8_general_ci
   49 ALTER TABLE t1 MODIFY COLUMN b int DEFAULT 42 NOT NULL;
   50 SELECT A,B from t1 ORDER BY A;
   51 A	B
   52 1	42
   53 2	42
   54 3	42
   55 DROP TABLE t1;
   56 CREATE TABLE t1 (col6 int not null);
   57 INSERT INTO t1 VALUES (2);
   58 SELECT * FROM t1;
   59 col6
   60 2
   61 alter table t1 modify column col6 int not null;
   62 select * from t1;
   63 col6
   64 2
   65 drop table t1;