mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 5.1-bugteam to 5.5-merge.
This commit is contained in:
@ -2546,6 +2546,64 @@ LOCK TABLES t1 READ;
|
||||
ALTER TABLE t1 COMMENT 'test';
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#55656: mysqldump can be slower after bug #39653 fix
|
||||
#
|
||||
CREATE TABLE t1 (a INT , b INT, c INT, d INT,
|
||||
KEY (b), PRIMARY KEY (a,b)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1,1,1,1), (2,2,2,2), (3,3,3,3);
|
||||
EXPLAIN SELECT COUNT(*) FROM t1;
|
||||
id 1
|
||||
select_type SIMPLE
|
||||
table t1
|
||||
type index
|
||||
possible_keys NULL
|
||||
key b
|
||||
key_len 4
|
||||
ref NULL
|
||||
rows 3
|
||||
Extra Using index
|
||||
DROP INDEX b ON t1;
|
||||
CREATE INDEX b ON t1(a,b);
|
||||
EXPLAIN SELECT COUNT(*) FROM t1;
|
||||
id 1
|
||||
select_type SIMPLE
|
||||
table t1
|
||||
type index
|
||||
possible_keys NULL
|
||||
key b
|
||||
key_len 8
|
||||
ref NULL
|
||||
rows 3
|
||||
Extra Using index
|
||||
DROP INDEX b ON t1;
|
||||
CREATE INDEX b ON t1(a,b,c);
|
||||
EXPLAIN SELECT COUNT(*) FROM t1;
|
||||
id 1
|
||||
select_type SIMPLE
|
||||
table t1
|
||||
type index
|
||||
possible_keys NULL
|
||||
key b
|
||||
key_len 13
|
||||
ref NULL
|
||||
rows 3
|
||||
Extra Using index
|
||||
DROP INDEX b ON t1;
|
||||
CREATE INDEX b ON t1(a,b,c,d);
|
||||
EXPLAIN SELECT COUNT(*) FROM t1;
|
||||
id 1
|
||||
select_type SIMPLE
|
||||
table t1
|
||||
type index
|
||||
possible_keys NULL
|
||||
key PRIMARY
|
||||
key_len 8
|
||||
ref NULL
|
||||
rows 3
|
||||
Extra Using index
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Test for bug #39932 "create table fails if column for FK is in different
|
||||
|
Reference in New Issue
Block a user