summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-05-17 16:10:26 +0400
committerAlexander Nozdrin <alik@sun.com>2010-05-17 16:10:26 +0400
commitcc6d110e48ac3d3cf34b7acb9dee16479f08b9f9 (patch)
tree26dafc23be1752e1a6de719465e4476937f62d5a
parent6facd4cb13170e8695d9ae4f1e30611af0b0a472 (diff)
downloadmariadb-git-cc6d110e48ac3d3cf34b7acb9dee16479f08b9f9.tar.gz
Follow-up patch for Bug#27863 (excessive memory usage for many small queries
in a multiquery packet): fix NDB test failures.
-rw-r--r--sql/ha_ndbcluster_binlog.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 330891c1a10..d38544f9b9f 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -263,7 +263,6 @@ static void run_query(THD *thd, char *buf, char *end,
ulonglong save_thd_options= thd->variables.option_bits;
DBUG_ASSERT(sizeof(save_thd_options) == sizeof(thd->variables.option_bits));
NET save_thd_net= thd->net;
- Parser_state parser_state(thd, thd->query(), thd->query_length());
bzero((char*) &thd->net, sizeof(NET));
thd->set_query(buf, (uint) (end - buf));
@@ -277,7 +276,10 @@ static void run_query(THD *thd, char *buf, char *end,
DBUG_ASSERT(!thd->in_sub_stmt);
DBUG_ASSERT(!thd->locked_tables_mode);
- mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
+ {
+ Parser_state parser_state(thd, thd->query(), thd->query_length());
+ mysql_parse(thd, thd->query(), thd->query_length(), &parser_state);
+ }
if (no_print_error && thd->is_slave_error)
{