diff options
author | unknown <monty@mishka.local> | 2005-08-25 09:38:06 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2005-08-25 09:38:06 +0300 |
commit | 5baa13ce126763bb66254b52b459bc37e701fa01 (patch) | |
tree | ed04445facd46f2bf63cc4b447547d80845bd6e6 /sql | |
parent | 173e5df37fb315099f9e89ce7d686528e24de5c5 (diff) | |
download | mariadb-git-5baa13ce126763bb66254b52b459bc37e701fa01.tar.gz |
After merge fixes
mysql-test/r/subselect2.result:
After merge fix
sql/handler.cc:
Remove compiler warning
sql/sql_acl.cc:
After merge fix
sql/sql_db.cc:
After merge fix
Diffstat (limited to 'sql')
-rw-r--r-- | sql/handler.cc | 2 | ||||
-rw-r--r-- | sql/sql_acl.cc | 17 | ||||
-rw-r--r-- | sql/sql_db.cc | 6 |
3 files changed, 14 insertions, 11 deletions
diff --git a/sql/handler.cc b/sql/handler.cc index 0b247f83af1..cf1fbfec465 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1023,7 +1023,7 @@ bool mysql_xa_recover(THD *thd) DBUG_RETURN(1); pthread_mutex_lock(&LOCK_xid_cache); - while (xs=(XID_STATE*)hash_element(&xid_cache, i++)) + while ((xs= (XID_STATE*)hash_element(&xid_cache, i++))) { if (xs->xa_state==XA_PREPARED) { diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 13d84129d8e..4629752c6a7 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2494,7 +2494,7 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name, The following should always succeed as new users are created before this function is called! */ - if (!find_acl_user(combo.host.str,combo.user.str)) + if (!find_acl_user(combo.host.str, combo.user.str, FALSE)) { my_error(ER_PASSWORD_NO_MATCH,MYF(0)); DBUG_RETURN(-1); @@ -4611,11 +4611,12 @@ static int handle_grant_struct(uint struct_no, bool drop, ACL_DB *acl_db; GRANT_NAME *grant_name; DBUG_ENTER("handle_grant_struct"); + DBUG_PRINT("info",("scan struct: %u search: '%s'@'%s'", + struct_no, user_from->user.str, user_from->host.str)); + LINT_INIT(acl_user); LINT_INIT(acl_db); LINT_INIT(grant_name); - DBUG_PRINT("info",("scan struct: %u search: '%s'@'%s'", - struct_no, user_from->user.str, user_from->host.str)); /* Get the number of elements in the in-memory structure. */ switch (struct_no) { @@ -5311,10 +5312,12 @@ bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name, combo->user.str= thd->user; - if (!find_acl_user(combo->host.str=(char*)thd->host_or_ip, combo->user.str) && - !find_acl_user(combo->host.str=(char*)thd->host, combo->user.str) && - !find_acl_user(combo->host.str=(char*)thd->ip, combo->user.str) && - !find_acl_user(combo->host.str=(char*)"%", combo->user.str)) + if (!find_acl_user(combo->host.str=(char*)thd->host_or_ip, combo->user.str, + FALSE) && + !find_acl_user(combo->host.str=(char*)thd->host, combo->user.str, + FALSE) && + !find_acl_user(combo->host.str=(char*)thd->ip, combo->user.str, FALSE) && + !find_acl_user(combo->host.str=(char*)"%", combo->user.str, FALSE)) DBUG_RETURN(TRUE); bzero((char*)tables, sizeof(TABLE_LIST)); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 27f20753475..5ca3f07f0bd 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -706,14 +706,14 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) query_end= query + MAX_DROP_TABLE_Q_LEN; db_len= strlen(db); - for (tbl= dropped_tables; tbl; tbl= tbl->next) + for (tbl= dropped_tables; tbl; tbl= tbl->next_local) { uint tbl_name_len; if (!tbl->was_dropped) continue; /* 3 for the quotes and the comma*/ - tbl_name_len= strlen(tbl->real_name) + 3; + tbl_name_len= strlen(tbl->table_name) + 3; if (query_pos + tbl_name_len + 1 >= query_end) { write_to_binlog(thd, query, query_pos -1 - query, db, db_len); @@ -721,7 +721,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) } *query_pos++ = '`'; - query_pos= strmov(query_pos,tbl->real_name); + query_pos= strmov(query_pos,tbl->table_name); *query_pos++ = '`'; *query_pos++ = ','; } |