mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/merge-5.1-opt mysql-test/r/insert_update.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/t/insert_update.test: Auto merged mysql-test/t/trigger.test: Auto merged sql/item_strfunc.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_show.cc: Auto merged sql/item_func.cc: merge of 5.0-opt -> 5.1-opt sql/sql_insert.cc: merge of 5.0-opt -> 5.1-opt sql/structs.h: merge of 5.0-opt -> 5.1-opt tests/mysql_client_test.c: merge of 5.0-opt -> 5.1-opt
This commit is contained in:
@ -393,3 +393,17 @@ id c1 cnt
|
||||
1 0 3
|
||||
2 2 1
|
||||
DROP TABLE t1;
|
||||
create table t1(f1 int primary key,
|
||||
f2 timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP);
|
||||
insert into t1(f1) values(1);
|
||||
select @stamp1:=f2 from t1;
|
||||
@stamp1:=f2
|
||||
#
|
||||
insert into t1(f1) values(1) on duplicate key update f1=1;
|
||||
select @stamp2:=f2 from t1;
|
||||
@stamp2:=f2
|
||||
#
|
||||
select if( @stamp1 = @stamp2, "correct", "wrong");
|
||||
if( @stamp1 = @stamp2, "correct", "wrong")
|
||||
correct
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user