summaryrefslogtreecommitdiff
path: root/mysql-test/r/range.result
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2007-12-20 22:11:37 +0100
committerunknown <serg@janus.mylan>2007-12-20 22:11:37 +0100
commit295732b580716b6b5a48a4a2ceb112b432c96551 (patch)
tree8e1c37da4cf89e91d901badb1c2e5f100be39ec1 /mysql-test/r/range.result
parent3ab83a2e5efdb64b068243d11b6230ae5b11df29 (diff)
parent9bf488563d948ddc86ccef87ddaebc7d15afe1a4 (diff)
downloadmariadb-git-295732b580716b6b5a48a4a2ceb112b432c96551.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into janus.mylan:/usr/home/serg/Abk/mysql-5.1 configure.in: Auto merged libmysql/CMakeLists.txt: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/information_schema.result: Auto merged mysql-test/t/information_schema.test: Auto merged sql/Makefile.am: Auto merged sql/field.cc: Auto merged sql/handler.cc: Auto merged sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/item_geofunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/key.cc: Auto merged sql/lock.cc: Auto merged sql/log.cc: Auto merged sql/log_event.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged sql/opt_sum.cc: Auto merged sql/protocol.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/set_var.cc: Auto merged sql/set_var.h: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.h: Auto merged storage/archive/ha_archive.cc: Auto merged storage/innobase/buf/buf0buf.c: Auto merged storage/innobase/buf/buf0flu.c: Auto merged storage/innobase/buf/buf0lru.c: Auto merged storage/innobase/include/buf0buf.h: Auto merged storage/innobase/include/buf0buf.ic: Auto merged storage/innobase/include/sync0arr.h: Auto merged storage/innobase/include/sync0rw.h: Auto merged storage/innobase/include/sync0rw.ic: Auto merged storage/innobase/include/sync0sync.h: Auto merged storage/innobase/os/os0sync.c: Auto merged storage/innobase/sync/sync0arr.c: Auto merged storage/innobase/sync/sync0rw.c: Auto merged storage/innobase/sync/sync0sync.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_open.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged sql/ha_ndbcluster.cc: merged sql/item_cmpfunc.cc: merged sql/protocol.cc: merged sql/slave.cc: merged sql/sql_class.h: merged sql/sql_parse.cc: merged
Diffstat (limited to 'mysql-test/r/range.result')
-rw-r--r--mysql-test/r/range.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 108264b3bf2..92db6d8429f 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -1135,6 +1135,24 @@ item started price
A1 2005-11-01 08:00:00 1000.000
A1 2005-11-15 00:00:00 2000.000
DROP TABLE t1;
+
+BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"
+
+CREATE TABLE t1 (
+id int(11) NOT NULL auto_increment,
+dateval date default NULL,
+PRIMARY KEY (id),
+KEY dateval (dateval)
+) AUTO_INCREMENT=173;
+INSERT INTO t1 VALUES
+(1,'2007-01-01'),(2,'2007-01-02'),(3,'2007-01-03'),(4,'2007-01-04'),
+(5,'2007-01-05'),(6,'2007-01-06'),(7,'2007-01-07'),(8,'2007-01-08'),
+(9,'2007-01-09'),(10,'2007-01-10'),(11,'2007-01-11');
+This must use range access:
+explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= '2007-01-02 23:59:59';
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t1 range dateval dateval 4 NULL 2 Using where
+drop table t1;
create table t1 (a int);
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t2 (a int, b int, filler char(100));