summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorEugene Kosov <claprix@yandex.ru>2018-05-16 18:11:30 +0300
committerSergei Golubchik <serg@mariadb.org>2018-06-03 23:25:43 +0200
commit748ef3ec91d35aa6cd5b230c71084f6c83c1c92e (patch)
tree2b730f9c4dbe82a68b8951ba3fd24ac74762d315 /sql/sql_select.cc
parentb1efff46cd0c32bd696fb2194306edbdfcd75426 (diff)
downloadmariadb-git-748ef3ec91d35aa6cd5b230c71084f6c83c1c92e.tar.gz
MDEV-15991 Server crashes in setup_on_expr upon calling SP or function executing DML on versioned tables
Do not try to set versioning conditions on every SP call. It may work incorrectly, but it's a general bug described in MDEV-774. This patch makes system versioning stuff consistent with other code and also fixes a use-after-free bug. Closes #756
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 99437e52c13..215803c2637 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -725,7 +725,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
TABLE_LIST *table;
if (!thd->stmt_arena->is_conventional() &&
- !thd->stmt_arena->is_stmt_prepare() && !thd->stmt_arena->is_sp_execute())
+ !thd->stmt_arena->is_stmt_prepare_or_first_sp_execute())
{
// statement is already prepared
DBUG_RETURN(0);