mirror of
https://github.com/MariaDB/server.git
synced 2026-05-07 07:35:32 +02:00
Auto-merge of patch for bug#11764334 from mysql-5.1 tree.
This commit is contained in:
commit
1be4de546e
6 changed files with 50 additions and 9 deletions
|
|
@ -235,9 +235,16 @@ mysql_event_fill_row(THD *thd,
|
|||
if (fields[f_num= ET_FIELD_NAME]->store(et->name.str, et->name.length, scs))
|
||||
goto err_truncate;
|
||||
|
||||
/* both ON_COMPLETION and STATUS are NOT NULL thus not calling set_notnull()*/
|
||||
/* ON_COMPLETION field is NOT NULL thus not calling set_notnull()*/
|
||||
rs|= fields[ET_FIELD_ON_COMPLETION]->store((longlong)et->on_completion, TRUE);
|
||||
rs|= fields[ET_FIELD_STATUS]->store((longlong)et->status, TRUE);
|
||||
|
||||
/*
|
||||
Set STATUS value unconditionally in case of CREATE EVENT.
|
||||
For ALTER EVENT set it only if value of this field was changed.
|
||||
Since STATUS field is NOT NULL call to set_notnull() is not needed.
|
||||
*/
|
||||
if (!is_update || et->status_changed)
|
||||
rs|= fields[ET_FIELD_STATUS]->store((longlong)et->status, TRUE);
|
||||
rs|= fields[ET_FIELD_ORIGINATOR]->store((longlong)et->originator, TRUE);
|
||||
|
||||
/*
|
||||
|
|
@ -716,8 +723,6 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
|
|||
if (mysql_event_fill_row(thd, table, parse_data, sp, saved_mode, FALSE))
|
||||
goto end;
|
||||
|
||||
table->field[ET_FIELD_STATUS]->store((longlong)parse_data->status, TRUE);
|
||||
|
||||
if ((ret= table->file->ha_write_row(table->record[0])))
|
||||
{
|
||||
table->file->print_error(ret, MYF(0));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue