summaryrefslogtreecommitdiff
path: root/mysql-test/t/insert_update.test
diff options
context:
space:
mode:
authorHorst Hunger <horst@mysql.com>2008-09-10 12:50:39 +0200
committerHorst Hunger <horst@mysql.com>2008-09-10 12:50:39 +0200
commit1fc57773200240c9836e4bdd634d6fcc1ae32719 (patch)
treed1f4d655f8887b7cd2ec96c8afbbb8b13c97669f /mysql-test/t/insert_update.test
parent39315c3c1d753544b757e19ae565f782a24b9261 (diff)
downloadmariadb-git-1fc57773200240c9836e4bdd634d6fcc1ae32719.tar.gz
Final fix for bug#38349: Did the changes due to the 2 reviews.
- Updated slow_query_log_file_basic and general_log_file basis instead of the func version as the func version run good but the basic versions fail. - Sent innodb.test to dev@innodb.com. - variables.test has differences probably due to a bug in mtr or in the SET statement (see bug#39369). - general_log_file_basic.test and slow_query_log_file_bsaic.test have differences, which might be produced by the new mtr (see bug#38124).
Diffstat (limited to 'mysql-test/t/insert_update.test')
-rw-r--r--mysql-test/t/insert_update.test15
1 files changed, 8 insertions, 7 deletions
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test
index 67f21731afe..de38ae0b0d3 100644
--- a/mysql-test/t/insert_update.test
+++ b/mysql-test/t/insert_update.test
@@ -76,7 +76,7 @@ INSERT t1 SELECT a,b,c FROM t2 WHERE d=1 ON DUPLICATE KEY UPDATE c=t1.c+100;
SELECT * FROM t1;
INSERT t1 SET a=5 ON DUPLICATE KEY UPDATE b=0;
SELECT * FROM t1;
---error 1052
+--error ER_NON_UNIQ_ERROR
INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=t1.c+VALUES(t1.a);
SELECT *, VALUES(a) FROM t1;
@@ -95,9 +95,9 @@ insert ignore into t1 select a from t1 as t2 on duplicate key update a=t1.a+1 ;
select * from t1;
insert into t1 select 1 on duplicate key update a=2;
select * from t1;
---error 1052
+--error ER_NON_UNIQ_ERROR
insert into t1 select a from t1 on duplicate key update a=a+1 ;
---error 1052
+--error ER_NON_UNIQ_ERROR
insert ignore into t1 select a from t1 on duplicate key update a=t1.a+1 ;
drop table t1;
@@ -171,13 +171,13 @@ SET SQL_MODE = 'TRADITIONAL';
CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL);
---error 1364
+--error ER_NO_DEFAULT_FOR_FIELD
INSERT INTO t1 (a) VALUES (1);
---error 1364
+--error ER_NO_DEFAULT_FOR_FIELD
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE a = b;
---error 1364
+--error ER_NO_DEFAULT_FOR_FIELD
INSERT INTO t1 (a) VALUES (1) ON DUPLICATE KEY UPDATE b = b;
SELECT * FROM t1;
@@ -278,7 +278,7 @@ INSERT INTO t1 (id,c1) VALUES (1,10);
SELECT * FROM t1;
CREATE TABLE t2 (id INT, c1 INT);
INSERT INTO t2 VALUES (1,NULL), (2,2);
---error 1048
+--error ER_BAD_NULL_ERROR
INSERT INTO t1 (id,c1) SELECT 1,NULL
ON DUPLICATE KEY UPDATE c1=NULL;
SELECT * FROM t1;
@@ -290,6 +290,7 @@ INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2
SELECT * FROM t1;
DROP TABLE t1;
+DROP TABLE t2;
#
# Bug#28904: INSERT .. ON DUPLICATE was silently updating rows when it