mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user