List:Commits« Previous MessageNext Message »
From:Jim Winstead Date:May 18 2009 9:20pm
Subject:bzr commit into mysql-5.1-bugteam branch (jimw:2899) Bug#40395
View as plain text  
#At file:///Users/jimw/my/mysql-5.1/ based on revid:jimw@stripped

 2899 Jim Winstead	2009-05-18
      mysqladmin did not have enough space allocated for tracking all variables
      when using --vertical or --relative with extended-status. (Bug #40395)
      
        This patch simply increases the buffer size and adds an assert to
        check that it is big enough -- a more comprehensive fix would dynamically
        allocate the appropriate buffers.
      modified:
        client/mysqladmin.cc

=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc	2009-05-07 20:09:53 +0000
+++ b/client/mysqladmin.cc	2009-05-18 21:19:18 +0000
@@ -24,7 +24,7 @@
 #include <mysql.h>
 
 #define ADMIN_VERSION "8.42"
-#define MAX_MYSQL_VAR 256
+#define MAX_MYSQL_VAR 512
 #define SHUTDOWN_DEF_TIMEOUT 3600		/* Wait for shutdown */
 #define MAX_TRUNC_LENGTH 3
 
@@ -743,6 +743,9 @@ static int execute_commands(MYSQL *mysql
 			mysql_error(mysql));
 	return -1;
       }
+
+      DBUG_ASSERT(mysql_num_rows(res) < MAX_MYSQL_VAR);
+
       if (!opt_vertical)
 	print_header(res);
       else

Thread
bzr commit into mysql-5.1-bugteam branch (jimw:2899) Bug#40395Jim Winstead18 May