Commit acd939c3 authored by unknown's avatar unknown

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


mysql-test/r/key.result:
  bug #28476: zero-merge to 5.1
mysql-test/r/myisam.result:
  bug #28476: merge to 5.1
mysql-test/t/key.test:
  bug #28476: zero-merge to 5.1
mysql-test/t/myisam.test:
  bug #28476: merge to 5.1
sql/sql_base.cc:
  bug #28476: zero-merge to 5.1
sql/sql_select.cc:
  bug #28476: zero-merge to 5.1
sql/table.h:
  bug #28476: zero-merge to 5.1
parents 6ae6d268 3332b801
...@@ -1768,6 +1768,32 @@ create table t3 (c1 int) engine=myisam pack_keys=default; ...@@ -1768,6 +1768,32 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2; 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 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; 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 End of 5.0 tests
create table t1 (a int not null, key `a` (a) key_block_size=1024); create table t1 (a int not null, key `a` (a) key_block_size=1024);
show create table t1; show create table t1;
......
...@@ -1129,8 +1129,26 @@ create table t3 (c1 int) engine=myisam pack_keys=default; ...@@ -1129,8 +1129,26 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2; create table t4 (c1 int) engine=myisam pack_keys=2;
drop table t1, t2, t3; 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 --echo End of 5.0 tests
# #
# Test of key_block_size # 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