diff options
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index d195000e33d..9099345a64c 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -154,7 +154,7 @@ void udf_init() mysql_rwlock_init(key_rwlock_THR_LOCK_udf, &THR_LOCK_udf); init_sql_alloc(&mem, UDF_ALLOC_BLOCK_SIZE, 0, MYF(0)); - THD *new_thd = new THD; + THD *new_thd = new THD(0); if (!new_thd || my_hash_init(&udf_hash,system_charset_info,32,0,0,get_hash_key, NULL, 0)) { @@ -180,7 +180,8 @@ void udf_init() } table= tables.table; - if (init_read_record(&read_record_info, new_thd, table, NULL,1,0,FALSE)) + if (init_read_record(&read_record_info, new_thd, table, NULL, NULL, 1, 0, + FALSE)) { sql_print_error("Could not initialize init_read_record; udf's not " "loaded"); @@ -254,7 +255,9 @@ void udf_init() if (error > 0) sql_print_error("Got unknown error: %d", my_errno); end_read_record(&read_record_info); - table->m_needs_reopen= TRUE; // Force close to free memory + + // Force close to free memory + table->mark_table_for_reopen(); end: close_mysql_tables(new_thd); |