mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
- Added new type GET_STRALC to my_getopt.
- Fixed some bugs, wrongly freed pointers, in some clients. - Removed unneccessary code. - Fixed some other minor bugs and added some options into variables category, which had accidently been left out earlier. client/mysql.cc: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqladmin.c: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqlcheck.c: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqldump.c: Fixed some wrong freed pointers. Removed unneccessary code. Changed some types from GET_STR to GET_STRALC. client/mysqlimport.c: Removed unneccessary code. Fixed a bug in option --ignore-lines client/mysqlshow.c: Removed unneccessary code. include/my_getopt.h: Added new type, GET_STRALC. The name stands for GET STRING ALLOC, which means that the struct member value and u_max_value are strings that must be alloced and freed when used. The normal GET_STR works similarly otherwise, except that it's arguments are just pointers to strings, not alloced ones. mysys/my_getopt.c: Added support for GET_STRALC
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
|
||||
/* Show databases, tables or columns */
|
||||
|
||||
#define SHOW_VERSION "9.1"
|
||||
#define SHOW_VERSION "9.2"
|
||||
|
||||
#include <my_global.h>
|
||||
#include "client_priv.h"
|
||||
@ -198,15 +198,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
{
|
||||
switch(optid) {
|
||||
case 'c':
|
||||
charsets_dir= argument;
|
||||
break;
|
||||
case 'v':
|
||||
opt_verbose++;
|
||||
break;
|
||||
case 'h':
|
||||
host = argument;
|
||||
break;
|
||||
case 'p':
|
||||
if (argument)
|
||||
{
|
||||
@ -220,17 +214,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
else
|
||||
tty_password=1;
|
||||
break;
|
||||
#ifndef DONT_ALLOW_USER_CHANGE
|
||||
case 'u':
|
||||
user=argument;
|
||||
break;
|
||||
#endif
|
||||
case 'P':
|
||||
opt_mysql_port= (unsigned int) atoi(argument);
|
||||
break;
|
||||
case 'S':
|
||||
opt_mysql_unix_port= argument;
|
||||
break;
|
||||
case 'W':
|
||||
#ifdef __WIN__
|
||||
opt_mysql_unix_port=MYSQL_NAMEDPIPE;
|
||||
|
Reference in New Issue
Block a user