summaryrefslogtreecommitdiff
path: root/mysql-test/r/insert_update.result
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@hfmain.(none)>2007-05-11 17:48:20 +0500
committerunknown <holyfoot/hf@hfmain.(none)>2007-05-11 17:48:20 +0500
commit62db8d6db5366850691e7c5ead13417c55f7271f (patch)
treeb0d602acfe8228c733fde1a7ca89a2425a65fd9f /mysql-test/r/insert_update.result
parentf4ded1f2a1983f36b928265537c1e8c9867b8add (diff)
parent563b1297bbeef6f162513be314676d0d2c39b4a9 (diff)
downloadmariadb-git-62db8d6db5366850691e7c5ead13417c55f7271f.tar.gz
Merge mysql.com:/home/hf/work/27957/my50-27957
into mysql.com:/home/hf/work/27957/my51-27957 mysql-test/r/insert_update.result: Auto merged mysql-test/t/insert_update.test: Auto merged sql/item_func.cc: Auto merged sql/sql_insert.cc: Auto merged mysql-test/include/mix1.inc: merging mysql-test/r/innodb_mysql.result: SCCS merged sql/sql_select.cc: merging
Diffstat (limited to 'mysql-test/r/insert_update.result')
-rw-r--r--mysql-test/r/insert_update.result35
1 files changed, 35 insertions, 0 deletions
diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result
index 98e6878482b..f6a9c2505b9 100644
--- a/mysql-test/r/insert_update.result
+++ b/mysql-test/r/insert_update.result
@@ -358,3 +358,38 @@ id c1 cnt
5 Y 1
6 Z 1
DROP TABLE t1;
+CREATE TABLE t1 (
+id INT AUTO_INCREMENT PRIMARY KEY,
+c1 INT NOT NULL,
+cnt INT DEFAULT 1
+);
+INSERT INTO t1 (id,c1) VALUES (1,10);
+SELECT * FROM t1;
+id c1 cnt
+1 10 1
+CREATE TABLE t2 (id INT, c1 INT);
+INSERT INTO t2 VALUES (1,NULL), (2,2);
+INSERT INTO t1 (id,c1) SELECT 1,NULL
+ON DUPLICATE KEY UPDATE c1=NULL;
+ERROR 23000: Column 'c1' cannot be null
+SELECT * FROM t1;
+id c1 cnt
+1 10 1
+INSERT IGNORE INTO t1 (id,c1) SELECT 1,NULL
+ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1;
+Warnings:
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1
+Error 1048 Column 'c1' cannot be null
+SELECT * FROM t1;
+id c1 cnt
+1 0 2
+INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2
+ON DUPLICATE KEY UPDATE c1=NULL, cnt=cnt+1;
+Warnings:
+Warning 1263 Column was set to data type implicit default; NULL supplied for NOT NULL column 'c1' at row 1
+Error 1048 Column 'c1' cannot be null
+SELECT * FROM t1;
+id c1 cnt
+1 0 3
+2 2 1
+DROP TABLE t1;