Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-08-28 10:25:16+02:00, andrey@stripped +6 -0
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@stripped, 2006-08-28 10:25:08+02:00, andrey@stripped +1 -2
Events::drop_event() does not expect anymore a parameter named affected_rows
sql/event_db_repository.cc@stripped, 2006-08-28 10:25:09+02:00, andrey@stripped +2 -6
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@stripped, 2006-08-28 10:25:09+02:00, andrey@stripped +2 -4
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@stripped, 2006-08-28 10:25:09+02:00, andrey@stripped +5 -12
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@stripped, 2006-08-28 10:25:09+02:00, andrey@stripped +3 -5
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@stripped, 2006-08-28 10:25:09+02:00, andrey@stripped +8 -10
Don't send affected rows, because this behavior is not consistent
with the rest of the server for CREATE/ALTER/DROP DDLs
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: andrey
# Host: example.com
# Root: /work/mysql-5.1-runtime-wl3337
--- 1.571/sql/sql_parse.cc 2006-08-28 10:25:27 +02:00
+++ 1.572/sql/sql_parse.cc 2006-08-28 10:25:27 +02:00
@@ -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;
}
--- 1.59/sql/events.cc 2006-08-28 10:25:27 +02:00
+++ 1.60/sql/events.cc 2006-08-28 10:25:27 +02:00
@@ -304,7 +304,6 @@ Events::open_event_table(THD *thd, enum
thd [in] THD
parse_data [in] Event's data from parsing stage
if_not_exists [in] Whether IF NOT EXISTS was specified in the DDL
- rows_affected [out] How many rows were affected
RETURN VALUE
FALSE OK
@@ -316,8 +315,7 @@ Events::open_event_table(THD *thd, enum
*/
bool
-Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists,
- uint *rows_affected)
+Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists)
{
int ret;
DBUG_ENTER("Events::create_event");
@@ -329,8 +327,7 @@ Events::create_event(THD *thd, Event_par
pthread_mutex_lock(&LOCK_event_metadata);
/* On error conditions my_error() is called so no need to handle here */
- if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists,
- rows_affected)))
+ if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists)))
{
if ((ret= event_queue->create_event(thd, parse_data->dbname,
parse_data->name)))
@@ -353,7 +350,6 @@ Events::create_event(THD *thd, Event_par
thd [in] THD
parse_data [in] Event's data from parsing stage
rename_to [in] Set in case of RENAME TO.
- rows_affected [out] How many rows were affected.
RETURN VALUE
FALSE OK
@@ -366,8 +362,7 @@ Events::create_event(THD *thd, Event_par
*/
bool
-Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to,
- uint *rows_affected)
+Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to)
{
int ret;
DBUG_ENTER("Events::update_event");
@@ -406,7 +401,6 @@ Events::update_event(THD *thd, Event_par
name [in] Event's name
if_exists [in] When set and the event does not exist =>
warning onto the stack
- rows_affected [out] Affected number of rows is returned here
only_from_disk [in] Whether to remove the event from the queue too.
In case of Event_job_data::drop() it's needed to
do only disk drop because Event_queue will handle
@@ -419,7 +413,7 @@ Events::update_event(THD *thd, Event_par
bool
Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists,
- uint *rows_affected, bool only_from_disk)
+ bool only_from_disk)
{
int ret;
DBUG_ENTER("Events::drop_event");
@@ -431,8 +425,7 @@ Events::drop_event(THD *thd, LEX_STRING
pthread_mutex_lock(&LOCK_event_metadata);
/* On error conditions my_error() is called so no need to handle here */
- if (!(ret= db_repository->drop_event(thd, dbname, name, if_exists,
- rows_affected)))
+ if (!(ret= db_repository->drop_event(thd, dbname, name, if_exists)))
{
if (!only_from_disk)
event_queue->drop_event(thd, dbname, name);
--- 1.44/sql/events.h 2006-08-28 10:25:27 +02:00
+++ 1.45/sql/events.h 2006-08-28 10:25:27 +02:00
@@ -77,16 +77,14 @@ public:
get_instance();
bool
- create_event(THD *thd, Event_parse_data *parse_data, bool if_exists,
- uint *rows_affected);
+ create_event(THD *thd, Event_parse_data *parse_data, bool if_exists);
bool
- update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to,
- uint *rows_affected);
+ update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to);
bool
drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists,
- uint *rows_affected, bool only_from_disk);
+ bool only_from_disk);
void
drop_schema_events(THD *thd, char *db);
--- 1.15/sql/event_db_repository.cc 2006-08-28 10:25:27 +02:00
+++ 1.16/sql/event_db_repository.cc 2006-08-28 10:25:27 +02:00
@@ -508,7 +508,6 @@ check_parse_params(THD *thd, Event_parse
thd [in] THD
parse_data [in] Object containing info about the event
create_if_not [in] Whether to generate anwarning in case event exists
- rows_affected [out] How many rows were affected
RETURN VALUE
0 OK
@@ -521,7 +520,7 @@ check_parse_params(THD *thd, Event_parse
bool
Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data,
- my_bool create_if_not, uint *rows_affected)
+ my_bool create_if_not)
{
int ret= 0;
CHARSET_INFO *scs= system_charset_info;
@@ -532,7 +531,6 @@ Event_db_repository::create_event(THD *t
DBUG_ENTER("Event_db_repository::create_event");
- *rows_affected= 0;
if (check_parse_params(thd, parse_data))
goto err;
@@ -621,7 +619,6 @@ Event_db_repository::create_event(THD *t
goto err;
}
- *rows_affected= 1;
ok:
if (dbchanged)
(void) mysql_change_db(thd, old_db.str, 1);
@@ -760,7 +757,6 @@ err:
name [in] Event's name
drop_if_exists [in] If set and the event not existing => warning
onto the stack
- rows_affected [out] Affected number of rows is returned heres
RETURN VALUE
FALSE OK
@@ -769,7 +765,7 @@ err:
bool
Event_db_repository::drop_event(THD *thd, LEX_STRING db, LEX_STRING name,
- bool drop_if_exists, uint *rows_affected)
+ bool drop_if_exists)
{
TABLE *table= NULL;
Open_tables_state backup;
--- 1.10/sql/event_db_repository.h 2006-08-28 10:25:27 +02:00
+++ 1.11/sql/event_db_repository.h 2006-08-28 10:25:27 +02:00
@@ -56,16 +56,14 @@ public:
Event_db_repository(){}
bool
- create_event(THD *thd, Event_parse_data *parse_data, my_bool create_if_not,
- uint *rows_affected);
+ create_event(THD *thd, Event_parse_data *parse_data, my_bool create_if_not);
bool
update_event(THD *thd, Event_parse_data *parse_data, LEX_STRING *new_dbname,
LEX_STRING *new_name);
bool
- drop_event(THD *thd, LEX_STRING db, LEX_STRING name, bool drop_if_exists,
- uint *rows_affected);
+ drop_event(THD *thd, LEX_STRING db, LEX_STRING name, bool drop_if_exists);
void
drop_schema_events(THD *thd, LEX_STRING schema);
--- 1.75/sql/event_data_objects.cc 2006-08-28 10:25:27 +02:00
+++ 1.76/sql/event_data_objects.cc 2006-08-28 10:25:27 +02:00
@@ -1437,11 +1437,10 @@ Event_queue_element::mark_last_executed(
int
Event_queue_element::drop(THD *thd)
{
- uint tmp= 0;
DBUG_ENTER("Event_queue_element::drop");
DBUG_RETURN(Events::get_instance()->
- drop_event(thd, dbname, name, FALSE, &tmp, TRUE));
+ drop_event(thd, dbname, name, FALSE, TRUE));
}
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2284) | ahristov | 28 Aug |