diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-09-19 19:07:17 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-09-21 10:03:16 +0200 |
commit | 4368efe870f225279106798f71978b68c473e2ab (patch) | |
tree | b877d9e839890795b9f0aa051c17781deadbd404 /sql | |
parent | e4f70789d5bae1d3692800f55a46905517a6119b (diff) | |
download | mariadb-git-4368efe870f225279106798f71978b68c473e2ab.tar.gz |
valgrind failures
and a couple of collaterals:
* debugging assert in my_valgrind.h
* trivial cleanup in sql_union.cc
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_strfunc.cc | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 | ||||
-rw-r--r-- | sql/sql_union.cc | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index bff31ec7b26..b9c0da6baa0 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -572,7 +572,7 @@ String *Item_func_decode_histogram::val_str(String *str) uint i; str->length(0); char numbuf[32]; - const uchar *p= (uchar*)res->c_ptr(); + const uchar *p= (uchar*)res->c_ptr_safe(); for (i= 0; i < res->length(); i++) { double val; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index aa08420931f..c70e0d5b7e2 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2648,7 +2648,7 @@ bool JOIN::make_aggr_tables_info() */ DBUG_PRINT("info",("Sorting for order by/group by")); ORDER *order_arg= group_list ? group_list : order; - if (join_tab && + if (top_join_tab_count + aggr_tables > const_tables && ordered_index_usage != (group_list ? ordered_index_group_by : ordered_index_order_by) && curr_tab->type != JT_CONST && diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 854ebb99ef2..0d05d201f12 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -445,9 +445,10 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, bool is_union_select; bool instantiate_tmp_table= false; DBUG_ENTER("st_select_lex_unit::prepare"); - DBUG_ASSERT(thd == thd_arg && thd == current_thd); + DBUG_ASSERT(thd == thd_arg); + DBUG_ASSERT(thd == current_thd); - describe= MY_TEST(additional_options & SELECT_DESCRIBE); + describe= additional_options & SELECT_DESCRIBE; /* Save fake_select_lex in case we don't need it for anything but |