1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed bug #27362: crash at evaluation of IN predicate when one

of its argument happened to be a decimal expression returning
the NULL value.
The crash was due to the fact the function in_decimal::set did
not take into account that val_decimal() could return 0 if 
the decimal expression had been evaluated to NULL.  


mysql-test/r/func_in.result:
  Added a test case for bug #27362.
mysql-test/t/func_in.test:
  Added a test case for bug #27362.
This commit is contained in:
unknown
2007-03-22 00:05:36 -07:00
parent b70693f582
commit a4a23fb907
3 changed files with 18 additions and 1 deletions

View File

@@ -2423,7 +2423,8 @@ void in_decimal::set(uint pos, Item *item)
dec->len= DECIMAL_BUFF_LENGTH;
dec->fix_buffer_pointer();
my_decimal *res= item->val_decimal(dec);
if (res != dec)
/* if item->val_decimal() is evaluated to NULL then res == 0 */
if (!item->null_value && res != dec)
my_decimal2decimal(res, dec);
}