Skip to content

Commit d8df2b9

Browse files
montywivuvova
authored andcommitted
Bugs, found by valgrind
1 parent ae2cdc1 commit d8df2b9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sql/item_cmpfunc.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6278,8 +6278,8 @@ longlong Item_equal::val_int()
62786278
while ((item= it++))
62796279
{
62806280
Field *field= it.get_curr_field();
6281-
/* Skip fields of non-const tables. They haven't been read yet */
6282-
if (field->table->const_table)
6281+
/* Skip fields of tables that has not been read yet */
6282+
if (!field->table->status || (field->table->status & STATUS_NULL_ROW))
62836283
{
62846284
if (eval_item->cmp(item) || (null_value= item->null_value))
62856285
return 0;

sql/sql_select.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24183,6 +24183,8 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table,
2418324183

2418424184
explain->select_id= join->select_lex->select_number;
2418524185
explain->select_type= join->select_lex->type;
24186+
explain->using_temporary= need_tmp;
24187+
explain->using_filesort= need_order;
2418624188
/* Setting explain->message means that all other members are invalid */
2418724189
explain->message= message;
2418824190

0 commit comments

Comments
 (0)