diff options
author | kostja@vajra.(none) <> | 2007-04-14 18:31:43 -0400 |
---|---|---|
committer | kostja@vajra.(none) <> | 2007-04-14 18:31:43 -0400 |
commit | e0f0ba802fc22591eac1100945c3dce93941a06d (patch) | |
tree | 36414f6ea7bc72f95a3ae8ca31aecf53e73b8263 /sql/events.cc | |
parent | 3f72507d0d9e935b0a6badcf20c0dbff06860658 (diff) | |
parent | 8dcc629cad7ca0f2632dfbbe6e82b56fdb386544 (diff) | |
download | mariadb-git-e0f0ba802fc22591eac1100945c3dce93941a06d.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into vajra.(none):/opt/local/work/mysql-5.1-runtime
Diffstat (limited to 'sql/events.cc')
-rw-r--r-- | sql/events.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/events.cc b/sql/events.cc index 7a6323a9a63..7838972a5d6 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -424,7 +424,8 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, if (event_queue) event_queue->create_event(thd, new_element, &created); /* Binlog the create event. */ - if (mysql_bin_log.is_open() && (thd->query_length > 0)) + DBUG_ASSERT(thd->query && thd->query_length); + if (mysql_bin_log.is_open()) { thd->clear_error(); thd->binlog_query(THD::MYSQL_QUERY_TYPE, @@ -549,7 +550,8 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, event_queue->update_event(thd, parse_data->dbname, parse_data->name, new_element); /* Binlog the alter event. */ - if (mysql_bin_log.is_open() && (thd->query_length > 0)) + DBUG_ASSERT(thd->query && thd->query_length); + if (mysql_bin_log.is_open()) { thd->clear_error(); thd->binlog_query(THD::MYSQL_QUERY_TYPE, @@ -628,7 +630,8 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) if (event_queue) event_queue->drop_event(thd, dbname, name); /* Binlog the drop event. */ - if (mysql_bin_log.is_open() && (thd->query_length > 0)) + DBUG_ASSERT(thd->query && thd->query_length); + if (mysql_bin_log.is_open()) { thd->clear_error(); thd->binlog_query(THD::MYSQL_QUERY_TYPE, |