1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-20 05:03:09 +03:00
Files
mariadb/mysql-test/include
Alexander Barkov a1c762b9df Bug#11926811 / Bug#60625 Illegal mix of collations
Problem: comparison of a DATETIME sp variable and NOW()
led to Illegal mix of collations error when 
character_set_connection=utf8.
Introduced by "WL#2649 Number-to-string conversions".

Error happened in Arg_comparator::set_compare_func(),
because the first argument was errouneously converted to utf8,
while the second argument was not.

Fix: separate agg_arg_charsets_for_comparison() into two functions:

- agg_arg_charsets_for_comparison() - for pure comparison,
  when we don't need to return any string result and therefore
  don't need to convert arguments to @@character_set_connection:
    SELECT a = b;

- agg_arg_charsets_for_string_results_with_comparison() - when
  we need to return a string result, but we also need to do
  comparison internally: SELECT REPLACE(a,b,c)
  If all arguments are numbers:
    SELECT REPLACE(123,2,3) -> 133
  we convert arguments to @@character_set_connection.


  @ 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/item.cc
  @ sql/item.h
  @ sql/item_func.cc
  @ sql/item_func.h
  @ sql/item_strfunc.cc

  Introducing and using new function
   agg_item_charsets_for_string_result_with_comparison() and
  its Item_func wrapper agg_arg_charsets_for_string_result_with_comparison().
2011-04-08 17:15:23 +04:00
..
2011-01-31 13:11:05 +00: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
2011-03-18 10:31:39 +01: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
2009-03-15 18:39:48 -04: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
2006-08-16 19:29:49 +02:00
2010-12-20 15:15:01 +01:00
2010-12-20 15:15:01 +01:00
2010-12-20 15:15:01 +01: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
2011-03-16 00:46:30 +03:00
2010-11-19 11:26:43 +01:00
2008-12-02 11:05:56 +01:00