diff options
author | unknown <pcrews@pcrews-mac-local.local> | 2008-01-21 13:49:03 -0500 |
---|---|---|
committer | unknown <pcrews@pcrews-mac-local.local> | 2008-01-21 13:49:03 -0500 |
commit | 63c73b52f3c67ffe8510c7dc8af12411136cee65 (patch) | |
tree | a300d6e5787ab2227d0713105a55a82f70bc711c /mysql-test/r/csv_not_null.result | |
parent | ed2ab9338e9c0c3aed387e3264ea40b7e792c559 (diff) | |
download | mariadb-git-63c73b52f3c67ffe8510c7dc8af12411136cee65.tar.gz |
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Added new tests and corrected existing tests
mysql-test/suite/stress/include/ddl3.inc:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Had to change CREATE TABLE statements to include NOT NULL due to CSV engine constraints
mysql-test/suite/stress/r/ddl_archive.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Reproduced .result files due to changes in ddl3.inc
mysql-test/suite/stress/r/ddl_csv.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Reproduced .result files due to changes in ddl3.inc
mysql-test/suite/stress/r/ddl_innodb.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Reproduced .result files due to changes in ddl3.inc
mysql-test/suite/stress/r/ddl_memory.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Reproduced .result files due to changes in ddl3.inc
mysql-test/suite/stress/r/ddl_myisam.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Reproduced .result files due to changes in ddl3.inc
mysql-test/suite/stress/r/ddl_ndb.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Reproduced .result files due to changes in ddl3.inc
BitKeeper/etc/ignore:
Added mysql-test/.DS_Store .DS_Store to the ignore list
mysql-test/t/disabled.def:
Disabled new test - csv_alter_table.test file due to Bug#33696.
Cannot generate a .result file due to the Bug. These tests can be enabled to test the bug fix without needing new tests unless the developer feels the need to add more.
mysql-test/r/csv_not_null.result:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
mysql-test/t/csv_alter_table.test:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Designed to test fixes for Bug#33696 - CSV Engine allows nullable columns via ALTER TABLE statements
mysql-test/t/csv_not_null.test:
New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support
Diffstat (limited to 'mysql-test/r/csv_not_null.result')
-rw-r--r-- | mysql-test/r/csv_not_null.result | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/mysql-test/r/csv_not_null.result b/mysql-test/r/csv_not_null.result new file mode 100644 index 00000000000..9757d258618 --- /dev/null +++ b/mysql-test/r/csv_not_null.result @@ -0,0 +1,59 @@ +# ===== csv_not_null.1 ===== +DROP TABLE IF EXISTS t1, t2; +# === Will fail -- no NOT NULL === +CREATE TABLE t1 (a int) ENGINE = CSV; +ERROR 42000: The storage engine for the table doesn't support nullable columns +# === Good CREATE === +CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; +# === Will fail -- ALL columns need NOT NULL == +CREATE TABLE t2 (a int NOT NULL, b char(20)) ENGINE = CSV; +ERROR 42000: The storage engine for the table doesn't support nullable columns +DROP TABLE t1; +# ===== csv_not_null.2 ===== +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int NOT NULL, b blob NOT NULL, c CHAR(20) NOT NULL, +d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL) +ENGINE = CSV; +# === should result in default for each datatype === +INSERT INTO t1 VALUES(); +SELECT * FROM t1; +a b c d e f +0 foo 0000-00-00 +SELECT * FROM t1; +a b c d e f +0 foo 0000-00-00 +INSERT INTO t1 VALUES(0,'abc','def','ghi','bar','1999-12-31'); +SELECT * FROM t1; +a b c d e f +0 foo 0000-00-00 +0 abc def ghi bar 1999-12-31 +# === insert failures === +INSERT INTO t1 VALUES(NULL,'ab','a','b','foo','2007-01-01'); +ERROR 23000: Column 'a' cannot be null +INSERT INTO t1 VALUES(default(a),default(b), default(c), default(d), +default(e), default(f)); +ERROR HY000: Field 'a' doesn't have a default value +DROP TABLE t1; +# ===== csv_not_null.3 ===== +DROP TABLE IF EXISTS t1; +CREATE DATABASE csv_not_null_test; +USE csv_not_null_test; +CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; +INSERT INTO t1 VALUES(); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +Warning 1364 Field 'b' doesn't have a default value +SELECT * FROM t1; +a b +0 +UPDATE t1 set b = 'new_value' where a = 0; +SELECT * FROM t1; +a b +0 new_value +UPDATE t1 set b = NULL where b = 'new_value'; +Warnings: +Warning 1048 Column 'b' cannot be null +SELECT * FROM t1; +a b +0 +DROP TABLE t1; |