diff options
author | Satya B <satya.bn@sun.com> | 2009-10-05 16:56:10 +0530 |
---|---|---|
committer | Satya B <satya.bn@sun.com> | 2009-10-05 16:56:10 +0530 |
commit | aebe3c3286e1dea5cb874091fe4e420a93855491 (patch) | |
tree | a93d147d1d0b06d1cd690156b4d746998c1ecbce /storage/innobase | |
parent | 95c6cc51a549955120d26871411e2982d923fc39 (diff) | |
download | mariadb-git-aebe3c3286e1dea5cb874091fe4e420a93855491.tar.gz |
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'
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3431a5c7e37..a8b9b678282 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -837,7 +837,22 @@ innobase_get_cset_width( *mbminlen = cs->mbminlen; *mbmaxlen = cs->mbmaxlen; } 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; } } |