Commit c1e264a5 authored by unknown's avatar unknown

after merge fix

parent 6d77ba47
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
MySQL standard format: MySQL standard format:
user_name_part@host_name_part\0 user_name_part@host_name_part\0
*/ */
#define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_BYTE_LENGTH + 2 #define USER_HOST_BUFF_SIZE HOSTNAME_LENGTH + USERNAME_LENGTH + 2
#define LOCAL_HOST "localhost" #define LOCAL_HOST "localhost"
#define LOCAL_HOST_NAMEDPIPE "." #define LOCAL_HOST_NAMEDPIPE "."
......
...@@ -406,7 +406,7 @@ typedef struct st_master_info ...@@ -406,7 +406,7 @@ typedef struct st_master_info
/* the variables below are needed because we can change masters on the fly */ /* the variables below are needed because we can change masters on the fly */
char master_log_name[FN_REFLEN]; char master_log_name[FN_REFLEN];
char host[HOSTNAME_LENGTH+1]; char host[HOSTNAME_LENGTH+1];
char user[USERNAME_BYTE_LENGTH+1]; char user[USERNAME_LENGTH+1];
char password[MAX_PASSWORD_LENGTH+1]; char password[MAX_PASSWORD_LENGTH+1];
my_bool ssl; // enables use of SSL connection if true my_bool ssl; // enables use of SSL connection if true
char ssl_ca[FN_REFLEN], ssl_capath[FN_REFLEN], ssl_cert[FN_REFLEN]; char ssl_ca[FN_REFLEN], ssl_capath[FN_REFLEN], ssl_cert[FN_REFLEN];
......
...@@ -404,16 +404,16 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp, ...@@ -404,16 +404,16 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
{ {
LEX *old_lex= thd->lex, newlex; LEX *old_lex= thd->lex, newlex;
String defstr; String defstr;
char old_db_buf[NAME_BYTE_LEN+1]; char old_db_buf[NAME_LEN+1];
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) }; LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
bool dbchanged; bool dbchanged;
ulong old_sql_mode= thd->variables.sql_mode; ulong old_sql_mode= thd->variables.sql_mode;
ha_rows old_select_limit= thd->variables.select_limit; ha_rows old_select_limit= thd->variables.select_limit;
sp_rcontext *old_spcont= thd->spcont; sp_rcontext *old_spcont= thd->spcont;
char definer_user_name_holder[USERNAME_BYTE_LENGTH + 1]; char definer_user_name_holder[USERNAME_LENGTH + 1];
LEX_STRING_WITH_INIT definer_user_name(definer_user_name_holder, LEX_STRING_WITH_INIT definer_user_name(definer_user_name_holder,
USERNAME_BYTE_LENGTH); USERNAME_LENGTH);
char definer_host_name_holder[HOSTNAME_LENGTH + 1]; char definer_host_name_holder[HOSTNAME_LENGTH + 1];
LEX_STRING_WITH_INIT definer_host_name(definer_host_name_holder, LEX_STRING_WITH_INIT definer_host_name(definer_host_name_holder,
...@@ -511,7 +511,7 @@ db_create_routine(THD *thd, int type, sp_head *sp) ...@@ -511,7 +511,7 @@ db_create_routine(THD *thd, int type, sp_head *sp)
int ret; int ret;
TABLE *table; TABLE *table;
char definer[USER_HOST_BUFF_SIZE]; char definer[USER_HOST_BUFF_SIZE];
char old_db_buf[NAME_BYTE_LEN+1]; char old_db_buf[NAME_LEN+1];
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) }; LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
bool dbchanged; bool dbchanged;
DBUG_ENTER("db_create_routine"); DBUG_ENTER("db_create_routine");
......
...@@ -924,7 +924,7 @@ bool ...@@ -924,7 +924,7 @@ bool
sp_head::execute(THD *thd) sp_head::execute(THD *thd)
{ {
DBUG_ENTER("sp_head::execute"); DBUG_ENTER("sp_head::execute");
char old_db_buf[NAME_BYTE_LEN+1]; char old_db_buf[NAME_LEN+1];
LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) }; LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) };
bool dbchanged; bool dbchanged;
sp_rcontext *ctx; sp_rcontext *ctx;
...@@ -1957,8 +1957,8 @@ sp_head::set_info(longlong created, longlong modified, ...@@ -1957,8 +1957,8 @@ sp_head::set_info(longlong created, longlong modified,
void void
sp_head::set_definer(const char *definer, uint definerlen) sp_head::set_definer(const char *definer, uint definerlen)
{ {
char user_name_holder[USERNAME_BYTE_LENGTH + 1]; char user_name_holder[USERNAME_LENGTH + 1];
LEX_STRING_WITH_INIT user_name(user_name_holder, USERNAME_BYTE_LENGTH); LEX_STRING_WITH_INIT user_name(user_name_holder, USERNAME_LENGTH);
char host_name_holder[HOSTNAME_LENGTH + 1]; char host_name_holder[HOSTNAME_LENGTH + 1];
LEX_STRING_WITH_INIT host_name(host_name_holder, HOSTNAME_LENGTH); LEX_STRING_WITH_INIT host_name(host_name_holder, HOSTNAME_LENGTH);
......
...@@ -54,7 +54,7 @@ static byte* acl_entry_get_key(acl_entry *entry,uint *length, ...@@ -54,7 +54,7 @@ static byte* acl_entry_get_key(acl_entry *entry,uint *length,
} }
#define IP_ADDR_STRLEN (3+1+3+1+3+1+3) #define IP_ADDR_STRLEN (3+1+3+1+3+1+3)
#define ACL_KEY_LENGTH (IP_ADDR_STRLEN+1+NAME_BYTE_LEN+1+USERNAME_BYTE_LENGTH+1) #define ACL_KEY_LENGTH (IP_ADDR_STRLEN+1+NAME_LEN+1+USERNAME_LENGTH+1)
static DYNAMIC_ARRAY acl_hosts,acl_users,acl_dbs; static DYNAMIC_ARRAY acl_hosts,acl_users,acl_dbs;
static MEM_ROOT mem, memex; static MEM_ROOT mem, memex;
...@@ -197,7 +197,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) ...@@ -197,7 +197,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
READ_RECORD read_record_info; READ_RECORD read_record_info;
my_bool return_val= 1; my_bool return_val= 1;
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
char tmp_name[NAME_BYTE_LEN+1]; char tmp_name[NAME_LEN+1];
int password_length; int password_length;
DBUG_ENTER("acl_load"); DBUG_ENTER("acl_load");
...@@ -2264,7 +2264,7 @@ static GRANT_NAME *name_hash_search(HASH *name_hash, ...@@ -2264,7 +2264,7 @@ static GRANT_NAME *name_hash_search(HASH *name_hash,
const char *user, const char *tname, const char *user, const char *tname,
bool exact) bool exact)
{ {
char helping [NAME_BYTE_LEN*2+USERNAME_BYTE_LENGTH+3]; char helping [NAME_LEN*2+USERNAME_LENGTH+3];
uint len; uint len;
GRANT_NAME *grant_name,*found=0; GRANT_NAME *grant_name,*found=0;
HASH_SEARCH_STATE state; HASH_SEARCH_STATE state;
...@@ -3167,7 +3167,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, ...@@ -3167,7 +3167,7 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
{ {
List_iterator <LEX_USER> str_list (list); List_iterator <LEX_USER> str_list (list);
LEX_USER *Str, *tmp_Str; LEX_USER *Str, *tmp_Str;
char tmp_db[NAME_BYTE_LEN+1]; char tmp_db[NAME_LEN+1];
bool create_new_users=0; bool create_new_users=0;
TABLE_LIST tables[2]; TABLE_LIST tables[2];
DBUG_ENTER("mysql_grant"); DBUG_ENTER("mysql_grant");
...@@ -3231,12 +3231,11 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list, ...@@ -3231,12 +3231,11 @@ bool mysql_grant(THD *thd, const char *db, List <LEX_USER> &list,
{ {
result= TRUE; result= TRUE;
continue; continue;
} }
if ((replace_user_table(thd, if (replace_user_table(thd, tables[0].table, *Str,
tables[0].table, (!db ? rights : 0), revoke_grant, create_new_users,
*Str, test(thd->variables.sql_mode &
(!db ? rights : 0), revoke_grant, MODE_NO_AUTO_CREATE_USER)))
create_new_users)))
result= -1; result= -1;
else if (db) else if (db)
{ {
...@@ -3868,7 +3867,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant, ...@@ -3868,7 +3867,7 @@ bool check_grant_all_columns(THD *thd, ulong want_access, GRANT_INFO *grant,
bool check_grant_db(THD *thd,const char *db) bool check_grant_db(THD *thd,const char *db)
{ {
Security_context *sctx= thd->security_ctx; Security_context *sctx= thd->security_ctx;
char helping [NAME_BYTE_LEN+USERNAME_BYTE_LENGTH+2]; char helping [NAME_LEN+USERNAME_LENGTH+2];
uint len; uint len;
bool error= 1; bool error= 1;
......
...@@ -200,7 +200,7 @@ class MYSQL_LOG: public TC_LOG ...@@ -200,7 +200,7 @@ class MYSQL_LOG: public TC_LOG
IO_CACHE log_file; IO_CACHE log_file;
IO_CACHE index_file; IO_CACHE index_file;
char *name; char *name;
char time_buff[20],db[NAME_BYTE_LEN+1]; char time_buff[20],db[NAME_LEN+1];
char log_file_name[FN_REFLEN],index_file_name[FN_REFLEN]; char log_file_name[FN_REFLEN],index_file_name[FN_REFLEN];
/* /*
The max size before rotation (usable only if log_type == LOG_BIN: binary The max size before rotation (usable only if log_type == LOG_BIN: binary
......
...@@ -1662,7 +1662,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, ...@@ -1662,7 +1662,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
password. New clients send the size (1 byte) + string (not null password. New clients send the size (1 byte) + string (not null
terminated, so also '\0' for empty string). terminated, so also '\0' for empty string).
*/ */
char db_buff[NAME_BYTE_LEN+1]; // buffer to store db in utf8 char db_buff[NAME_LEN+1]; // buffer to store db in utf8
char *db= passwd; char *db= passwd;
uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ? uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
*passwd++ : strlen(passwd); *passwd++ : strlen(passwd);
......
...@@ -22,7 +22,7 @@ typedef struct st_slave_info ...@@ -22,7 +22,7 @@ typedef struct st_slave_info
uint32 server_id; uint32 server_id;
uint32 rpl_recovery_rank, master_id; uint32 rpl_recovery_rank, master_id;
char host[HOSTNAME_LENGTH+1]; char host[HOSTNAME_LENGTH+1];
char user[USERNAME_BYTE_LENGTH+1]; char user[USERNAME_LENGTH+1];
char password[MAX_PASSWORD_LENGTH+1]; char password[MAX_PASSWORD_LENGTH+1];
uint16 port; uint16 port;
THD* thd; THD* thd;
......
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