[Commits] 4f0380b: Fix of PSI & COM_MULTI

Oleksandr Byelkin sanja at mariadb.com
Thu May 12 14:42:58 EEST 2016


revision-id: 4f0380b43fddc082707e4883adb401829a80f8f3 (mariadb-10.2.0-20-g4f0380b)
parent(s): c0a59b46be5be341bd6ffc9fe188a236ced46522
committer: Oleksandr Byelkin
timestamp: 2016-05-12 13:42:58 +0200
message:

Fix of PSI & COM_MULTI

---
 sql/sql_parse.cc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index a6bb89f..e17cc03 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2232,6 +2232,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
       if (net_allocate_new_packet(net, thd, MYF(0)))
         break;
 
+      PSI_statement_locker *save_locker= thd->m_statement_psi;
+      sql_digest_state *save_digest= thd->m_digest;
+      thd->m_statement_psi= NULL;
+      thd->m_digest= NULL;
+
       while (packet_length)
       {
         current_com++;
@@ -2263,6 +2268,9 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
       }
 
 com_multi_end:
+      thd->m_statement_psi= save_locker;
+      thd->m_digest= save_digest;
+
       /* release old buffer */
       DBUG_ASSERT(net->buff == net->write_pos); // nothing to send
       my_free(readbuff);


More information about the commits mailing list