List:Commits« Previous MessageNext Message »
From:Tatiana A. Nurnberg Date:October 23 2008 2:57am
Subject:bzr commit into mysql-6.0 branch (azundris:2886) Bug#39591
View as plain text  
#At file:///misc/mysql/forest/39591/60-39591/

 2886 Tatiana A. Nurnberg	2008-10-23
      Bug#39591 - Crash if table comment is longer than 62 characters
      
      Maximum length for TABLE..COMMENT changed between 5.1 and 6.0; code adjusted.
modified:
  sql/unireg.cc

per-file messages:
  sql/unireg.cc
    TABLE..COMMENT had a maximum of 60 characters (+ terminator) in 5.1;
    it's 2048 now (in extra segment), or 180+1 one (inline). We're fixing
    the latter case so comments in the 80..180 range now longer result in
    a negative length argument (61 - comment.length) to memset.
=== modified file 'sql/unireg.cc'
--- a/sql/unireg.cc	2008-07-24 11:33:35 +0000
+++ b/sql/unireg.cc	2008-10-23 02:57:30 +0000
@@ -235,7 +235,7 @@ bool mysql_create_frm(THD *thd, const ch
       payload with a magic value to detect wrong buffer-sizes. We
       explicitly zero that segment again.
     */
-    memset((char*) forminfo+47 + forminfo[46], 0, 61 - forminfo[46]);
+    memset((char*) forminfo+47 + forminfo[46], 0, 181 - forminfo[46]);
 #endif
   }
 

Thread
bzr commit into mysql-6.0 branch (azundris:2886) Bug#39591Tatiana A. Nurnberg23 Oct