mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b2885
This commit is contained in:
@ -67,3 +67,41 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
Warnings:
|
||||
Note 1003 select high_priority test.t1.a AS `a`,test.t1.b AS `b`,test.t1.c AS `c` from test.t1
|
||||
DROP TABLE t1;
|
||||
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;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 4
|
||||
5 5
|
||||
insert into t1 values(4,14),(5,15),(6,16),(7,17),(8,18)
|
||||
on duplicate key update b=b+10;
|
||||
affected rows: 7
|
||||
info: Records: 5 Duplicates: 2 Warnings: 0
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 14
|
||||
5 15
|
||||
6 16
|
||||
7 17
|
||||
8 18
|
||||
replace into t1 values(5,25),(6,26),(7,27),(8,28),(9,29);
|
||||
affected rows: 9
|
||||
info: Records: 5 Duplicates: 4 Warnings: 0
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
4 14
|
||||
5 25
|
||||
6 26
|
||||
7 27
|
||||
8 28
|
||||
9 29
|
||||
drop table t1;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user