diff options
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/ndb_index_ordered.test | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test index c5d3a83a3ab..ae2f7db53fb 100644 --- a/mysql-test/t/ndb_index_ordered.test +++ b/mysql-test/t/ndb_index_ordered.test @@ -191,13 +191,29 @@ create table t1 ( insert into t1 (pk,dt,da,ye,ti) values (1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'), - (2, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'), - (3, '1999-06-06 06:06:06', '1999-06-06', '1999', '06:06:06'), - (4, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'), - (5, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59'); + (2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'), + (3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'), + (4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'), + (5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'), + (6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'), + (7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'), + (8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'), + (9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59'); # datetime -select count(*) from t1 use index (dt) where dt > '1900-01-01 00:00:00'; -select count(*) from t1 use index (dt) where dt > '1955-12-31 00:00:00'; -select count(*) from t1 use index (dt) where dt < '2001-01-01 10:11:11'; -select count(*) from t1 use index (dt) where dt < '2001-01-01 10:11:12'; +select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00'; +select count(*)-6 from t1 use index (dt) where dt >= '1955-12-31 00:00:00'; +select count(*)-5 from t1 use index (dt) where dt > '1955-12-31 00:00:00'; +select count(*)-5 from t1 use index (dt) where dt < '1970-03-03 22:22:22'; +select count(*)-7 from t1 use index (dt) where dt < '2001-01-01 10:11:11'; +select count(*)-8 from t1 use index (dt) where dt <= '2001-01-01 10:11:11'; +select count(*)-9 from t1 use index (dt) where dt <= '2055-01-01 00:00:00'; + +# date +select count(*)-9 from t1 use index (da) where da > '1900-01-01'; +select count(*)-6 from t1 use index (da) where da >= '1955-12-31'; +select count(*)-5 from t1 use index (da) where da > '1955-12-31'; +select count(*)-5 from t1 use index (da) where da < '1970-03-03'; +select count(*)-6 from t1 use index (da) where da < '2001-01-01'; +select count(*)-8 from t1 use index (da) where da <= '2001-01-02'; +select count(*)-9 from t1 use index (da) where da <= '2055-01-01'; |