1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge maint2.mysql.com:/data/localhome/tsmith/bk/g51

into  maint2.mysql.com:/data/localhome/tsmith/bk/51
This commit is contained in:
tsmith@maint2.mysql.com
2006-09-04 23:05:17 +02:00
73 changed files with 1722 additions and 1345 deletions

View File

@ -407,3 +407,49 @@ Warnings:
Warning 1071 Specified key was too long; max key length is 765 bytes
insert into t1 values('aaa');
drop table t1;
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
`a` int(11) default NULL,
`c` int(11) default NULL,
PRIMARY KEY (`k`),
UNIQUE KEY `idx_1` (`a`)
) ENGINE=InnoDB;
insert into t2 ( a ) values ( 6 ) on duplicate key update c =
ifnull( c,
0 ) + 1;
insert into t2 ( a ) values ( 7 ) on duplicate key update c =
ifnull( c,
0 ) + 1;
select last_insert_id();
last_insert_id()
2
select * from t2;
k a c
1 6 NULL
2 7 NULL
insert into t2 ( a ) values ( 6 ) on duplicate key update c =
ifnull( c,
0 ) + 1;
select last_insert_id();
last_insert_id()
1
select * from t2;
k a c
1 6 1
2 7 NULL
insert ignore into t2 values (null,6,1),(10,8,1);
select last_insert_id();
last_insert_id()
1
insert ignore into t2 values (null,6,1),(null,8,1),(null,15,1),(null,20,1);
select last_insert_id();
last_insert_id()
11
select * from t2;
k a c
1 6 1
2 7 NULL
10 8 1
11 15 1
12 20 1
drop table t2;