1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-31 22:22:30 +03:00
Files
mariadb/mysql-test/r
Jorgen Loland 40d72add32 BUG#11766317: FIND_IN_SET won't work normaly after upgrade
from 5.1 to 5.5

(Former 59405)

In this bug, args[0] in an Item_func_find_in_set stored an 
Item_func_weekday that was constant. In 
Item_func_find_in_set::fix_length_and_dec(), args[0]->val_str() 
was called. Later, when Item_func_find_in_set::val_int() was 
called, args[0]->null_value was checked. However, the 
Item_func_weekday in args[0] had now been replaced with an 
Item_cache. No val_*() calls had been made to this Item_cache,
thus null_value was incorrectly 'true', resulting in missing 
rows in the result set.

enum_value gets a value in fix_length_and_dec() iff args[0]
is both constant and non-null. It is therefore unnecessary 
to check the null_value of args[0] in val_int().

An alternative fix would be to call args[0]->val_int() inside 
Item_func_find_in_set::val_int(). This would ensure
args[0]->null_value was set correctly (always false in this case), 
but that would have to be done for every record this const value 
is checked against.
2011-03-04 15:46:17 +01:00
..
2011-01-25 12:14:28 +05:30
2011-02-17 12:53:09 +01:00
2011-02-17 12:53:09 +01:00
2011-03-03 18:46:30 +03:00
2011-03-03 18:46:30 +03:00
2011-02-22 19:32:49 +05:30
2011-02-22 19:32:49 +05:30
2010-11-26 16:32:51 +02:00
2009-12-09 18:56:34 +03:00
2010-07-14 09:57:50 -06:00
2010-04-13 19:04:45 +04:00
2011-03-03 15:27:36 +03:00
2010-12-16 21:43:21 +03:00
2011-01-13 09:07:21 +01:00
2011-02-08 14:59:03 +01:00
2011-02-18 11:55:24 +01: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
2010-07-09 14:46:46 +04:00
2010-07-14 15:05:20 +03:00
2010-07-21 18:20:29 +03:00
2010-04-27 13:58:21 +04:00
2010-08-25 13:17:15 +05:00
2010-12-01 12:28:21 +05:30
2011-02-08 11:21:14 +01:00
2011-01-11 15:15:25 +01:00
2010-01-29 16:54:27 +02:00
2010-09-13 15:56:56 +02:00
2010-11-15 16:59:49 +01:00
2010-11-26 16:32:51 +02:00
2010-09-13 15:56:56 +02:00
2011-01-10 16:13:12 +01:00
2010-02-24 00:22:19 -07:00
2010-10-20 16:56:09 +02:00
2010-10-20 16:56:09 +02:00
2010-09-30 14:06:50 +03:00
2010-09-30 14:06:50 +03:00
2010-09-30 14:06:50 +03:00
2010-09-30 14:06:50 +03:00
2009-12-29 15:19:05 +03:00
2011-02-01 13:23:28 +01:00
2010-01-15 15:42:15 +04:00
2011-01-12 10:31:41 +01:00
2011-01-31 15:04:39 +05:30
2010-01-15 15:42:15 +04:00
2010-02-27 11:43:32 +04:00
2009-12-16 10:48:07 +03:00
2010-12-14 13:46:00 +03:00
2011-02-14 14:16:31 +01:00
2011-03-01 17:42:37 +03:00