summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-15 15:06:17 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-15 21:00:56 +0100
commit1f020299f816263e347c852eb2a494b5ef1cbf0d (patch)
tree96613eea5c79139da3d78caee4547296188e8253 /sql/sql_parse.cc
parentf1134d567695990dc7d62b6c25e4b9aa8de439e0 (diff)
downloadmariadb-git-1f020299f816263e347c852eb2a494b5ef1cbf0d.tar.gz
post-merge: --ps-protocol fixes
Includes: MDEV-17302 Add support for ALTER USER command in prepared statement and MDEV-17673 main.cte_recursive fails in bb-10.4-ps branch in --ps Set correct SELECT_LEX linkage for recursive CTEs. Do not delegate this job to TABLE_LIST::set_as_with_table, because it is only run on prepare, while With_element::move_anchors_ahead is run both on prepare and execute (fix by Igor)
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index d2dde1277a1..a0107347fde 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2479,8 +2479,11 @@ void log_slow_statement(THD *thd)
if (!thd->enable_slow_log)
goto end; // E.g. SP statement
- DBUG_EXECUTE_IF("simulate_slow_query",
- thd->server_status|= SERVER_QUERY_WAS_SLOW;);
+ DBUG_EXECUTE_IF("simulate_slow_query", {
+ if (thd->get_command() == COM_QUERY ||
+ thd->get_command() == COM_STMT_EXECUTE)
+ thd->server_status|= SERVER_QUERY_WAS_SLOW;
+ });
if (((thd->server_status & SERVER_QUERY_WAS_SLOW) ||
((thd->server_status &