diff options
author | unknown <serg@serg.mysql.com> | 2002-12-02 22:04:26 +0100 |
---|---|---|
committer | unknown <serg@serg.mysql.com> | 2002-12-02 22:04:26 +0100 |
commit | 930b3fa897112c49392c2154de1ec21b9e44edda (patch) | |
tree | a2689c01c28af5f92997e022b7c2955942ed5a17 /mysql-test/t/insert_update.test | |
parent | 6c4519e8db142c8a0ea9db71c140e17a03fa0993 (diff) | |
download | mariadb-git-930b3fa897112c49392c2154de1ec21b9e44edda.tar.gz |
it's INSERT ... ON DUPLICATE KEY UPDATE , not INSERT ON DUPLICATE KEY UPDATE SET
Diffstat (limited to 'mysql-test/t/insert_update.test')
-rw-r--r-- | mysql-test/t/insert_update.test | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test index cd92999ece8..6c92774113a 100644 --- a/mysql-test/t/insert_update.test +++ b/mysql-test/t/insert_update.test @@ -1,21 +1,21 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a INT, b INT, c INT, UNIQUE (A), UNIQUE(B)); INSERT t1 VALUES (1,2,10), (3,4,20); -INSERT t1 VALUES (5,6,30) ON DUPLICATE KEY UPDATE SET c=c+100; +INSERT t1 VALUES (5,6,30) ON DUPLICATE KEY UPDATE c=c+100; SELECT * FROM t1; -INSERT t1 VALUES (5,7,40) ON DUPLICATE KEY UPDATE SET c=c+100; +INSERT t1 VALUES (5,7,40) ON DUPLICATE KEY UPDATE c=c+100; SELECT * FROM t1; -INSERT t1 VALUES (8,4,50) ON DUPLICATE KEY UPDATE SET c=c+1000; +INSERT t1 VALUES (8,4,50) ON DUPLICATE KEY UPDATE c=c+1000; SELECT * FROM t1; -INSERT t1 VALUES (1,4,60) ON DUPLICATE KEY UPDATE SET c=c+10000; +INSERT t1 VALUES (1,4,60) ON DUPLICATE KEY UPDATE c=c+10000; SELECT * FROM t1; -- error 1062 -INSERT t1 VALUES (1,9,70) ON DUPLICATE KEY UPDATE SET c=c+100000, b=4; +INSERT t1 VALUES (1,9,70) ON DUPLICATE KEY UPDATE c=c+100000, b=4; SELECT * FROM t1; TRUNCATE TABLE t1; INSERT t1 VALUES (1,2,10), (3,4,20); -INSERT t1 VALUES (5,6,30), (7,4,40), (8,9,60) ON DUPLICATE KEY UPDATE SET c=c+100; +INSERT t1 VALUES (5,6,30), (7,4,40), (8,9,60) ON DUPLICATE KEY UPDATE c=c+100; SELECT * FROM t1; -INSERT t1 SET a=5 ON DUPLICATE KEY UPDATE SET b=0; +INSERT t1 SET a=5 ON DUPLICATE KEY UPDATE b=0; SELECT * FROM t1; DROP TABLE t1; |