1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

sql_db.cc:

mysqld crashes on CREATE TABLE in a database with corrupted db.opt file.
  Bug#4646
This commit is contained in:
bar@mysql.com
2004-07-23 17:11:45 +05:00
parent 9d3edfb6b2
commit 0f298f02db

View File

@@ -327,6 +327,7 @@ bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
{ {
sql_print_error("Error while loading database options: '%s':",path); sql_print_error("Error while loading database options: '%s':",path);
sql_print_error(ER(ER_UNKNOWN_CHARACTER_SET),pos+1); sql_print_error(ER(ER_UNKNOWN_CHARACTER_SET),pos+1);
create->default_table_charset= default_charset_info;
} }
} }
else if (!strncmp(buf,"default-collation", (pos-buf))) else if (!strncmp(buf,"default-collation", (pos-buf)))
@@ -336,6 +337,7 @@ bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
{ {
sql_print_error("Error while loading database options: '%s':",path); sql_print_error("Error while loading database options: '%s':",path);
sql_print_error(ER(ER_UNKNOWN_COLLATION),pos+1); sql_print_error(ER(ER_UNKNOWN_COLLATION),pos+1);
create->default_table_charset= default_charset_info;
} }
} }
} }