mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
This commit is contained in:
@ -3338,14 +3338,10 @@ unsent_create_error:
|
||||
{
|
||||
DBUG_ASSERT(first_table == all_tables && first_table != 0);
|
||||
uint privilege= (lex->duplicates == DUP_REPLACE ?
|
||||
INSERT_ACL | DELETE_ACL : INSERT_ACL);
|
||||
INSERT_ACL | DELETE_ACL : INSERT_ACL) |
|
||||
(lex->local_file ? 0 : FILE_ACL);
|
||||
|
||||
if (!lex->local_file)
|
||||
{
|
||||
if (check_access(thd, privilege | FILE_ACL, first_table->db, 0, 0, 0))
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
if (lex->local_file)
|
||||
{
|
||||
if (!(thd->client_capabilities & CLIENT_LOCAL_FILES) ||
|
||||
! opt_local_infile)
|
||||
@ -3353,12 +3349,14 @@ unsent_create_error:
|
||||
my_message(ER_NOT_ALLOWED_COMMAND, ER(ER_NOT_ALLOWED_COMMAND), MYF(0));
|
||||
goto error;
|
||||
}
|
||||
if (check_one_table_access(thd, privilege, all_tables))
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (check_one_table_access(thd, privilege, all_tables))
|
||||
goto error;
|
||||
|
||||
res= mysql_load(thd, lex->exchange, first_table, lex->field_list,
|
||||
lex->duplicates, lex->ignore, (bool) lex->local_file,
|
||||
lex->lock_option);
|
||||
lex->update_list, lex->value_list, lex->duplicates,
|
||||
lex->ignore, (bool) lex->local_file);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -5848,6 +5846,7 @@ TABLE_LIST *st_select_lex::end_nested_join(THD *thd)
|
||||
{
|
||||
TABLE_LIST *ptr;
|
||||
DBUG_ENTER("end_nested_join");
|
||||
DBUG_ASSERT(embedding);
|
||||
ptr= embedding;
|
||||
join_list= ptr->join_list;
|
||||
embedding= ptr->embedding;
|
||||
@ -5861,6 +5860,12 @@ TABLE_LIST *st_select_lex::end_nested_join(THD *thd)
|
||||
join_list->push_front(embedded);
|
||||
ptr= embedded;
|
||||
}
|
||||
else
|
||||
if (nested_join->join_list.elements == 0)
|
||||
{
|
||||
join_list->pop();
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
DBUG_RETURN(ptr);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user