1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge with 5.1-release.

- Fixed problem with oqgraph and 'make dist'

Note that after this merge we have a problem show in join_outer where we examine too many rows in one specific case (related to BUG#57024).
This will be fixed when mwl#128 is merged into 5.3.
This commit is contained in:
Michael Widenius
2010-12-06 10:25:44 +02:00
604 changed files with 12868 additions and 6394 deletions

View File

@ -1983,6 +1983,7 @@ bool Table_triggers_list::process_triggers(THD *thd,
bool err_status;
Sub_statement_state statement_state;
sp_head *sp_trigger= bodies[event][time_type];
SELECT_LEX *save_current_select;
if (sp_trigger == NULL)
return FALSE;
@ -2006,11 +2007,19 @@ bool Table_triggers_list::process_triggers(THD *thd,
thd->reset_sub_statement_state(&statement_state, SUB_STMT_TRIGGER);
/*
Reset current_select before call execute_trigger() and
restore it after return from one. This way error is set
in case of failure during trigger execution.
*/
save_current_select= thd->lex->current_select;
thd->lex->current_select= NULL;
err_status=
sp_trigger->execute_trigger(thd,
&trigger_table->s->db,
&trigger_table->s->table_name,
&subject_table_grants[event][time_type]);
thd->lex->current_select= save_current_select;
thd->restore_sub_statement_state(&statement_state);