diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-09-23 10:43:51 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-09-23 10:43:51 +0400 |
commit | b76277fce5a375b931ae2f967e26956539eb1ffc (patch) | |
tree | 44c8ade41cf4898d56f5004e09797e427b93c963 /vio/Makefile.am | |
parent | d695cc864c54222d446ccd50662d8d3ea6cfee60 (diff) | |
download | mariadb-git-b76277fce5a375b931ae2f967e26956539eb1ffc.tar.gz |
Bug#54494 crash with explain extended and prepared statements
In case of outer join and emtpy WHERE conditon
'always true' condition is created for WHERE clasue.
Later in mysql_select() original SELECT_LEX WHERE
condition is overwritten with created cond.
However SELECT_LEX condition is also used as inital
condition in mysql_select()->JOIN::prepare().
On second execution of PS modified SELECT_LEX condition
is taken and it leads to crash.
The fix is to restore original SELECT_LEX condition
(set to NULL if original cond is NULL) in
reinit_stmt_before_use().
HAVING clause is fixed too for safety reason
(no test case as I did not manage to think out
appropriate example).
mysql-test/r/ps.result:
test case
mysql-test/t/ps.test:
test case
sql/sql_prepare.cc:
restore original SELECT_LEX condition
(set to NULL if original cond is NULL) in
reinit_stmt_before_use()
Diffstat (limited to 'vio/Makefile.am')
0 files changed, 0 insertions, 0 deletions