List:Commits« Previous MessageNext Message »
From:MySQL Build Team Date:January 15 2009 9:19pm
Subject:bzr commit into mysql-5.1-bugteam branch (build:2735) Bug#40386
View as plain text  
#At file:///net/helheim/store/bteam/bzr/tsmith-5.1.31-b40386/

 2735 MySQL Build Team	2009-01-15
      Cherry-pick fix for bug#40386, "Not flushing query cache after truncate", out of
5.1-bugteam branch.
      
      This fix is r3114 from innodb-5.1-ss3603.
modified:
  storage/innobase/handler/ha_innodb.cc
  storage/innobase/row/row0mysql.c

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2009-01-12 05:32:49 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2009-01-15 20:16:18 +0000
@@ -6024,11 +6024,13 @@ ha_innobase::info(
 			n_rows++;
 		}
 
-		/* Fix bug#29507: TRUNCATE shows too many rows affected.
-		Do not show the estimates for TRUNCATE command. */
+		/* Fix bug#40386: Not flushing query cache after truncate.
+		n_rows can not be 0 unless the table is empty, set to 1
+		instead. The original problem of bug#29507 is actually
+		fixed in the server code. */
 		if (thd_sql_command(user_thd) == SQLCOM_TRUNCATE) {
 
-			n_rows = 0;
+			n_rows = 1;
 
 			/* We need to reset the prebuilt value too, otherwise
 			checks for values greater than the last value written

=== modified file 'storage/innobase/row/row0mysql.c'
--- a/storage/innobase/row/row0mysql.c	2008-12-14 20:59:50 +0000
+++ b/storage/innobase/row/row0mysql.c	2009-01-15 20:16:18 +0000
@@ -342,7 +342,7 @@ row_mysql_store_col_in_innobase_format(
 		/* In some cases we strip trailing spaces from UTF-8 and other
 		multibyte charsets, from FIXED-length CHAR columns, to save
 		space. UTF-8 would otherwise normally use 3 * the string length
-		bytes to store a latin1 string! */
+		bytes to store an ASCII string! */
 
 		/* We assume that this CHAR field is encoded in a
 		variable-length character set where spaces have

Thread
bzr commit into mysql-5.1-bugteam branch (build:2735) Bug#40386MySQL Build Team15 Jan 2009