diff options
author | unknown <monty@mysql.com> | 2005-04-04 16:43:25 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-04-04 16:43:25 +0300 |
commit | ce169a5424e76969e74828d4214cfedb0a425ee5 (patch) | |
tree | 3ad1b7dadf9b015e59e0f817db58b9dbc155cb5e /mysql-test/t/strict.test | |
parent | 0c9304fd6d9b1648f3157a6a5e3f0ec536d82560 (diff) | |
download | mariadb-git-ce169a5424e76969e74828d4214cfedb0a425ee5.tar.gz |
Don't use -lsupc++ with gcc 3.3 and below as this gives linking problems when linking staticly
Fix that mysql.proc works with new VARCHAR fields
Give warnings for wrong zero dates
configure.in:
Don't use -lsupc++ with gcc 3.3 and below as this gives linking problems when linking staticly
mysql-test/r/func_time.result:
New warnings
mysql-test/r/row.result:
Moved code around to get things to work with --ps-protocol
Note that one on warning disappered, but it should appear again when bug #9600 is fixed
mysql-test/r/strict.result:
enabled more tests
Added more tests
mysql-test/r/union.result:
Test that UNION generates correct row format
mysql-test/t/row.test:
Moved test to get things to work with --ps-protocol
mysql-test/t/strict.test:
enabled more tests
Added more tests
mysql-test/t/union.test:
Test that UNION generates correct row format
sql/item.cc:
Removed compiler warning
Simple cleanup
sql/sp.cc:
Fix that mysql.proc works with new VARCHAR fields
sql/time.cc:
Give warnings for wrong zero dates
tests/mysql_client_test.c:
More startup information
Diffstat (limited to 'mysql-test/t/strict.test')
-rw-r--r-- | mysql-test/t/strict.test | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index f98fc30ff48..9d4befb9743 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -284,8 +284,8 @@ INSERT INTO t1 (col1) VALUES(CAST('2004-0-10' AS DATE)); # deactivated because of Bug#6145 # Bug#6145: Traditional: CONVERT and CAST should reject zero DATE values -#--error 1292 -#INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); +--error 1292 +INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); ## Test INSERT with CAST AS DATETIME into DATETIME # All test cases expected to fail should return @@ -308,10 +308,9 @@ INSERT INTO t1 (col2) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); #--error 1292 #INSERT INTO t1 (col2) VALUES(CAST('2004-13-15 15:30' AS DATETIME)); -# deactivated because of Bug#6145 # Bug#6145: Traditional: CONVERT and CAST should reject zero DATE values -#--error 1292 -#INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); +--error 1292 +INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); ## Test INSERT with CAST AS DATETIME into TIMESTAMP # All test cases expected to fail should return @@ -338,10 +337,9 @@ INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); #--error 1292 #INSERT INTO t1 (col3) VALUES(CAST('2004-13-15 15:30' AS DATETIME)); -# deactivated because of Bug#6145 # Bug#6145: Traditional: CONVERT and CAST should reject zero DATE values -#--error 1292 -#INSERT INTO t1 (col3) VALUES(CAST('0000-00-00' AS DATETIME)); +--error 1292 +INSERT INTO t1 (col3) VALUES(CAST('0000-00-00' AS DATETIME)); drop table t1; @@ -376,10 +374,9 @@ INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE)); #--error 1292 #INSERT INTO t1 (col1) VALUES(CONVERT('2004-13-15',DATE)); -# deactivated because of Bug#6145 # Bug#6145: Traditional: CONVERT and CAST should reject zero DATE values -#--error 1292 -#INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); +--error 1292 +INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); ## Test INSERT with CONVERT to DATETIME into DATETIME # All test cases expected to fail should return @@ -403,8 +400,8 @@ INSERT INTO t1 (col2) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); #INSERT INTO t1 (col2) VALUES(CONVERT('2004-13-15 15:30',DATETIME)); # Bug#6145: Traditional: CONVERT and CAST should reject zero DATE values -#--error 1292 -#INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); +--error 1292 +INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); ## Test INSERT with CONVERT to DATETIME into DATETIME # All test cases expected to fail should return @@ -430,10 +427,9 @@ INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); #--error 1292 #INSERT INTO t1 (col3) VALUES(CONVERT('2004-13-15 15:30',DATETIME)); -# deactivated because of Bug#6145 # Bug#6145: Traditional: CONVERT and CAST should reject zero DATE values -#--error 1292 -#INSERT INTO t1 (col3) VALUES(CONVERT('0000-00-00',DATETIME)); +--error 1292 +INSERT INTO t1 (col3) VALUES(CONVERT('0000-00-00',DATETIME)); drop table t1; @@ -1001,7 +997,7 @@ select * from t1; drop table t1; # -# Zero dates using numbers was not checked properly (Bug #5933) +# Zero dates using numbers was not checked properly (Bug #5933 & #6145) # create table t1 (col1 date, col2 datetime, col3 timestamp); @@ -1009,6 +1005,11 @@ create table t1 (col1 date, col2 datetime, col3 timestamp); insert into t1 values (0,0,0); --error 1292 insert into t1 values (0.0,0.0,0.0); +--error 1292 +insert into t1 (col1) values (convert('0000-00-00',date)); +--error 1292 +insert into t1 (col1) values (cast('0000-00-00' as date)); + set sql_mode='no_zero_date'; insert into t1 values (0,0,0); insert into t1 values (0.0,0.0,0.0); @@ -1019,6 +1020,7 @@ insert ignore into t1 values ('0000-00-00'); --error 1292 insert into t1 select * from t1; insert ignore into t1 values ('0000-00-00'); +insert ignore into t1 (col1) values (cast('0000-00-00' as date)); --error 1292 insert into t1 select * from t1; --error 1292 |