diff options
Diffstat (limited to 'storage/connect/mysql-test')
-rw-r--r-- | storage/connect/mysql-test/connect/r/mysql_index.result | 13 | ||||
-rw-r--r-- | storage/connect/mysql-test/connect/t/mysql_index.test | 3 |
2 files changed, 14 insertions, 2 deletions
diff --git a/storage/connect/mysql-test/connect/r/mysql_index.result b/storage/connect/mysql-test/connect/r/mysql_index.result index 54acc7be08d..b6c34add632 100644 --- a/storage/connect/mysql-test/connect/r/mysql_index.result +++ b/storage/connect/mysql-test/connect/r/mysql_index.result @@ -7,7 +7,7 @@ msg char(100) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES(1,'Un'),(3,'Trois'),(5,'Cinq'); -INSERT INTO t1 VALUES(2,'Two'),(4,'Four'),(6,'Six'); +INSERT INTO t1 VALUES(2,'Two'),(4,'Four'),(6,'Six'), (7,'seven'); SELECT * FROM t1; id msg 1 Un @@ -16,6 +16,7 @@ id msg 2 Two 4 Four 6 Six +7 seven # # Make local MYSQL table with indexed id column # @@ -35,6 +36,7 @@ id msg 2 Two 4 Four 6 Six +7 seven SELECT * FROM t2 WHERE id = 3; id msg 3 Trois @@ -49,12 +51,14 @@ SELECT * FROM t2 WHERE id > 4; id msg 5 Cinq 6 Six +7 seven SELECT * FROM t2 WHERE id >= 3; id msg 3 Trois 4 Four 5 Cinq 6 Six +7 seven SELECT * FROM t2 WHERE id < 3; id msg 1 Un @@ -64,6 +68,10 @@ id msg 1 Un 5 Cinq 6 Six +7 seven +explain SELECT * FROM t2 WHERE id <= 3; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where SELECT * FROM t2 WHERE id <= 3; id msg 1 Un @@ -87,6 +95,7 @@ id msg 4 Four 5 Cinq 6 Six +7 seven UPDATE t2 SET msg = 'Five' WHERE id = 5; Warnings: Note 1105 t1: 1 affected rows @@ -98,6 +107,7 @@ id msg 2 Two 4 Four 6 Six +7 seven DELETE FROM t2 WHERE id = 4; Warnings: Note 1105 t1: 1 affected rows @@ -108,6 +118,7 @@ id msg 5 Five 2 Two 6 Six +7 seven DROP TABLE t2; DROP TABLE t1; # diff --git a/storage/connect/mysql-test/connect/t/mysql_index.test b/storage/connect/mysql-test/connect/t/mysql_index.test index cb4a332cdf8..a70ea3fd6f9 100644 --- a/storage/connect/mysql-test/connect/t/mysql_index.test +++ b/storage/connect/mysql-test/connect/t/mysql_index.test @@ -30,7 +30,7 @@ CREATE TABLE t1 ( PRIMARY KEY (id) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; INSERT INTO t1 VALUES(1,'Un'),(3,'Trois'),(5,'Cinq'); -INSERT INTO t1 VALUES(2,'Two'),(4,'Four'),(6,'Six'); +INSERT INTO t1 VALUES(2,'Two'),(4,'Four'),(6,'Six'), (7,'seven'); SELECT * FROM t1; --echo # @@ -54,6 +54,7 @@ SELECT * FROM t2 WHERE id > 4; SELECT * FROM t2 WHERE id >= 3; SELECT * FROM t2 WHERE id < 3; SELECT * FROM t2 WHERE id < 2 OR id > 4; +explain SELECT * FROM t2 WHERE id <= 3; SELECT * FROM t2 WHERE id <= 3; SELECT * FROM t2 WHERE id BETWEEN 3 AND 5; SELECT * FROM t2 WHERE id > 2 AND id < 6; |