1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

short patch for bug #2184 'Prepared statements in embedded library was

broken with recent changes' (attempt 2).
Adding Statement_core is better because:
- set_statement() code is shorter and you don't need to modify it when adding
new members to Statement_core
- a bit faster (you don't have virtual call and don't free_root() twice)
Do that short patch instead in hope that set_statement() will be sooner or
later removed entirely
This commit is contained in:
konstantin@oak.local
2003-12-23 15:38:19 +03:00
parent 60adb16163
commit 3382eea70e
2 changed files with 3 additions and 2 deletions

View File

@@ -336,6 +336,8 @@ THD::~THD()
#ifndef DBUG_OFF
dbug_sentry = THD_SENTRY_GONE;
#endif
/* Reset stmt_backup.mem_root to not double-free memory from thd.mem_root */
init_alloc_root(&stmt_backup.mem_root, 0, 0);
DBUG_VOID_RETURN;
}