Commit 2d81e56f authored by calvin's avatar calvin

branches/5.1: fix bug#46256

Allow tables to be dropped even if the collation is not found,
but issue a warning.

Could not find an easy way to add mysql-test since it requires
changes to charsets and restarting the server. Tests were
executed manually.

Approved by: Heikki (on IM)
parent adf8fc6e
...@@ -818,7 +818,22 @@ innobase_get_cset_width( ...@@ -818,7 +818,22 @@ innobase_get_cset_width(
*mbminlen = cs->mbminlen; *mbminlen = cs->mbminlen;
*mbmaxlen = cs->mbmaxlen; *mbmaxlen = cs->mbmaxlen;
} else { } else {
ut_a(cset == 0); if (current_thd
&& (thd_sql_command(current_thd) == SQLCOM_DROP_TABLE)) {
/* Fix bug#46256: allow tables to be dropped if the
collation is not found, but issue a warning. */
if ((global_system_variables.log_warnings)
&& (cset != 0)){
sql_print_warning(
"Unknown collation #%d.", cset);
}
} else {
ut_a(cset == 0);
}
*mbminlen = *mbmaxlen = 0; *mbminlen = *mbmaxlen = 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment