diff options
author | unknown <dlenev@mockturtle.local> | 2006-09-28 23:47:49 +0400 |
---|---|---|
committer | unknown <dlenev@mockturtle.local> | 2006-09-28 23:47:49 +0400 |
commit | 5d46e2993389f3cffe2a37374ba61334f86f7e5e (patch) | |
tree | 7ca9f529659cb757f64b33e7456f9fe38780e777 /mysql-test/t/timezone4.test | |
parent | 4bbca0b6bf916d97ac6e48f5f35cdf87b016c077 (diff) | |
download | mariadb-git-5d46e2993389f3cffe2a37374ba61334f86f7e5e.tar.gz |
Fix for bug#22338 "Valgrind warning: uninitialized variable in
create_tmp_table()".
The fix for bug 21787 "COUNT(*) + ORDER BY + LIMIT returns wrong
result" introduced valgrind warnings which occured during execution
of information_schema.test and sp-prelocking.test in version 5.0.
There were no user visible effects.
The latter fix made create_tmp_table() dependant on
THD::lex::current_select value. Valgrind warnings occured when this
function was executed and THD::lex::current_select member pointed
to uninitialized SELECT_LEX instance.
This fix tries to remove this dependancy by moving some logic
outside of create_tmp_table() function.
sql/sql_select.cc:
create_tmp_table():
Moved code which is responsible for determining if optimization
which pushes down LIMIT clause to temporary table creation is
applicable out of this function.
Such move made this function independant of THD::lex::current_select
value and removed valgrind warnings which occured in cases when this
member pointed to uninitialized SELECT_LEX object (particularly these
warnings occured in sp-prelocking.test and information_schema.test
in 5.0). This seems like a better solution than trying to force this
pointer always to point to relevant select because:
- In some cases when we use create_tmp_table() there are no relevant
SELECT_LEX object (we use it just to create temporary table/object).
- There is only one place in code where we call this funciton and
where this optimization can be enabled. And in this place we
already have some logic which tries to determine if it is applicable.
Diffstat (limited to 'mysql-test/t/timezone4.test')
0 files changed, 0 insertions, 0 deletions