Commit 00297f65 authored by Satya B's avatar Satya B

Applying InnoDB snapshot 5.1-ss5921, part 3. Fixes BUG#46256

1. BUG#46256 - drop table with unknown collation crashes innodb

Note: No testcase attached and has to be verified manually

Detailed revision comments:

r5799 | calvin | 2009-09-09 20:47:31 +0300 (Wed, 09 Sep 2009) | 10 lines
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)
r5805 | vasil | 2009-09-10 08:41:48 +0300 (Thu, 10 Sep 2009) | 7 lines
branches/5.1:

Fix a compilation warning caused by c5799:

handler/ha_innodb.cc: In function 'void innobase_get_cset_width(ulint, ulint*, ulint*)':
handler/ha_innodb.cc:830: warning: format '%d' expects type 'int', but argument 2 has type 'ulint'
parent 37e4f861
...@@ -837,7 +837,22 @@ innobase_get_cset_width( ...@@ -837,7 +837,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 #%lu.", 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