1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge bk-internal:/home/bk/mysql-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt
This commit is contained in:
gkodinov/kgeorge@magare.gmz
2007-06-12 16:34:54 +03:00
12 changed files with 196 additions and 37 deletions

View File

@@ -290,3 +290,19 @@ INSERT IGNORE INTO t1 (id,c1) SELECT * FROM t2
SELECT * FROM t1;
DROP TABLE t1;
#
# Bug#28904: INSERT .. ON DUPLICATE was silently updating rows when it
# shouldn't.
#
create table t1(f1 int primary key,
f2 timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP);
insert into t1(f1) values(1);
--replace_column 1 #
select @stamp1:=f2 from t1;
--sleep 2
insert into t1(f1) values(1) on duplicate key update f1=1;
--replace_column 1 #
select @stamp2:=f2 from t1;
select if( @stamp1 = @stamp2, "correct", "wrong");
drop table t1;