diff options
author | monty@mysql.com <> | 2004-02-11 00:06:46 +0100 |
---|---|---|
committer | monty@mysql.com <> | 2004-02-11 00:06:46 +0100 |
commit | ce145789092b294a562f565671478ae2bf51d14a (patch) | |
tree | 927515d304bd661aebdb0e534418caf49d322ada /sql/sql_udf.cc | |
parent | 0c6a0b9a3118948efeedefd036d2994982babd08 (diff) | |
parent | efb134f3a874befe4ab1779f597ada09f57ca191 (diff) | |
download | mariadb-git-ce145789092b294a562f565671478ae2bf51d14a.tar.gz |
Merge with 4.0.18
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r-- | sql/sql_udf.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 6e8aae54b23..a4461beed29 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -120,6 +120,7 @@ void udf_init() udf_func *tmp; TABLE_LIST tables; READ_RECORD read_record_info; + TABLE *table; int error; DBUG_ENTER("ufd_init"); @@ -152,13 +153,11 @@ void udf_init() if (simple_open_n_lock_tables(new_thd, &tables)) { DBUG_PRINT("error",("Can't open udf table")); - sql_print_error("Can't open mysql/func table"); - close_thread_tables(new_thd); - delete new_thd; - DBUG_VOID_RETURN; + sql_print_error("Can't open the mysql/func table. Please run the mysql_install_db script to create it."); + goto end; } - TABLE *table = tables.table; + table= tables.table; init_read_record(&read_record_info, new_thd, table, NULL,1,0); while (!(error = read_record_info.read_record(&read_record_info))) { @@ -206,6 +205,8 @@ void udf_init() sql_print_error(ER(ER_GET_ERRNO), my_errno); end_read_record(&read_record_info); new_thd->version--; // Force close to free memory + +end: close_thread_tables(new_thd); delete new_thd; /* Remember that we don't have a THD */ |