1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00
Files
mariadb/mysql-test/t
evgen@moonbone.local 641f852de8 Fixed bug#18360: Incorrect type coercion in IN() results in false comparison
The IN() function uses agg_cmp_type() to aggregate all types of its arguments
to find out some common type for comparisons. In this particular case the 
char() and the int was aggregated to double because char() can contain values
like '1.5'. But all strings which do not start from a digit are converted to
0. thus 'a' and 'z' become equal. 
This behaviour is reasonable when all function arguments are constants. But 
when there is a field or an expression this can lead to false comparisons. In
this case it makes more sense to coerce constants to the type of the field
argument.

The agg_cmp_type() function now aggregates types of constant and non-constant
items separately. If some non-constant items will be found then their
aggregated type will be returned. Thus after the aggregation constants will be
coerced to the aggregated type.
2006-05-30 00:36:48 +04:00
..
2005-09-08 12:09:30 +04:00
2005-11-06 02:11:12 +03:00
2006-01-16 15:46:37 +01:00
2005-08-19 01:57:22 -07:00
2006-04-20 12:35:33 +04:00
2005-10-09 01:32:09 +02:00
2006-04-11 15:26:18 +05:00
2005-08-08 13:46:13 -07:00
2005-08-07 03:16:15 +01:00
2005-09-06 18:03:08 +04:00
2006-04-18 20:57:31 -07:00
2006-03-06 18:34:38 +01:00
2005-10-25 14:50:08 -07:00
2006-02-28 17:54:11 -06:00
2005-11-25 10:41:22 +01:00
2005-09-30 11:39:49 +02:00
2005-07-31 04:28:01 -07:00
2005-09-05 12:33:25 +02:00
2006-04-20 22:15:38 -07:00
2005-01-30 10:24:03 +00:00
2004-11-15 17:03:54 +01:00
2005-10-12 09:47:59 +02:00
2005-12-08 16:13:53 +01:00
2005-08-09 00:13:49 +03:00
2006-01-26 00:06:20 +03:00