Commit c2fcd6b2 authored by Jim Winstead's avatar Jim Winstead

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.
parent caba34a1
......@@ -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,int argc, char **argv)
mysql_error(mysql));
return -1;
}
DBUG_ASSERT(mysql_num_rows(res) < MAX_MYSQL_VAR);
if (!opt_vertical)
print_header(res);
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment