|
|
|
@ -2025,7 +2025,6 @@ TABLE_SCHEMA = 'test' and TABLE_NAME='tm1'; |
|
|
|
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT |
|
|
|
NULL test tm1 BASE TABLE NULL NULL NULL # # # # # # # # # # NULL # # Unable to open underlying table which is differently defined or of non-MyISAM ty |
|
|
|
DROP TABLE tm1; |
|
|
|
End of 5.1 tests |
|
|
|
CREATE TABLE t1(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM; |
|
|
|
CREATE TABLE t2(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM; |
|
|
|
CREATE TABLE t3(C1 INT, C2 INT, KEY C1(C1), KEY C2(C2)) ENGINE=MYISAM; |
|
|
|
@ -2060,4 +2059,48 @@ SELECT CARDINALITY FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_SCHEMA='test' |
|
|
|
CARDINALITY |
|
|
|
5 |
|
|
|
DROP TABLE t1, m1; |
|
|
|
# |
|
|
|
# Bug #40675 MySQL 5.1 crash with index merge algorithm and Merge tables |
|
|
|
# |
|
|
|
# create MYISAM table t1 and insert values into it |
|
|
|
CREATE TABLE t1(a INT); |
|
|
|
INSERT INTO t1 VALUES(1); |
|
|
|
# create MYISAM table t2 and insert values into it |
|
|
|
CREATE TABLE t2(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b)); |
|
|
|
INSERT INTO t2(a,b) VALUES |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0),(0,0), |
|
|
|
(1,2); |
|
|
|
# Create the merge table t3 |
|
|
|
CREATE TABLE t3(a INT, b INT, dummy CHAR(16) DEFAULT '', KEY(a), KEY(b)) |
|
|
|
ENGINE=MERGE UNION=(t2) INSERT_METHOD=FIRST; |
|
|
|
# Lock tables t1 and t3 for write |
|
|
|
LOCK TABLES t1 WRITE, t3 WRITE; |
|
|
|
# Insert values into the merge table t3 |
|
|
|
INSERT INTO t3(a,b) VALUES(1,2); |
|
|
|
# select from the join of t2 and t3 (The merge table) |
|
|
|
SELECT t3.a FROM t1,t3 WHERE t3.b=2 AND t3.a=1; |
|
|
|
a |
|
|
|
1 |
|
|
|
1 |
|
|
|
# Unlock the tables |
|
|
|
UNLOCK TABLES; |
|
|
|
# drop the created tables |
|
|
|
DROP TABLE t1, t2, t3; |
|
|
|
End of 5.1 tests |