mariadb/mysql-test/suite/storage_engine/col_opt_default.result
Elena Stepanova 7f444caa0a MDEV-4028 - Converted rdiff files to uniform
MDEV-11 - Modifed tests and result files to use explicit column lists
          in INSERT and SELECT statements
2013-02-03 02:53:57 +04:00

20 lines
459 B
Text

DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a <INT_COLUMN> DEFAULT '0') ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) # 0
INSERT INTO t1 (a) VALUES (1);
SELECT a FROM t1;
a
1
ALTER TABLE t1 ADD COLUMN b <CHAR_COLUMN> DEFAULT '';
SHOW COLUMNS IN t1;
Field Type Null Key Default Extra
a int(11) # 0
b char(8) #
INSERT INTO t1 (b) VALUES ('a');
SELECT a,b FROM t1;
a b
0 a
1
DROP TABLE t1;