summaryrefslogtreecommitdiff
path: root/sql/tztime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/tztime.cc')
-rw-r--r--sql/tztime.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/tztime.cc b/sql/tztime.cc
index b23456b5465..79f3b83553e 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -1692,7 +1692,11 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap)
}
for (TABLE_LIST *tl= tz_tables; tl; tl= tl->next_global)
+ {
tl->table->use_all_columns();
+ /* Force close at the end of the function to free memory. */
+ tl->table->m_needs_reopen= TRUE;
+ }
/*
Now we are going to load leap seconds descriptions that are shared
@@ -1781,7 +1785,6 @@ end_with_setting_default_tz:
end_with_close:
if (time_zone_tables_exist)
{
- thd->version--; /* Force close to free memory */
close_thread_tables(thd);
thd->mdl_context.release_transactional_locks();
}