3565 Marc Alff 2011-11-05
Added debug code
modified:
sql/sql_class.cc
sql/sql_class.h
sql/sql_parse.cc
3564 Marc Alff 2011-11-05
Speed up testing
modified:
mysql-test/collections/default.push
=== modified file 'sql/sql_class.cc'
--- a/sql/sql_class.cc 2011-11-03 16:03:34 +0000
+++ b/sql/sql_class.cc 2011-11-05 18:48:10 +0000
@@ -788,6 +788,7 @@ THD::THD(bool enable_plugins)
m_examined_row_count(0),
m_statement_psi(NULL),
m_idle_psi(NULL),
+ m_debug_memory_sentinel(123456789),
m_server_idle(false),
is_fatal_error(0),
transaction_rollback_request(0),
=== modified file 'sql/sql_class.h'
--- a/sql/sql_class.h 2011-11-05 17:00:31 +0000
+++ b/sql/sql_class.h 2011-11-05 18:48:10 +0000
@@ -2372,6 +2372,9 @@ public:
/** Idle instrumentation state. */
PSI_idle_locker_state m_idle_state;
#endif /* EMBEDDED_LIBRARY */
+
+ ulonglong m_debug_memory_sentinel;
+
/** True if the server code is IDLE for this connection. */
bool m_server_idle;
=== modified file 'sql/sql_parse.cc'
--- a/sql/sql_parse.cc 2011-11-05 17:00:31 +0000
+++ b/sql/sql_parse.cc 2011-11-05 18:48:10 +0000
@@ -1594,15 +1594,24 @@ bool dispatch_command(enum enum_server_c
thd->reset_query();
thd->set_command(COM_SLEEP);
+ DBUG_ASSERT(thd->m_debug_memory_sentinel == 123456789);
+
/* Performance Schema Interface instrumentation, end */
MYSQL_END_STATEMENT(thd->m_statement_psi, thd->get_stmt_da());
+ DBUG_ASSERT(thd->m_debug_memory_sentinel == 123456789);
+
dec_thread_running();
+
+ DBUG_ASSERT(thd->m_debug_memory_sentinel == 123456789);
+
thd->packet.shrink(thd->variables.net_buffer_length); // Reclaim some memory
- thd->m_statement_psi= (PSI_statement_locker*) 0xDEADBEEF;
+ DBUG_ASSERT(thd->m_debug_memory_sentinel == 123456789);
+
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
- DBUG_ASSERT(thd->m_statement_psi == (PSI_statement_locker*) 0xDEADBEEF);
+
+ DBUG_ASSERT(thd->m_debug_memory_sentinel == 123456789);
/* DTRACE instrumentation, end */
if (MYSQL_QUERY_DONE_ENABLED() || MYSQL_COMMAND_DONE_ENABLED())
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk-marc branch (marc.alff:3564 to 3565) | Marc Alff | 7 Nov |