Commit adc189ae authored by unknown's avatar unknown

Bug57960 - In ha_innodb.cc, get_foreign_key_info() make sure the

referenced_table name uses the actual length of the table name.
parent a32c56ce
...@@ -24,7 +24,7 @@ MATCH_OPTION NONE ...@@ -24,7 +24,7 @@ MATCH_OPTION NONE
UPDATE_RULE CASCADE UPDATE_RULE CASCADE
DELETE_RULE RESTRICT DELETE_RULE RESTRICT
TABLE_NAME product_order TABLE_NAME product_order
REFERENCED_TABLE_NAME pro REFERENCED_TABLE_NAME product
CONSTRAINT_CATALOG def CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test CONSTRAINT_SCHEMA test
CONSTRAINT_NAME product_order_ibfk_2 CONSTRAINT_NAME product_order_ibfk_2
...@@ -35,7 +35,7 @@ MATCH_OPTION NONE ...@@ -35,7 +35,7 @@ MATCH_OPTION NONE
UPDATE_RULE RESTRICT UPDATE_RULE RESTRICT
DELETE_RULE RESTRICT DELETE_RULE RESTRICT
TABLE_NAME product_order TABLE_NAME product_order
REFERENCED_TABLE_NAME cus REFERENCED_TABLE_NAME customer
DROP TABLE product_order; DROP TABLE product_order;
DROP TABLE product; DROP TABLE product;
DROP TABLE customer; DROP TABLE customer;
...@@ -8358,7 +8358,7 @@ get_foreign_key_info( ...@@ -8358,7 +8358,7 @@ get_foreign_key_info(
/* Referenced (parent) table name */ /* Referenced (parent) table name */
ptr = dict_remove_db_name(foreign->referenced_table_name); ptr = dict_remove_db_name(foreign->referenced_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name)); len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
f_key_info.referenced_table = thd_make_lex_string(thd, 0, name_buff, len, 1); f_key_info.referenced_table = thd_make_lex_string(thd, 0, name_buff, len, 1);
/* Dependent (child) database name */ /* Dependent (child) database name */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment