summaryrefslogtreecommitdiff
path: root/sql/sql_delete.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
commit8f6f3dba21272158d13cb49e99274167af1461ad (patch)
tree4a635fd50a6abdd9b0c814cb889d2996fc60eb3e /sql/sql_delete.cc
parent9c76415a03a92d19d3d73b0c6e776c89f7863e5e (diff)
downloadmariadb-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/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index a81a5f4641f..b80138af7f2 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -413,7 +413,7 @@ cleanup:
therefore be treated as a DDL.
*/
int log_result= thd->binlog_query(query_type,
- thd->query, thd->query_length,
+ thd->query(), thd->query_length(),
is_trans, FALSE, errcode);
if (log_result)
@@ -850,7 +850,7 @@ void multi_delete::abort()
{
int errcode= query_error_code(thd, thd->killed == THD::NOT_KILLED);
thd->binlog_query(THD::ROW_QUERY_TYPE,
- thd->query, thd->query_length,
+ thd->query(), thd->query_length(),
transactional_tables, FALSE, errcode);
}
thd->transaction.all.modified_non_trans_table= true;
@@ -1024,7 +1024,7 @@ bool multi_delete::send_eof()
else
errcode= query_error_code(thd, killed_status == THD::NOT_KILLED);
if (thd->binlog_query(THD::ROW_QUERY_TYPE,
- thd->query, thd->query_length,
+ thd->query(), thd->query_length(),
transactional_tables, FALSE, errcode) &&
!normal_tables)
{
@@ -1166,7 +1166,7 @@ end:
TRUNCATE must always be statement-based binlogged (not row-based) so
we don't test current_stmt_binlog_row_based.
*/
- write_bin_log(thd, TRUE, thd->query, thd->query_length);
+ write_bin_log(thd, TRUE, thd->query(), thd->query_length());
my_ok(thd); // This should return record count
}
VOID(pthread_mutex_lock(&LOCK_open));