MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Satya B Date:October 5 2009 11:26am
Subject:bzr commit into mysql-5.1-bugteam branch (satya.bn:3157) Bug#46256
View as plain text  
#At file:///home/satya/WORK/mysql/mysql-5.1-pe-stage/ based on revid:satya.bn@stripped

 3157 Satya B	2009-10-05
      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'

    modified:
      storage/innobase/handler/ha_innodb.cc
=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2009-10-05 11:17:48 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2009-10-05 11:26:10 +0000
@@ -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;
 	}
 }


Attachment: [text/bzr-bundle] bzr/satya.bn@sun.com-20091005112610-5lwgra4x0ild15i7.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (satya.bn:3157) Bug#46256Satya B5 Oct