1
0
mirror of https://github.com/MariaDB/server.git synced 2025-10-22 19:52:58 +03:00
Files
mariadb/mysql-test/include
Alexander Barkov ba68b26ae9 Bug#58190 BETWEEN no longer uses indexes for date or datetime fields
Regression introduced by WL#2649.

Problem: queries with date/datetime columns did not use indexes:
set names non_latin1_charset;
select * from date_index_test
where date_column between '2010-09-01' and '2010-10-01';

before WL#2649 indexes worked fine because charset of 
date/datetime
columns was BINARY which always won.

Fix: testing that collation of the operation matches collation 
of the field is only needed in case of "real" string data types.
For DATE, DATETIME it's not needed.


  @ mysql-test/include/ctype_numconv.inc
  @ mysql-test/r/ctype_binary.result
  @ mysql-test/r/ctype_cp1251.result
  @ mysql-test/r/ctype_latin1.result
  @ mysql-test/r/ctype_ucs.result
  @ mysql-test/r/ctype_utf8.result
  Adding tests

  @ sql/field.h
  Adding new method Field_str::match_collation_to_optimize_range()
  for use in opt_range.cc to distinguish between
  "real string" types like CHAR, VARCHAR, TEXT
  (Field_string, Field_varstring, Field_blob)

  and "almost string" types DATE, TIME, DATETIME
  (Field_newdate, Field_datetime, Field_time, Field_timestamp)

  @ sql/opt_range.cc
  Using new method instead of checking result_type() against STRING result.

Note:

  Another part of this problem (which is not regression) 
  is submitted separately (see bug##58329).
2010-11-19 20:15:47 +03:00
..
2008-11-24 16:56:48 -05:00
2010-02-19 22:37:23 +03:00
2008-03-17 14:26:00 +03:00
2010-02-24 13:15:34 +04:00
2010-02-24 13:15:34 +04:00
2010-01-15 15:42:15 +04:00
2010-03-15 14:57:20 +01:00
2007-06-28 21:34:54 +04:00
2007-06-28 21:34:54 +04:00
2007-06-28 21:34:54 +04:00
2008-08-04 07:04:47 +02:00
2006-01-12 19:51:02 +01:00
2010-01-06 22:42:07 -07:00
2010-10-20 16:56:09 +02:00
2010-10-20 16:56:09 +02:00
2010-04-13 19:04:45 +04:00
2007-06-28 21:34:54 +04:00
2010-02-24 13:15:34 +04:00
2010-02-24 13:15:34 +04:00
2010-02-24 13:15:34 +04:00
2009-12-03 18:47:20 +03:00
2008-12-02 11:05:56 +01:00
2008-05-08 20:13:39 +02:00
2007-12-12 18:19:24 +01:00
2007-02-19 15:31:55 +03:00
2010-08-05 14:41:07 +02:00
2010-08-23 13:48:27 +05:00
2009-03-15 18:39:48 -04:00
2007-09-05 18:02:46 +02:00
2007-12-12 18:19:24 +01:00
2007-12-12 18:19:24 +01:00
2007-04-10 18:01:29 +03:00
2006-01-12 19:51:02 +01:00
2008-09-20 17:00:05 +03:00
2006-08-16 19:29:49 +02:00
2009-08-12 13:31:56 +08:00
2009-09-29 14:16:23 +03:00
2007-06-21 21:58:59 +02:00
2008-01-14 15:38:02 +08:00
2008-01-14 15:38:02 +08:00
2010-05-26 22:34:25 +08:00
2006-11-20 22:42:06 +02:00
2006-12-11 11:44:03 -05:00
2010-05-26 22:34:25 +08:00
2007-12-12 18:19:24 +01:00
2007-06-21 21:58:59 +02:00
2007-06-21 21:58:59 +02:00
2008-06-25 16:59:38 +02:00
2010-11-19 11:26:43 +01:00
2008-12-02 11:05:56 +01:00