Change back service name to MySQL

Don't add service name to read config file segments if it's "MySQL"
Fixed possible memory leak when CHANGE USER failed.


include/mysql_com.h:
  Change back service name to MySQL (With new, better spelling)
myisam/myisamchk.c:
  Improved --help
sql/mysqld.cc:
  Don't add service name to read config file segments if it's "MySQL"
sql/sql_parse.cc:
  Fixed possible memory leak when CHANGE USER failed.
This commit is contained in:
unknown 2003-10-30 01:01:53 +02:00
commit 7da08881a3
4 changed files with 22 additions and 10 deletions

View file

@ -1013,14 +1013,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
char *save_user= thd->user;
char *save_priv_user= thd->priv_user;
char *save_db= thd->db;
thd->user=0;
USER_CONN *save_uc= thd->user_connect;
USER_CONN *save_user_connect= thd->user_connect;
if ((uint) ((uchar*) db - net->read_pos) > packet_length)
{ // Check if protocol is ok
send_error(net, ER_UNKNOWN_COM_ERROR);
break;
}
/* Clear variables that are allocated */
thd->user= 0;
thd->user_connect= 0;
if (check_user(thd, COM_CHANGE_USER, user, passwd, db, 0))
{ // Restore old user
x_free(thd->user);
@ -1030,10 +1033,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->db_length=save_db_length;
thd->user=save_user;
thd->priv_user=save_priv_user;
thd->user_connect= save_user_connect;
break;
}
if (save_uc)
decrease_user_connections(save_uc);
if (save_user_connect)
decrease_user_connections(save_user_connect);
x_free((gptr) save_db);
x_free((gptr) save_user);
break;