List:Commits« Previous MessageNext Message »
From:Marc Alff Date:November 8 2011 12:21am
Subject:bzr push into mysql-trunk-marc branch (marc.alff:3566 to 3567)
View as plain text  
 3567 Marc Alff	2011-11-07
      Code cleanup

    modified:
      sql/sql_parse.cc
 3566 Marc Alff	2011-11-07 [merge]
      Merge mysql-trunk --> mysql-trunk-marc + cleanup

    modified:
      configure.cmake
      include/mysql/psi/mysql_socket.h
      mysql-test/collections/default.push
      sql/sql_class.cc
      sql/sql_class.h
      sql/sql_parse.cc
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/ibuf/ibuf0ibuf.c
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc	2011-11-07 15:33:37 +0000
+++ b/sql/sql_parse.cc	2011-11-08 00:20:53 +0000
@@ -870,6 +870,7 @@ bool do_command(THD *thd)
 
     /* Mark the statement completed. */
     MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
+    thd->m_statement_psi= NULL;
 
     if (net->error != 3)
     {
@@ -917,6 +918,8 @@ bool do_command(THD *thd)
   return_value= dispatch_command(command, thd, packet+1, (uint) (packet_length-1));
 
 out:
+  /* The statement instrumentation must be closed in all cases. */
+  DBUG_ASSERT(thd->m_statement_psi == NULL);
   DBUG_RETURN(return_value);
 }
 #endif  /* EMBEDDED_LIBRARY */
@@ -1216,6 +1219,7 @@ bool dispatch_command(enum enum_server_c
 
 /* PSI end */
       MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
+      thd->m_statement_psi= NULL;
 
 /* DTRACE end */
       if (MYSQL_QUERY_DONE_ENABLED())
@@ -1596,6 +1600,7 @@ bool dispatch_command(enum enum_server_c
 
   /* Performance Schema Interface instrumentation, end */
   MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
+  thd->m_statement_psi= NULL;
 
   dec_thread_running();
   thd->packet.shrink(thd->variables.net_buffer_length);	// Reclaim some memory

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-marc branch (marc.alff:3566 to 3567) Marc Alff11 Nov