1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

WL#3337 (Event scheduler new architecture)

Don't send affected rows after CREATE/ALTER/DROP EVENT as this is
inconsistent with the rest of the server in terms of CREATE/ALTER/DROP
DDLs


sql/event_data_objects.cc:
  Events::drop_event() does not expect anymore a parameter named affected_rows
sql/event_db_repository.cc:
  Remove rows_affected as the behavior exposed by Events is not
  coherent with the behavior of many other DDL, like CREATE PROCEDURE, etc.
sql/event_db_repository.h:
  Remove rows_affected as the behavior exposed by Events is not
  coherent with the behavior of many other DDL, like CREATE PROCEDURE, etc.
sql/events.cc:
  Remove rows_affected as the behavior exposed by Events is not
  coherent with the behavior of many other DDL, like CREATE PROCEDURE, etc.
sql/events.h:
  Remove rows_affected as the behavior exposed by Events is not
  coherent with the behavior of many other DDL, like CREATE PROCEDURE, etc.
sql/sql_parse.cc:
  Don't send affected rows, because this behavior is not consistent
  with the rest of the server for CREATE/ALTER/DROP DDLs
This commit is contained in:
unknown
2006-08-28 10:27:42 +02:00
parent bd868fb60c
commit f18ec676a0
6 changed files with 21 additions and 39 deletions

View File

@ -3897,24 +3897,23 @@ end_with_restore_list:
case SQLCOM_CREATE_EVENT:
case SQLCOM_ALTER_EVENT:
{
uint affected= 1;
DBUG_ASSERT(lex->event_parse_data);
switch (lex->sql_command) {
case SQLCOM_CREATE_EVENT:
res= Events::get_instance()->
create_event(thd, lex->event_parse_data,
lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS,
&affected);
lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS);
break;
case SQLCOM_ALTER_EVENT:
res= Events::get_instance()->
update_event(thd, lex->event_parse_data, lex->spname, &affected);
res= Events::get_instance()->update_event(thd, lex->event_parse_data,
lex->spname);
break;
default:;
default:
DBUG_ASSERT(0);
}
DBUG_PRINT("info",("DDL error code=%d affected=%d", res, affected));
DBUG_PRINT("info",("DDL error code=%d", res));
if (!res)
send_ok(thd, affected);
send_ok(thd);
/* Don't do it, if we are inside a SP */
if (!thd->spcont)
@ -3956,9 +3955,8 @@ end_with_restore_list:
lex->spname->m_db,
lex->spname->m_name,
lex->drop_if_exists,
&affected,
FALSE)))
send_ok(thd, affected);
send_ok(thd);
}
break;
}