summaryrefslogtreecommitdiff
path: root/dbug
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-04-30 00:33:06 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-04-30 00:33:06 +0400
commit85ed11c60d569a54a32cce1588594ee18c43e40a (patch)
treea2457e79f43173dfb97236266c5bb7a47fdbf65f /dbug
parent21b8741b57204f784633c6337f9abacaa59ff3e2 (diff)
parent2303a8c6e4dd94eb6b682c61e0ff333c21b188b2 (diff)
downloadmariadb-git-85ed11c60d569a54a32cce1588594ee18c43e40a.tar.gz
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts: Text conflict in configure.in Text conflict in dbug/dbug.c Text conflict in mysql-test/r/ps.result Text conflict in mysql-test/t/ps.test Text conflict in sql/CMakeLists.txt Text conflict in sql/ha_ndbcluster.cc Text conflict in sql/mysqld.cc Text conflict in sql/sql_plugin.cc Text conflict in sql/sql_table.cc
Diffstat (limited to 'dbug')
-rw-r--r--dbug/dbug.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/dbug/dbug.c b/dbug/dbug.c
index 0355d553cff..15d31e0c370 100644
--- a/dbug/dbug.c
+++ b/dbug/dbug.c
@@ -507,7 +507,13 @@ int DbugParse(CODE_STATE *cs, const char *control)
rel= control[0] == '+' || control[0] == '-';
if ((!rel || (!stack->out_file && !stack->next)))
{
- FreeState(cs, stack, 0);
+ /*
+ We need to free what's already in init_settings, because unlike
+ the thread related stack frames there's a chance that something
+ is in these variables already.
+ */
+ if (stack == &init_settings)
+ FreeState(cs, stack, 0);
stack->flags= 0;
stack->delay= 0;
stack->maxdepth= 0;
@@ -1709,7 +1715,10 @@ void _db_end_()
while ((discard= cs->stack))
{
if (discard == &init_settings)
+ {
+ FreeState (cs, discard, 0);
break;
+ }
cs->stack= discard->next;
FreeState(cs, discard, 1);
}