diff options
author | unknown <gshchepa/uchum@host.loc> | 2008-01-11 05:06:08 +0400 |
---|---|---|
committer | unknown <gshchepa/uchum@host.loc> | 2008-01-11 05:06:08 +0400 |
commit | a114ede24abff88609e5686f0eafbaf7fc2ed0b7 (patch) | |
tree | d8feee23dcee7d250b78786ec8170e5e615d4e65 /mysql-test/suite | |
parent | 34cae15606134da46ed426d4ac42f01c93992324 (diff) | |
download | mariadb-git-a114ede24abff88609e5686f0eafbaf7fc2ed0b7.tar.gz |
Bug#33699: The UPDATE statement allows NULL as new value on a NOT NULL
columns (default datatype value is assigned).
The mysql_update function has been modified to generate
an error when trying to set a NOT NULL field to NULL rather than a warning
in the set_field_to_null_with_conversions function.
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
Updated test case (for bug#33699).
mysql-test/include/ps_modify.inc:
Updated test case (for bug#33699).
mysql-test/r/auto_increment.result:
Updated test case (for bug#33699).
mysql-test/r/null.result:
Updated test case (for bug#33699).
mysql-test/r/ps_2myisam.result:
Updated test case (for bug#33699).
mysql-test/r/ps_3innodb.result:
Updated test case (for bug#33699).
mysql-test/r/ps_4heap.result:
Updated test case (for bug#33699).
mysql-test/r/ps_5merge.result:
Updated test case (for bug#33699).
mysql-test/r/warnings.result:
Updated test case (for bug#33699).
mysql-test/suite/ndb/r/ps_7ndb.result:
Updated test case (for bug#33699).
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
Updated test case (for bug#33699).
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
Updated test case (for bug#33699).
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
Updated test case (for bug#33699).
mysql-test/t/auto_increment.test:
Updated test case (for bug#33699).
mysql-test/t/null.test:
Updated test case (for bug#33699).
mysql-test/t/warnings.test:
Updated test case (for bug#33699).
sql/sql_update.cc:
Bug#33699: The mysql_update function has been modified to generate
an error when trying to set a NOT NULL field to NULL rather than
a warning in the set_field_to_null_with_conversions function.
tests/mysql_client_test.c:
Updated test case (for bug#33699).
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/ndb/r/ps_7ndb.result | 5 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result | 12 | ||||
-rw-r--r-- | mysql-test/suite/rpl/t/rpl_err_ignoredtable.test | 2 |
4 files changed, 9 insertions, 22 deletions
diff --git a/mysql-test/suite/ndb/r/ps_7ndb.result b/mysql-test/suite/ndb/r/ps_7ndb.result index 6e2e61bbc5e..3cbc1a0e76f 100644 --- a/mysql-test/suite/ndb/r/ps_7ndb.result +++ b/mysql-test/suite/ndb/r/ps_7ndb.result @@ -1286,12 +1286,11 @@ a b set @arg00=NULL; set @arg01=2; execute stmt1 using @arg00, @arg01; -Warnings: -Warning 1048 Column 'a' cannot be null +ERROR 23000: Column 'a' cannot be null select a,b from t1 order by a; a b -0 two 1 one +2 two 3 three 4 four set @arg00=0; diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result index af460ded1e7..d7fadfb13e3 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result @@ -454,9 +454,7 @@ f1 f2 f3 f4 update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null +update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3; ** Delete from Master ** @@ -1594,9 +1592,7 @@ f1 f2 f3 f4 update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null +update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3; ** Delete from Master ** @@ -2734,9 +2730,7 @@ f1 f2 f3 f4 update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null +update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3; ** Delete from Master ** diff --git a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result index f0613c16825..cd2aec999db 100644 --- a/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result @@ -454,9 +454,7 @@ f1 f2 f3 f4 update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null +update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3; ** Delete from Master ** @@ -1594,9 +1592,7 @@ f1 f2 f3 f4 update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null +update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3; ** Delete from Master ** @@ -2734,9 +2730,7 @@ f1 f2 f3 f4 update t31 set f5=555555555555555 where f3=6; update t31 set f2=2 where f3=2; update t31 set f1=NULL where f3=1; -update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3; -Warnings: -Warning 1048 Column 'f3' cannot be null +update t31 set f3=0, f27=NULL, f35='f35 new value' where f3=3; ** Delete from Master ** diff --git a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test index 4e06a6a7096..a36cfb11dae 100644 --- a/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test +++ b/mysql-test/suite/rpl/t/rpl_err_ignoredtable.test @@ -49,7 +49,7 @@ kill @id; drop table t2,t3; insert into t4 values (3),(4); connection master; ---error 0,1053,2013 +--error 0,1053,2013,1048 reap; connection master1; save_master_pos; |