summaryrefslogtreecommitdiff
path: root/storage/innobase/trx/trx0trx.c
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2010-05-14 16:02:28 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2010-05-14 16:02:28 +0300
commitc3c2279cbd8427f29c3e884336b154ddf0a803c7 (patch)
treef222db304a15efa12714a2ba4e44ec27195aa5f8 /storage/innobase/trx/trx0trx.c
parent162ab29157201ca075fccd405bb23f2626a11a9c (diff)
downloadmariadb-git-c3c2279cbd8427f29c3e884336b154ddf0a803c7.tar.gz
Make the InnoDB FOREIGN KEY parser understand multi-statements. (Bug #48024)
Also make InnoDB thinks that /*/ only starts a comment. (Bug #53644). struct trx_struct: Add mysql_query_len. ha_innodb.cc: Use trx_query_string() instead of trx_query() and initialize trx->mysql_query_len. INNOBASE_COPY_STMT(thd, trx): New macro, to initialize trx->mysql_query_str and trx->mysql_query_len. dict_strip_comments(): Add and observe the parameter sql_length. Treat /*/ as the start of a comment. dict_create_foreign_constraints(), row_table_add_foreign_constraints(): Add the parameter sql_length.
Diffstat (limited to 'storage/innobase/trx/trx0trx.c')
-rw-r--r--storage/innobase/trx/trx0trx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
index fae479feddc..545226a5994 100644
--- a/storage/innobase/trx/trx0trx.c
+++ b/storage/innobase/trx/trx0trx.c
@@ -131,6 +131,8 @@ trx_create(
trx->mysql_thd = NULL;
trx->mysql_query_str = NULL;
+ trx->mysql_query_len = NULL;
+
trx->active_trans = 0;
trx->duplicates = 0;
@@ -936,6 +938,7 @@ trx_commit_off_kernel(
trx->undo_no = ut_dulint_zero;
trx->last_sql_stat_start.least_undo_no = ut_dulint_zero;
trx->mysql_query_str = NULL;
+ trx->mysql_query_len = NULL;
ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0);
ut_ad(UT_LIST_GET_LEN(trx->trx_locks) == 0);