summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorserg@serg.mysql.com <>2001-04-13 16:18:44 +0200
committerserg@serg.mysql.com <>2001-04-13 16:18:44 +0200
commitca0ba8e0ab4c765178d7dc3e703e70919f83bfa1 (patch)
treef12dcf690b5fcec38c52c0128c2854c62729ee9d /sql/sql_class.cc
parenta981cfbdcb534675cc4cf92fd583826d746e68c8 (diff)
downloadmariadb-git-ca0ba8e0ab4c765178d7dc3e703e70919f83bfa1.tar.gz
this won't be pushed
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 85a19d31210..567f1e1281e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -76,7 +76,7 @@ static void free_var(user_var_entry *entry)
****************************************************************************/
THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
- insert_id_used(0),in_lock_tables(0),manual_open(0),
+ insert_id_used(0),in_lock_tables(0),
global_read_lock(0),bootstrap(0)
{
host=user=priv_user=db=query=ip=0;
@@ -85,7 +85,8 @@ THD::THD():user_time(0),fatal_error(0),last_insert_id_used(0),
query_length=col_access=0;
query_error=0;
next_insert_id=last_insert_id=0;
- open_tables=temporary_tables=0;
+ open_tables=temporary_tables=handler_tables=0;
+ handler_items=0;
tmp_table=0;
lock=locked_tables=0;
used_tables=0;
@@ -158,10 +159,14 @@ THD::~THD()
net_end(&net);
}
ha_rollback(this);
- if (locked_tables || manual_open)
+ if (locked_tables)
{
lock=locked_tables; locked_tables=0;
- manual_open=0;
+ close_thread_tables(this);
+ }
+ if (handler_tables)
+ {
+ open_tables=handler_tables; handler_tables=0;
close_thread_tables(this);
}
close_temporary_tables(this);