Commit 77330fe6 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  chilla.local:/home/mydev/mysql-5.0--main

parents b30c23af 3a520a78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1442,7 +1442,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1	SIMPLE	t1	ref	c	c	11	const	#	Using where
explain select count(*) from t1 where t='a  ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	t	t	13	NULL	#	Using where
1	SIMPLE	t1	ref	t	t	13	const	#	Using where
explain select count(*) from t1 where v like 'a%';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	v	v	13	NULL	#	Using where
+11 −0
Original line number Diff line number Diff line
@@ -123,3 +123,14 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1
master-bin.000001	#	Query	1	#	use `test`; insert into t1 select * from t3
master-bin.000001	#	Query	1	#	use `test`; replace into t1 select * from t3
drop table t1,t2,t3;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 ADD INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD UNIQUE INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE FROM t1 WHERE a=10;
DROP TABLE t1;
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ concat('|', text1, '|')
|teststring |
explain select concat('|', text1, '|') from t1 where text1='teststring ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	key1	key1	22	NULL	2	Using where
1	SIMPLE	t1	ref	key1	key1	22	const	2	Using where
select concat('|', text1, '|') from t1 where text1 like 'teststring_%';
concat('|', text1, '|')
|teststring	|
+1 −1
Original line number Diff line number Diff line
@@ -1991,7 +1991,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1	SIMPLE	t1	ref	c	c	11	const	#	Using where; Using index
explain select count(*) from t1 where t='a  ';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	t	t	13	NULL	#	Using where
1	SIMPLE	t1	ref	t	t	13	const	#	Using where
explain select count(*) from t1 where v like 'a%';
id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
1	SIMPLE	t1	range	v	v	13	NULL	#	Using where; Using index
+13 −0
Original line number Diff line number Diff line
@@ -731,3 +731,16 @@ select @@identity;
@@identity
0
drop table t1;
CREATE TABLE t1 (f1 INT, f2 INT );
CREATE TABLE t2  (f1 INT PRIMARY KEY, f2 INT);
INSERT INTO t1 VALUES (1,1),(2,2),(10,10);
INSERT INTO t2 (f1, f2) SELECT f1, f2 FROM t1;
INSERT INTO t2 (f1, f2)
SELECT f1, f1 FROM t2 src WHERE f1 < 2
ON DUPLICATE KEY UPDATE f1 = 100 + src.f1;
SELECT * FROM t2;
f1	f2
101	1
2	2
10	10
DROP TABLE t1, t2;
Loading