Skip to content

Commit 28941bb

Browse files
author
Chandan Kunal
committed
Bug #31905199: WHERE_CONDITION OPTIMIZATION MAY CAUSE A CORE DUMP
Description: Fix an issue with SELECT query. Change-Id: I8507077e8292803b79293daa97369a9c65e2386a
1 parent 0526c01 commit 28941bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/item.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5797,7 +5797,8 @@ Item *Item_field::equal_fields_propagator(uchar *arg)
57975797
first converted to a string (in date/time format) and compared as such if
57985798
compared with another string.
57995799
*/
5800-
if (item && field->type() != FIELD_TYPE_TIMESTAMP && cmp_context != INT_RESULT)
5800+
if (item && field->type() != FIELD_TYPE_TIMESTAMP && cmp_context != INT_RESULT
5801+
&& item->real_item()->type() != Item::REAL_ITEM)
58015802
convert_zerofill_number_to_string(&item, (Field_num *)field);
58025803
else
58035804
item= this;

0 commit comments

Comments
 (0)