⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 merge.test

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 TEST
📖 第 1 页 / 共 2 页
字号:
EXPLAIN SELECT * FROM t2 WHERE fileset_id = 2AND file_code = '0000000115' LIMIT 1;DROP TABLE t2, t1;## Test of ORDER BY DESC on key (Bug #515)#create table t1 (x int, y int, index xy(x, y));create table t2 (x int, y int, index xy(x, y));create table t3 (x int, y int, index xy(x, y)) engine=merge union=(t1,t2);insert into t1 values(1, 2);insert into t2 values(1, 3);select * from t3 where x = 1 and y < 5 order by y;# Bug is that followng query returns empty set while it must be same as aboveselect * from t3 where x = 1 and y < 5 order by y desc;drop table t1,t2,t3;## Bug#5232: CREATE TABLE ... SELECT#create table t1 (a int);create table t2 (a int);insert into t1 values (0);insert into t2 values (1);--error 1093create table t3 engine=merge union=(t1, t2) select * from t1;--error 1093create table t3 engine=merge union=(t1, t2) select * from t2;--error 1093create table t3 engine=merge union=(t1, t2) select (select max(a) from t2);drop table t1, t2;## Bug#9112 - Merge table with composite index producing invalid results with some queries# This test case will fail only without the bugfix and some# non-deterministic circumstances. It depends on properly initialized# "un-initialized" memory. At the time it happens with a standard# non-debug build. But there is no guarantee that this will be always so.#create table t1 ( a double(14,4), b varchar(10), index (a,b)) engine=merge union=(t2,t3);create table t2 ( a double(14,4), b varchar(10), index (a,b)) engine=myisam;create table t3 ( a double(14,4), b varchar(10), index (a,b)) engine=myisam;insert into t2 values ( null, '');insert into t2 values ( 9999999999.999, '');insert into t3 select * from t2;select min(a), max(a) from t1;flush tables;select min(a), max(a) from t1;drop table t1, t2, t3;# BUG#6699 : no sorting on 'ref' retrieval create table t1 (a int,b int,c int, index (a,b,c));create table t2 (a int,b int,c int, index (a,b,c));create table t3 (a int,b int,c int, index (a,b,c))  engine=merge union=(t1 ,t2);insert into t1 (a,b,c) values (1,1,0),(1,2,0);insert into t2 (a,b,c) values (1,1,1),(1,2,1);explain select a,b,c from t3 force index (a) where a=1 order by a,b,c;select a,b,c from t3 force index (a) where a=1 order by a,b,c;# this actually wasn't affected:explain select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;select a,b,c from t3 force index (a) where a=1 order by a desc, b desc, c desc;# BUG#7377 SHOW index on MERGE table crashes debug servershow index from t3;drop table t1, t2, t3;## Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE#CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), UNIQUE (b) )  ENGINE=MyISAM;CREATE TABLE t2 ( a INT AUTO_INCREMENT, b VARCHAR(10), INDEX (a), INDEX (b) )  ENGINE=MERGE UNION (t1) INSERT_METHOD=FIRST;INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=2;INSERT INTO t2 (b) VALUES (1) ON DUPLICATE KEY UPDATE b=3;SELECT b FROM t2;DROP TABLE t1, t2;## BUG#5390 - problems with merge tables# Problem #1: INSERT...SELECT##drop table if exists t1, t2, t3;create table t1(a int);create table t2(a int);insert into t1 values (1);insert into t2 values (2);create table t3 (a int) engine=merge union=(t1, t2) insert_method=first;select * from t3;#insert t2 select * from t2;select * from t2;#insert t3 select * from t1;select * from t3;#insert t1 select * from t3;select * from t1;select * from t2;select * from t3;check table t1, t2;drop table t1, t2, t3;## BUG#21617 - crash when selecting from merge table with inconsistent# indexes#CREATE TABLE t1(a INT);INSERT INTO t1 VALUES(2),(1);CREATE TABLE t2(a INT, KEY(a)) ENGINE=MERGE UNION=(t1);--error 1168SELECT * FROM t2 WHERE a=2;DROP TABLE t1, t2;## BUG#10974 - No error message if merge table based on union of innodb,# memory#CREATE TABLE t1(a INT) ENGINE=MEMORY;CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t1);--error 1168SELECT * FROM t2;DROP TABLE t1, t2;CREATE TABLE t2(a INT) ENGINE=MERGE UNION=(t3);--error 1168SELECT * FROM t2;DROP TABLE t2;## Underlying table definition conformance tests.#CREATE TABLE t1(a INT, b TEXT);CREATE TABLE tm1(a TEXT, b INT) ENGINE=MERGE UNION=(t1);--error 1168SELECT * FROM tm1;DROP TABLE t1, tm1;CREATE TABLE t1(a SMALLINT, b SMALLINT);CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1);--error 1168SELECT * FROM tm1;DROP TABLE t1, tm1;CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(a, b));CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);--error 1168SELECT * FROM tm1;DROP TABLE t1, tm1;CREATE TABLE t1(a SMALLINT, b SMALLINT, KEY(b));CREATE TABLE tm1(a SMALLINT, b SMALLINT, KEY(a)) ENGINE=MERGE UNION=(t1);--error 1168SELECT * FROM tm1;DROP TABLE t1, tm1;# BUG#26881 - Large MERGE tables report incorrect specification when no#             differences in tables#CREATE TABLE t1(c1 VARCHAR(1));CREATE TABLE m1 LIKE t1;ALTER TABLE m1 ENGINE=MERGE UNION=(t1);SELECT * FROM m1;DROP TABLE t1, m1;CREATE TABLE t1(c1 VARCHAR(4), c2 TINYINT, c3 TINYINT, c4 TINYINT,                c5 TINYINT, c6 TINYINT, c7 TINYINT, c8 TINYINT, c9 TINYINT);CREATE TABLE m1 LIKE t1;ALTER TABLE m1 ENGINE=MERGE UNION=(t1);SELECT * FROM m1;DROP TABLE t1, m1;## BUG#24342 - Incorrect results with query over MERGE table#CREATE TABLE t1 (a VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_german2_ci,                 b INT, INDEX(a,b));CREATE TABLE t2 LIKE t1;CREATE TABLE t3 LIKE t1;ALTER TABLE t3 ENGINE=MERGE UNION=(t1,t2);INSERT INTO t1 VALUES ('ss',1);INSERT INTO t2 VALUES ('ss',2),(0xDF,2);SELECT COUNT(*) FROM t3 WHERE a=0xDF AND b=2;DROP TABLE t1,t2,t3;# End of 4.1 tests## BUG#19648 - Merge table does not work with bit types#create table t1 (b bit(1));create table t2 (b bit(1));create table tm (b bit(1)) engine = merge union = (t1,t2);select * from tm;drop table tm, t1, t2;## Bug #17766: The server accepts to create MERGE tables which cannot work#create table t1 (a int) insert_method = last engine = merge;--error ER_OPEN_AS_READONLYinsert into t1 values (1);create table t2 (a int) engine = myisam;alter table t1 union (t2);insert into t1 values (1);alter table t1 insert_method = no;--error ER_OPEN_AS_READONLYinsert into t1 values (1);drop table t2;drop table t1;## BUG#26976 - Missing table in merge not noted in related error msg + SHOW#             CREATE TABLE fails#CREATE TABLE tm1(a INT) ENGINE=MERGE UNION=(t1, t2);--error 1168SELECT * FROM tm1;CHECK TABLE tm1;CREATE TABLE t1(a INT);--error 1168SELECT * FROM tm1;CHECK TABLE tm1;CREATE TABLE t2(a BLOB);--error 1168SELECT * FROM tm1;CHECK TABLE tm1;ALTER TABLE t2 MODIFY a INT;SELECT * FROM tm1;CHECK TABLE tm1;DROP TABLE tm1, t1, t2;--echo End of 5.0 tests

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -