diff options
author | Monty <monty@mariadb.org> | 2015-10-02 10:18:40 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-05 17:14:14 +0200 |
commit | d8df2b946442e6f4bd7dd73570a603ae3e2d21f0 (patch) | |
tree | 2343fcd4585411f4785a03469f52104ea552cc5a | |
parent | ae2cdc17980301e95f218f69154818bc6a13975b (diff) | |
download | mariadb-git-d8df2b946442e6f4bd7dd73570a603ae3e2d21f0.tar.gz |
Bugs, found by valgrind
-rw-r--r-- | sql/item_cmpfunc.cc | 4 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 7c10271a7bd..d26f0a4527e 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -6278,8 +6278,8 @@ longlong Item_equal::val_int() while ((item= it++)) { Field *field= it.get_curr_field(); - /* Skip fields of non-const tables. They haven't been read yet */ - if (field->table->const_table) + /* Skip fields of tables that has not been read yet */ + if (!field->table->status || (field->table->status & STATUS_NULL_ROW)) { if (eval_item->cmp(item) || (null_value= item->null_value)) return 0; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 554598d82ad..a8c665d5684 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -24183,6 +24183,8 @@ int JOIN::save_explain_data_intern(Explain_query *output, bool need_tmp_table, explain->select_id= join->select_lex->select_number; explain->select_type= join->select_lex->type; + explain->using_temporary= need_tmp; + explain->using_filesort= need_order; /* Setting explain->message means that all other members are invalid */ explain->message= message; |