diff options
author | Tor Didriksen <tor.didriksen@oracle.com> | 2011-04-14 16:35:24 +0200 |
---|---|---|
committer | Tor Didriksen <tor.didriksen@oracle.com> | 2011-04-14 16:35:24 +0200 |
commit | dd3d9477b25b546407e18b4b474e766db1709aa7 (patch) | |
tree | 577986eed8dd0b3deeb83f2d9b060c446771232e /sql/sql_select.cc | |
parent | 7634e724e786a91aeb9b450818230629beb66228 (diff) | |
download | mariadb-git-dd3d9477b25b546407e18b4b474e766db1709aa7.tar.gz |
Bug#11765713 58705: OPTIMIZER LET ENGINE DEPEND ON UNINITIALIZED VALUES CREATED BY OPT_SUM_QU
Valgrind warnings were caused by comparing index values to an un-initialized field.
mysql-test/r/subselect.result:
New test cases.
mysql-test/t/subselect.test:
New test cases.
sql/opt_sum.cc:
Add thd to opt_sum_query enabling it to test for errors.
If we have a non-nullable index, we cannot use it to match null values,
since set_null() will be ignored, and we might compare uninitialized data.
sql/sql_select.cc:
Add thd to opt_sum_query, enabling it to test for errors.
sql/sql_select.h:
Add thd to opt_sum_query, enabling it to test for errors.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 84a09fbc7e6..ab287e57aa1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -961,7 +961,7 @@ JOIN::optimize() If all items were resolved by opt_sum_query, there is no need to open any tables. */ - if ((res=opt_sum_query(select_lex->leaf_tables, all_fields, conds))) + if ((res=opt_sum_query(thd, select_lex->leaf_tables, all_fields, conds))) { if (res == HA_ERR_KEY_NOT_FOUND) { |