diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2004-03-15 21:36:16 +0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2004-03-15 21:36:16 +0400 |
commit | 1d3b16335a824df832bb94c447248cef925bdfaf (patch) | |
tree | 0cf15fc15f8655c51809614f856f64a00c8abb5a /mysql-test/t/insert_update.test | |
parent | 1b81fcf8ca993a4aac88492f1332868b0fea9233 (diff) | |
download | mariadb-git-1d3b16335a824df832bb94c447248cef925bdfaf.tar.gz |
actions for bug
#2709 Affected Rows for ON DUPL. KEY undocumented, perheps illogical
1. added COPY_INFO::updated to work with it in
'insert .. on duplicate' instead of COPY_INFO::deleted
2. added affected rows to output of "info:" in mysqltest.c
client/mysqltest.c:
added "affected rows" to output of "info : "..
mysql-test/r/insert_update.result:
added tests for affected rows with insert .. duplicate (bug #2709)
mysql-test/t/insert_update.test:
added tests for affected rows with insert .. duplicate (bug #2709)
sql/sql_class.h:
added COPY_INFO::updated
sql/sql_insert.cc:
get write_record to work with COPY_INFO::updated instead of
COPY_INFO::deleted for 'insert ... duplicate' statement
Diffstat (limited to 'mysql-test/t/insert_update.test')
-rw-r--r-- | mysql-test/t/insert_update.test | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test index 550bce867cd..d2a70208022 100644 --- a/mysql-test/t/insert_update.test +++ b/mysql-test/t/insert_update.test @@ -26,3 +26,25 @@ SELECT *, VALUES(a) FROM t1; explain extended SELECT *, VALUES(a) FROM t1; explain extended select * from t1 where values(a); DROP TABLE t1; + +# +# test for Bug #2709 "Affected Rows for ON DUPL.KEY undocumented, +# perhaps illogical" +# +create table t1(a int primary key, b int); +insert into t1 values(1,1),(2,2),(3,3),(4,4),(5,5); +select * from t1; + +enable_info; +insert into t1 values(4,14),(5,15),(6,16),(7,17),(8,18) + on duplicate key update b=b+10; +disable_info; + +select * from t1; + +enable_info; +replace into t1 values(5,25),(6,26),(7,27),(8,28),(9,29); +disable_info; + +select * from t1; +drop table t1; |