mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
fixed open_and_lock_tables result processing (all open_and_lock_tables revision)
fixed printing of COLLATE operation (BUG#5155) mysql-test/r/case.result: fixed printing of COLLATE operation mysql-test/r/func_if.result: fixed printing of COLLATE operation mysql-test/r/func_in.result: fixed printing of COLLATE operation mysql-test/r/func_str.result: fixed printing of COLLATE operation mysql-test/r/func_test.result: fixed printing of COLLATE operation mysql-test/r/view.result: VIEW with collation mysql-test/t/view.test: VIEW with collation sql/item_strfunc.cc: fixed printing of COLLATE operation sql/item_strfunc.h: fixed printing of COLLATE operation sql/sp_head.cc: fixed open_and_lock_tables result processing sql/sql_base.cc: fixed open_and_lock_tables result processing sql/sql_delete.cc: fixed open_and_lock_tables result processing sql/sql_help.cc: fixed open_and_lock_tables result processing sql/sql_load.cc: fixed open_and_lock_tables result processing sql/sql_parse.cc: fixed open_and_lock_tables result processing sql/sql_prepare.cc: fixed open_and_lock_tables result processing sql/sql_show.cc: fixed open_and_lock_tables result processing sql/sql_update.cc: fixed open_and_lock_tables result processing
This commit is contained in:
@ -897,10 +897,10 @@ static int mysql_test_insert(Prepared_statement *stmt,
|
||||
tables & preparation procedure
|
||||
*/
|
||||
thd->allocate_temporary_memory_pool_for_ps_preparing();
|
||||
if (open_and_lock_tables(thd, table_list))
|
||||
if ((res= open_and_lock_tables(thd, table_list)))
|
||||
{
|
||||
thd->free_temporary_memory_pool_for_ps_preparing();
|
||||
DBUG_RETURN(-1);
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
if ((values= its++))
|
||||
@ -969,9 +969,7 @@ static int mysql_test_update(Prepared_statement *stmt,
|
||||
*/
|
||||
thd->allocate_temporary_memory_pool_for_ps_preparing();
|
||||
|
||||
if (open_and_lock_tables(thd, table_list))
|
||||
res= -1;
|
||||
else
|
||||
if (!(res= open_and_lock_tables(thd, table_list)))
|
||||
{
|
||||
if (!(res= mysql_prepare_update(thd, table_list,
|
||||
&select->where,
|
||||
@ -1030,9 +1028,7 @@ static int mysql_test_delete(Prepared_statement *stmt,
|
||||
*/
|
||||
thd->allocate_temporary_memory_pool_for_ps_preparing();
|
||||
|
||||
if (open_and_lock_tables(thd, table_list))
|
||||
res= -1;
|
||||
else
|
||||
if (!(res= open_and_lock_tables(thd, table_list)))
|
||||
{
|
||||
res= mysql_prepare_delete(thd, table_list, &lex->select_lex.where);
|
||||
lex->unit.cleanup();
|
||||
@ -1065,6 +1061,7 @@ static int mysql_test_select(Prepared_statement *stmt,
|
||||
THD *thd= stmt->thd;
|
||||
LEX *lex= stmt->lex;
|
||||
SELECT_LEX_UNIT *unit= &lex->unit;
|
||||
int res;
|
||||
|
||||
DBUG_ENTER("mysql_test_select");
|
||||
|
||||
@ -1084,11 +1081,11 @@ static int mysql_test_select(Prepared_statement *stmt,
|
||||
tables & preparation procedure
|
||||
*/
|
||||
thd->allocate_temporary_memory_pool_for_ps_preparing();
|
||||
if (open_and_lock_tables(thd, tables))
|
||||
if ((res= open_and_lock_tables(thd, tables)))
|
||||
{
|
||||
send_error(thd);
|
||||
goto err;
|
||||
}
|
||||
res= 1;
|
||||
|
||||
thd->used_tables= 0; // Updated by setup_fields
|
||||
|
||||
@ -1126,7 +1123,7 @@ err_prep:
|
||||
unit->cleanup();
|
||||
err:
|
||||
thd->free_temporary_memory_pool_for_ps_preparing();
|
||||
DBUG_RETURN(1);
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user