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

📄 range.test

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 TEST
📖 第 1 页 / 共 3 页
字号:
            "abcdefg5", "123456785", "qwertyui5", "asddfg5",             "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") and c5 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",             "abcdefg1", "123456781", "qwertyui1", "asddfg1",             "abcdefg2", "123456782", "qwertyui2", "asddfg2",             "abcdefg3", "123456783", "qwertyui3", "asddfg3",             "abcdefg4", "123456784", "qwertyui4", "asddfg4",            "abcdefg5", "123456785", "qwertyui5", "asddfg5",            "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") and c6 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",             "abcdefg1", "123456781", "qwertyui1", "asddfg1",             "abcdefg2", "123456782", "qwertyui2", "asddfg2",             "abcdefg3", "123456783", "qwertyui3", "asddfg3",             "abcdefg4", "123456784", "qwertyui4", "asddfg4",            "abcdefg5", "123456785", "qwertyui5", "asddfg5",            "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") and c7 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",             "abcdefg1", "123456781", "qwertyui1", "asddfg1",             "abcdefg2", "123456782", "qwertyui2", "asddfg2",             "abcdefg3", "123456783", "qwertyui3", "asddfg3",             "abcdefg4", "123456784", "qwertyui4", "asddfg4",             "abcdefg5", "123456785", "qwertyui5", "asddfg5",            "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") and c8 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",             "abcdefg1", "123456781", "qwertyui1", "asddfg1",             "abcdefg2", "123456782", "qwertyui2", "asddfg2",             "abcdefg3", "123456783", "qwertyui3", "asddfg3",             "abcdefg4", "123456784", "qwertyui4", "asddfg4",             "abcdefg5", "123456785", "qwertyui5", "asddfg5",            "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") and c9 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",             "abcdefg1", "123456781", "qwertyui1", "asddfg1",             "abcdefg2", "123456782", "qwertyui2", "asddfg2",             "abcdefg3", "123456783", "qwertyui3", "asddfg3",             "abcdefg4", "123456784", "qwertyui4", "asddfg4",             "abcdefg5", "123456785", "qwertyui5", "asddfg5",            "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC") and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",             "abcdefg1", "123456781", "qwertyui1", "asddfg1",             "abcdefg2", "123456782", "qwertyui2", "asddfg2",             "abcdefg3", "123456783", "qwertyui3", "asddfg3",             "abcdefg4", "123456784", "qwertyui4", "asddfg4",             "abcdefg5", "123456785", "qwertyui5", "asddfg5",            "abcdefg6", "123456786", "qwertyui6", "asddfg6",            "abcdefg7", "123456787", "qwertyui7", "asddfg7",            "abcdefg8", "123456788", "qwertyui8", "asddfg8",            "abcdefg9", "123456789", "qwertyui9", "asddfg9",            "abcdefgA", "12345678A", "qwertyuiA", "asddfgA",            "abcdefgB", "12345678B", "qwertyuiB", "asddfgB",            "abcdefgC", "12345678C", "qwertyuiC", "asddfgC");drop table t1;--echo End of 4.1 tests## Test for optimization request #10561: to use keys for# NOT IN (c1,...,cn) and NOT BETWEEN c1 AND c2#CREATE TABLE t1 (  id int(11) NOT NULL auto_increment,  status varchar(20),  PRIMARY KEY  (id),  KEY (status));INSERT INTO t1 VALUES(1,'B'), (2,'B'), (3,'B'), (4,'B'), (5,'B'), (6,'B'),(7,'B'), (8,'B'), (9,'B'), (10,'B'), (11,'B'), (12,'B'),(13,'B'), (14,'B'), (15,'B'), (16,'B'), (17,'B'), (18,'B'),(19,'B'), (20,'B'), (21,'B'), (22,'B'), (23,'B'), (24,'B'), (25,'A'), (26,'A'), (27,'A'), (28,'A'), (29,'A'), (30,'A'),(31,'A'), (32,'A'), (33,'A'), (34,'A'), (35,'A'), (36,'A'),(37,'A'), (38,'A'), (39,'A'), (40,'A'), (41,'A'), (42,'A'),(43,'A'), (44,'A'), (45,'A'), (46,'A'), (47,'A'), (48,'A'),(49,'A'), (50,'A'), (51,'A'), (52,'A'), (53,'C'), (54,'C'),(55,'C'), (56,'C'), (57,'C'), (58,'C'), (59,'C'), (60,'C');EXPLAIN SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';EXPLAIN SELECT * FROM t1 WHERE status NOT IN ('A','B');SELECT * FROM t1 WHERE status <> 'A' AND status <> 'B';SELECT * FROM t1 WHERE status NOT IN ('A','B');EXPLAIN SELECT status FROM t1 WHERE status <> 'A' AND status <> 'B';EXPLAIN SELECT status FROM t1 WHERE status NOT IN ('A','B');EXPLAIN SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';EXPLAIN SELECT * FROM t1 WHERE status < 'A' OR status > 'B';SELECT * FROM t1 WHERE status NOT BETWEEN 'A' AND 'B';SELECT * FROM t1 WHERE status < 'A' OR status > 'B';DROP TABLE t1;## Test for bug #10031: range to be used over a view#CREATE TABLE  t1 (a int, b int, primary key(a,b));INSERT INTO  t1 VALUES  (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3),(4,1),(4,2),(4,3);CREATE VIEW v1 as SELECT a,b FROM t1 WHERE b=3;EXPLAIN SELECT a,b FROM t1 WHERE a < 2 and b=3;EXPLAIN SELECT a,b FROM v1 WHERE a < 2 and b=3;EXPLAIN SELECT a,b FROM t1 WHERE a < 2;EXPLAIN SELECT a,b FROM v1 WHERE a < 2;SELECT a,b FROM t1 WHERE a < 2 and b=3;SELECT a,b FROM v1 WHERE a < 2 and b=3; DROP VIEW v1;DROP TABLE t1;## Bug #11853: DELETE statement with a NOT (LIKE/<=>) where condition#             for an indexed attribute              #             CREATE TABLE t1 (name varchar(15) NOT NULL, KEY idx(name));INSERT INTO t1 VALUES ('Betty'), ('Anna');SELECT * FROM t1;DELETE FROM t1 WHERE name NOT LIKE 'A%a';SELECT * FROM t1;DROP TABLE t1;CREATE TABLE t1 (a int, KEY idx(a));INSERT INTO t1 VALUES (NULL), (1), (2), (3);SELECT * FROM t1;DELETE FROM t1 WHERE NOT(a <=> 2);SELECT * FROM t1;DROP TABLE t1;## BUG#13317: range optimization doesn't work for IN over VIEW.#create table t1 (a int, b int, primary key(a,b));create view v1 as select a, b from t1;INSERT INTO `t1` VALUES(0,0),(1,0),(2,0),(3,0),(4,0),(5,1),(6,1),(7,1),(8,1),(9,1),(10,2),(11,2),(12,2),(13,2),(14,2),(15,3),(16,3),(17,3),(18,3),(19,3);--replace_column 9 #explain select * from t1 where a in (3,4)  and b in (1,2,3);--replace_column 9 #explain select * from v1 where a in (3,4)  and b in (1,2,3);--replace_column 9 #explain select * from t1 where a between 3 and 4 and b between 1 and 2;--replace_column 9 #explain select * from v1 where a between 3 and 4 and b between 1 and 2; drop view v1;drop table t1;# BUG#13455: create table t3 (a int);insert into t3 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);create table t1 (a varchar(10), filler char(200), key(a)) charset=binary;insert into t1 values ('a','');insert into t1 values ('a ','');insert into t1 values ('a  ', '');insert into t1 select concat('a', 1000 + A.a + 10 * (B.a + 10 * C.a)), ''  from t3 A, t3 B, t3 C;create table t2 (a varchar(10), filler char(200), key(a));insert into t2 select * from t1;--replace_column 9 #explain select * from t1 where a between 'a' and 'a '; --replace_column 9 #explain select * from t1 where a = 'a' or a='a ';--replace_column 9 #explain select * from t2 where a between 'a' and 'a '; --replace_column 9 #explain select * from t2 where a = 'a' or a='a ';update t1 set a='b' where a<>'a';--replace_column 9 #explain select * from t1 where a not between 'b' and 'b'; select a, hex(filler) from t1 where a not between 'b' and 'b'; drop table t1,t2,t3;## BUG#21282#create table t1 (a int);insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);create table t2 (a int, key(a));insert into t2 select 2*(A.a + 10*(B.a + 10*C.a)) from t1 A, t1 B, t1 C;set @a="select * from t2 force index (a) where a NOT IN(0";select count(*) from (select @a:=concat(@a, ',', a) from t2 ) Z;set @a=concat(@a, ')');insert into t2 values (11),(13),(15);set @b= concat("explain ", @a);prepare stmt1 from @b;execute stmt1;prepare stmt1 from @a;execute stmt1;drop table t1, t2;## Bug #18165: range access for BETWEEN with a constant for the first argument #CREATE TABLE t1 (  id int NOT NULL DEFAULT '0',  b int NOT NULL DEFAULT '0',  c int NOT NULL DEFAULT '0',   INDEX idx1(b,c), INDEX idx2(c));INSERT INTO t1(id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);INSERT INTO t1(b,c) VALUES (3,4), (3,4);SELECT * FROM t1 WHERE b<=3 AND 3<=c;SELECT * FROM t1 WHERE 3 BETWEEN b AND c;EXPLAIN  SELECT * FROM t1 WHERE b<=3 AND 3<=c;EXPLAIN  SELECT * FROM t1 WHERE 3 BETWEEN b AND c;SELECT * FROM t1 WHERE 0 < b OR 0 > c;SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;EXPLAIN SELECT * FROM t1 WHERE 0 < b OR 0 > c;EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;DROP TABLE t1;## Bug #16249: different results for a range with an without index #             when a range condition use an invalid datetime constant #CREATE TABLE t1 (                                        item char(20) NOT NULL default '',                            started datetime NOT NULL default '0000-00-00 00:00:00',   price decimal(16,3) NOT NULL default '0.000',                   PRIMARY KEY (item,started)                     ) ENGINE=MyISAM;   INSERT INTO t1 VALUES('A1','2005-11-01 08:00:00',1000),('A1','2005-11-15 00:00:00',2000),('A1','2005-12-12 08:00:00',3000),('A2','2005-12-01 08:00:00',1000);EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';DROP INDEX `PRIMARY` ON t1;EXPLAIN SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';DROP TABLE t1;# End of 5.0 tests

⌨️ 快捷键说明

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