diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2020-10-02 10:19:00 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2020-10-02 10:19:00 +0400 |
commit | 0ccdf8b11b7537c93ad5f5d966666cf48d7b6857 (patch) | |
tree | 1b09325a08775d3a9ef711a354621117cc28907a /sql/sp_head.cc | |
parent | 82bc007ffb0568bb01c1c9521d3d5d116a72fa8e (diff) | |
download | mariadb-git-0ccdf8b11b7537c93ad5f5d966666cf48d7b6857.tar.gz |
MDEV-19275 Provide SQL service to plugins.
test_sql_service plugin added and employed in test_sql_service.test.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 49c8229c277..9e5b5bee0f2 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -1211,6 +1211,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) Query_arena execute_arena(&execute_mem_root, STMT_INITIALIZED_FOR_SP), backup_arena; query_id_t old_query_id; + CSET_STRING old_query; TABLE *old_derived_tables; TABLE *old_rec_tables; LEX *old_lex; @@ -1291,6 +1292,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) be able properly do close_thread_tables() in instructions. */ old_query_id= thd->query_id; + old_query= thd->query_string; old_derived_tables= thd->derived_tables; thd->derived_tables= 0; old_rec_tables= thd->rec_tables; @@ -1567,6 +1569,7 @@ sp_head::execute(THD *thd, bool merge_da_on_success) old_change_list.move_elements_to(thd); thd->lex= old_lex; thd->set_query_id(old_query_id); + thd->set_query_inner(old_query); DBUG_ASSERT(!thd->derived_tables); thd->derived_tables= old_derived_tables; thd->rec_tables= old_rec_tables; |