summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-10-16 13:29:42 +0300
committerGeorgi Kodinov <joro@sun.com>2009-10-16 13:29:42 +0300
commit7b4ef910f7830e85e2bc240b0803b994d6e0446b (patch)
tree4a635fd50a6abdd9b0c814cb889d2996fc60eb3e /sql/sql_load.cc
parentd7cc9194e0d657fb475cf14a3463a976d336b63a (diff)
downloadmariadb-git-7b4ef910f7830e85e2bc240b0803b994d6e0446b.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/sql_load.cc')
-rw-r--r--sql/sql_load.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index e830e29176b..59ba7b16d62 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -654,13 +654,12 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex,
strcpy(end, p);
end += pl;
- thd->query_length= end - load_data_query;
- thd->query= load_data_query;
+ thd->set_query_inner(load_data_query, end - load_data_query);
Execute_load_query_log_event
- e(thd, thd->query, thd->query_length,
- (uint) ((char*)fname_start - (char*)thd->query - 1),
- (uint) ((char*)fname_end - (char*)thd->query),
+ e(thd, thd->query(), thd->query_length(),
+ (uint) ((char*) fname_start - (char*) thd->query() - 1),
+ (uint) ((char*) fname_end - (char*) thd->query()),
(duplicates == DUP_REPLACE) ? LOAD_DUP_REPLACE :
(ignore ? LOAD_DUP_IGNORE : LOAD_DUP_ERROR),
transactional_table, FALSE, errcode);