mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into salvation.intern.azundris.com:/home/tnurnberg/21913/my51-21913
This commit is contained in:
commit
4b8526869f
7 changed files with 190 additions and 162 deletions
|
|
@ -253,7 +253,7 @@ create table t1(a char character set cp1251 default _koi8r 0xFF);
|
|||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` char(1) character set cp1251 default 'ÿ'
|
||||
`a` char(1) CHARACTER SET cp1251 DEFAULT 'ÿ'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
create table t1(a char character set latin1 default _cp1251 0xFF);
|
||||
|
|
|
|||
|
|
@ -432,22 +432,44 @@ ifnull( c,
|
|||
0 ) + 1;
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
1
|
||||
2
|
||||
select last_insert_id(0);
|
||||
last_insert_id(0)
|
||||
0
|
||||
insert into t2 ( a ) values ( 6 ) on duplicate key update c =
|
||||
ifnull( c,
|
||||
0 ) + 1;
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
0
|
||||
select * from t2;
|
||||
k a c
|
||||
1 6 1
|
||||
1 6 2
|
||||
2 7 NULL
|
||||
insert ignore into t2 values (null,6,1),(10,8,1);
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
1
|
||||
0
|
||||
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
|
||||
1 6 2
|
||||
2 7 NULL
|
||||
10 8 1
|
||||
11 15 1
|
||||
12 20 1
|
||||
insert into t2 ( a ) values ( 6 ) on duplicate key update c =
|
||||
ifnull( c,
|
||||
0 ) + 1, k=last_insert_id(k);
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
1
|
||||
select * from t2;
|
||||
k a c
|
||||
1 6 3
|
||||
2 7 NULL
|
||||
10 8 1
|
||||
11 15 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue