Current Path : /usr/opt/mysql57/mysql-test/include/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/opt/mysql57/mysql-test/include/partition_date_range.inc |
# Created for verifying bug#20577. # expects TABLE t1 (... , a DATE, ...) --sorted_result SELECT * FROM t1 WHERE a < '1001-01-01'; --sorted_result SELECT * FROM t1 WHERE a <= '1001-01-01'; --sorted_result SELECT * FROM t1 WHERE a >= '1001-01-01'; --sorted_result SELECT * FROM t1 WHERE a > '1001-01-01'; --sorted_result SELECT * FROM t1 WHERE a = '1001-01-01'; --sorted_result SELECT * FROM t1 WHERE a < '1001-00-00'; --sorted_result SELECT * FROM t1 WHERE a <= '1001-00-00'; --sorted_result SELECT * FROM t1 WHERE a >= '1001-00-00'; --sorted_result SELECT * FROM t1 WHERE a > '1001-00-00'; --sorted_result SELECT * FROM t1 WHERE a = '1001-00-00'; --echo # Disabling warnings for the invalid date --disable_warnings --sorted_result SELECT * FROM t1 WHERE a < '1999-02-31'; --sorted_result SELECT * FROM t1 WHERE a <= '1999-02-31'; --sorted_result SELECT * FROM t1 WHERE a >= '1999-02-31'; --sorted_result SELECT * FROM t1 WHERE a > '1999-02-31'; --sorted_result SELECT * FROM t1 WHERE a = '1999-02-31'; --enable_warnings --sorted_result SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; --sorted_result SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; --sorted_result SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; --sorted_result SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; if ($explain_partitions) { EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00'; --echo # Disabling warnings for the invalid date --disable_warnings EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1999-02-31'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1999-02-31'; --enable_warnings EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00'; EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01'; }