diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-16 13:29:42 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-16 13:29:42 +0300 |
commit | 8f6f3dba21272158d13cb49e99274167af1461ad (patch) | |
tree | 4a635fd50a6abdd9b0c814cb889d2996fc60eb3e /sql/events.cc | |
parent | 9c76415a03a92d19d3d73b0c6e776c89f7863e5e (diff) | |
download | mariadb-git-8f6f3dba21272158d13cb49e99274167af1461ad.tar.gz |
Bug #40877: multi statement execution fails in 5.1.30
Implemented the server infrastructure for the fix:
1. Added a function LEX_STRING *thd_query_string(THD) to return
a LEX_STRING structure instead of char *.
This is the function that must be called in innodb instead of
thd_query()
2. Did some encapsulation in THD : aggregated thd_query and
thd_query_length into a LEX_STRING and made accessor and mutator
methods for easy code updating.
3. Updated the server code to use the new methods where applicable.
Diffstat (limited to 'sql/events.cc')
-rw-r--r-- | sql/events.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/events.cc b/sql/events.cc index 34da0e185b7..458ad61718d 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -465,7 +465,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, if (!dropped) { /* Binlog the create event. */ - DBUG_ASSERT(thd->query && thd->query_length); + DBUG_ASSERT(thd->query() && thd->query_length()); String log_query; if (create_query_string(thd, &log_query)) { @@ -595,8 +595,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. */ - DBUG_ASSERT(thd->query && thd->query_length); - write_bin_log(thd, TRUE, thd->query, thd->query_length); + DBUG_ASSERT(thd->query() && thd->query_length()); + write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } } pthread_mutex_unlock(&LOCK_event_metadata); @@ -670,8 +670,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. */ - DBUG_ASSERT(thd->query && thd->query_length); - write_bin_log(thd, TRUE, thd->query, thd->query_length); + DBUG_ASSERT(thd->query() && thd->query_length()); + write_bin_log(thd, TRUE, thd->query(), thd->query_length()); } pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); |