1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

mysql-5.5.28

This commit is contained in:
Sergei Golubchik
2012-10-16 13:04:42 +02:00
124 changed files with 3353 additions and 713 deletions

View File

@@ -5004,8 +5004,6 @@ restart:
*/
if (thd->locked_tables_mode <= LTM_LOCK_TABLES)
{
bool need_prelocking= FALSE;
TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
/*
Process elements of the prelocking set which are present there
since parsing stage or were added to it by invocations of
@@ -5018,10 +5016,19 @@ restart:
for (Sroutine_hash_entry *rt= *sroutine_to_open; rt;
sroutine_to_open= &rt->next, rt= rt->next)
{
bool need_prelocking= false;
TABLE_LIST **save_query_tables_last= thd->lex->query_tables_last;
error= open_and_process_routine(thd, thd->lex, rt, prelocking_strategy,
has_prelocking_list, &ot_ctx,
&need_prelocking);
if (need_prelocking && ! thd->lex->requires_prelocking())
thd->lex->mark_as_requiring_prelocking(save_query_tables_last);
if (need_prelocking && ! *start)
*start= thd->lex->query_tables;
if (error)
{
if (ot_ctx.can_recover_from_failed_open())
@@ -5042,12 +5049,6 @@ restart:
goto err;
}
}
if (need_prelocking && ! thd->lex->requires_prelocking())
thd->lex->mark_as_requiring_prelocking(save_query_tables_last);
if (need_prelocking && ! *start)
*start= thd->lex->query_tables;
}
}
@@ -5320,6 +5321,12 @@ static bool check_lock_and_start_stmt(THD *thd,
thr_lock_type lock_type;
DBUG_ENTER("check_lock_and_start_stmt");
/*
Prelocking placeholder is not set for TABLE_LIST that
are directly used by TOP level statement.
*/
DBUG_ASSERT(table_list->prelocking_placeholder == false);
/*
TL_WRITE_DEFAULT and TL_READ_DEFAULT are supposed to be parser only
types of locks so they should be converted to appropriate other types