2010-09-07 16:06:33 +00:00
|
|
|
# ticket 895 is a query optimization problem with the primary key
|
|
|
|
|
|
|
|
--source include/have_tokudb.inc
|
|
|
|
SET STORAGE_ENGINE = 'tokudb';
|
|
|
|
|
|
|
|
--disable_warnings
|
|
|
|
DROP TABLE IF EXISTS t;
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
CREATE TABLE t (r INT, s INT, t BIGINT, PRIMARY KEY (r, s));
|
|
|
|
INSERT INTO t VALUES (1,2,3),(4,5,6);
|
2012-01-16 17:44:31 +00:00
|
|
|
# ignore rows column
|
|
|
|
--replace_column 9 NULL;
|
2010-09-07 16:06:33 +00:00
|
|
|
EXPLAIN SELECT * FROM t WHERE r > 0;
|
|
|
|
CREATE INDEX it on t(t);
|
2012-01-16 17:44:31 +00:00
|
|
|
# ignore rows column
|
|
|
|
--replace_column 9 NULL;
|
2010-09-07 16:06:33 +00:00
|
|
|
EXPLAIN SELECT * FROM t WHERE r > 0;
|
|
|
|
|
|
|
|
# Final cleanup.
|
|
|
|
DROP TABLE t;
|
|
|
|
|