Commit 5baa13ce authored by unknown's avatar unknown

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
parent 173e5df3
......@@ -121,8 +121,8 @@ c373e9f5ad07993f3859444553544200 Last Discussion c373e9f5ad079174ff1744455354420
EXPLAIN SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion';
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL DDOCTYPEID_IDX NULL NULL NULL 9 Using where
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 34 test.t2.DOCID 1
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 34 test.t2.DOCTYPEID 1
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 32 test.t2.DOCID 1
2 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where
3 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where
4 DEPENDENT SUBQUERY t3 unique_subquery PRIMARY,FFOLDERID_IDX PRIMARY 34 func 1 Using index; Using where
......
......@@ -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)
{
......
......@@ -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));
......
......@@ -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++ = ',';
}
......
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