mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
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.
This commit is contained in:
parent
7117ee8ccc
commit
1f6fa46b7a
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue