Commit 8ae4ebba authored by gkodinov/kgeorge@magare.gmz's avatar gkodinov/kgeorge@magare.gmz

Merge magare.gmz:/home/kgeorge/mysql/work/B28476-5.0-opt

into  magare.gmz:/home/kgeorge/mysql/work/B28476-5.1-opt

Zero merge all except the new test
parents 6870631e 604ef463
......@@ -1768,6 +1768,32 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1
drop table t1, t2, t3;
CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
a
1
ALTER TABLE t1 DISABLE KEYS;
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
a
1
SELECT a FROM t1 USE INDEX (inx) WHERE a=1;
a
1
SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1;
b
1
SELECT b FROM t1 USE INDEX (uinx) WHERE b=1;
b
1
SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1;
a
1
ALTER TABLE t1 ENABLE KEYS;
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
a
1
DROP TABLE t1;
End of 5.0 tests
create table t1 (a int not null, key `a` (a) key_block_size=1024);
show create table t1;
......
......@@ -1129,8 +1129,26 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2;
drop table t1, t2, t3;
#
# Bug#28476: force index on a disabled myisam index gives error 124
#
CREATE TABLE t1(a INT, b INT, KEY inx (a), UNIQUE KEY uinx (b)) ENGINE=MyISAM;
INSERT INTO t1(a,b) VALUES (1,1),(2,2),(3,3),(4,4),(5,5);
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
ALTER TABLE t1 DISABLE KEYS;
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
SELECT a FROM t1 USE INDEX (inx) WHERE a=1;
SELECT b FROM t1 FORCE INDEX (uinx) WHERE b=1;
SELECT b FROM t1 USE INDEX (uinx) WHERE b=1;
SELECT a FROM t1 FORCE INDEX (inx,uinx) WHERE a=1;
ALTER TABLE t1 ENABLE KEYS;
SELECT a FROM t1 FORCE INDEX (inx) WHERE a=1;
DROP TABLE t1;
--echo End of 5.0 tests
#
# Test of key_block_size
#
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment