diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2010-05-14 16:02:28 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2010-05-14 16:02:28 +0300 |
commit | c3c2279cbd8427f29c3e884336b154ddf0a803c7 (patch) | |
tree | f222db304a15efa12714a2ba4e44ec27195aa5f8 /storage/innobase/row/row0mysql.c | |
parent | 162ab29157201ca075fccd405bb23f2626a11a9c (diff) | |
download | mariadb-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/row/row0mysql.c')
-rw-r--r-- | storage/innobase/row/row0mysql.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index a0e0ee99775..20fb69499a1 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -2103,6 +2103,7 @@ row_table_add_foreign_constraints( FOREIGN KEY (a, b) REFERENCES table2(c, d), table2 can be written also with the database name before it: test.table2 */ + size_t sql_length, /* in: length of sql_string */ const char* name, /* in: table full name in the normalized form database_name/table_name */ @@ -2124,8 +2125,8 @@ row_table_add_foreign_constraints( trx->dict_operation = TRUE; - err = dict_create_foreign_constraints(trx, sql_string, name, - reject_fks); + err = dict_create_foreign_constraints(trx, sql_string, sql_length, + name, reject_fks); if (err == DB_SUCCESS) { /* Check that also referencing constraints are ok */ |