mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +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:
@@ -4077,7 +4077,7 @@ static int fast_end_partition(THD *thd, ulonglong copied,
|
||||
|
||||
if ((!is_empty) && (!written_bin_log) &&
|
||||
(!thd->lex->no_write_to_binlog))
|
||||
write_bin_log(thd, FALSE, thd->query, thd->query_length);
|
||||
write_bin_log(thd, FALSE, thd->query(), thd->query_length());
|
||||
|
||||
my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO),
|
||||
(ulong) (copied + deleted),
|
||||
@@ -6235,7 +6235,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
ERROR_INJECT_CRASH("crash_drop_partition_5") ||
|
||||
((!thd->lex->no_write_to_binlog) &&
|
||||
(write_bin_log(thd, FALSE,
|
||||
thd->query, thd->query_length), FALSE)) ||
|
||||
thd->query(), thd->query_length()), FALSE)) ||
|
||||
ERROR_INJECT_CRASH("crash_drop_partition_6") ||
|
||||
((frm_install= TRUE), FALSE) ||
|
||||
mysql_write_frm(lpt, WFRM_INSTALL_SHADOW) ||
|
||||
@@ -6302,7 +6302,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
ERROR_INJECT_CRASH("crash_add_partition_5") ||
|
||||
((!thd->lex->no_write_to_binlog) &&
|
||||
(write_bin_log(thd, FALSE,
|
||||
thd->query, thd->query_length), FALSE)) ||
|
||||
thd->query(), thd->query_length()), FALSE)) ||
|
||||
ERROR_INJECT_CRASH("crash_add_partition_6") ||
|
||||
write_log_rename_frm(lpt) ||
|
||||
(not_completed= FALSE) ||
|
||||
@@ -6392,7 +6392,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table,
|
||||
ERROR_INJECT_CRASH("crash_change_partition_6") ||
|
||||
((!thd->lex->no_write_to_binlog) &&
|
||||
(write_bin_log(thd, FALSE,
|
||||
thd->query, thd->query_length), FALSE)) ||
|
||||
thd->query(), thd->query_length()), FALSE)) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_7") ||
|
||||
mysql_write_frm(lpt, WFRM_INSTALL_SHADOW) ||
|
||||
ERROR_INJECT_CRASH("crash_change_partition_8") ||
|
||||
|
Reference in New Issue
Block a user