summaryrefslogtreecommitdiff
path: root/mysql-test/t/range.test
diff options
context:
space:
mode:
authorunknown <tsmith@maint2.mysql.com>2006-09-13 09:03:52 +0200
committerunknown <tsmith@maint2.mysql.com>2006-09-13 09:03:52 +0200
commitfba86d2b7ed2f88ec33a6e8e8bfc4f18613cc3c6 (patch)
treef08cbab5b66362c84b62621037950058412d7f9b /mysql-test/t/range.test
parentbc053aa0a1764220d3c0191f1293f78decfe7c4d (diff)
parent2214e282a3f37419aeb791350e461b07662845b8 (diff)
downloadmariadb-git-fba86d2b7ed2f88ec33a6e8e8bfc4f18613cc3c6.tar.gz
Merge maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/50
into maint2.mysql.com:/data/localhome/tsmith/bk/mrg50/51 BUILD/SETUP.sh: Auto merged client/Makefile.am: Auto merged dbug/Makefile.am: Auto merged include/mysql_com.h: Auto merged libmysql/Makefile.am: Auto merged mysql-test/lib/mtr_cases.pl: Auto merged mysql-test/lib/mtr_match.pl: Auto merged mysql-test/lib/mtr_misc.pl: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/r/ctype_utf8.result: Auto merged mysql-test/r/func_time.result: Auto merged mysql-test/r/myisam.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/range.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/ctype_utf8.test: Auto merged mysql-test/t/func_time.test: Auto merged mysql-test/t/myisam.test: Auto merged mysql-test/t/range.test: Auto merged mysql-test/t/system_mysql_db_fix.test: Auto merged mysys/my_seek.c: Auto merged regex/Makefile.am: Auto merged scripts/Makefile.am: Auto merged server-tools/instance-manager/Makefile.am: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_strfunc.h: Auto merged sql/item_sum.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_acl.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_yacc.yy: Auto merged sql/stacktrace.c: Auto merged sql-common/client.c: Auto merged sql/stacktrace.h: Auto merged storage/innobase/Makefile.am: Auto merged support-files/mysql.spec.sh: Auto merged tests/Makefile.am: Auto merged tests/mysql_client_test.c: Auto merged BitKeeper/deleted/.del-mytest.c: Delete: libmysql/mytest.c BitKeeper/deleted/.del-make_win_bin_dist: Delete: scripts/make_win_bin_dist BitKeeper/deleted/.del-message.mc~1: Delete: sql/message.mc Makefile.am: Manual merge (use local) configure.in: Manual merge (use local) BitKeeper/deleted/.del-Makefile.in: Manual merge (use local) client/mysqlbinlog.cc: Manual merge (use local) extra/Makefile.am: Manual merge (use local) extra/comp_err.c: Manual merge (use local) extra/yassl/Makefile.am: Manual merge (use local) extra/yassl/taocrypt/Makefile.am: Manual merge (use local) include/my_dbug.h: Manual merge (use local) mysql-test/mysql-test-run.pl: Manual merge (use local) mysql-test/lib/mtr_process.pl: Manual merge (use local) mysys/Makefile.am: Manual merge (use local) server-tools/Makefile.am: Manual merge (use local) sql/Makefile.am: Manual merge (use local) sql/sp.cc: Manual merge sql/sp_head.cc: Manual merge sql/sql_class.h: Manual merge (use local) sql/sql_select.cc: SCCS merged sql/table.cc: Manual merge storage/archive/ha_archive.cc: Manual merge storage/heap/Makefile.am: Manual merge (use local) storage/myisam/Makefile.am: Manual merge (use local) storage/myisammrg/Makefile.am: Manual merge (use local) strings/Makefile.am: Manual merge (use local) vio/Makefile.am: Manual merge (use local) zlib/Makefile.am: Manual merge (use local)
Diffstat (limited to 'mysql-test/t/range.test')
-rw-r--r--mysql-test/t/range.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 735d3f11359..89508f468a7 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -709,5 +709,34 @@ 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