1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug#21713 incorrect value for the REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME column

added new field 'REFERENCED_TABLE_NAME' to 'referential_constraints' table
field 'UNIQUE_CONSTRAINT_NAME' contains the name of the referenced index


mysql-test/r/information_schema_inno.result:
  result fix
mysql-test/t/information_schema_inno.test:
  test fix
sql/sql_show.cc:
  added new field 'REFERENCED_TABLE_NAME' to 'referential_constraints' table
  field 'UNIQUE_CONSTRAINT_NAME' contains the name of the referenced index
sql/table.h:
  added 'referenced_key_name' member to 'st_foreign_key_info' struct
storage/innobase/handler/ha_innodb.cc:
  added the filling of referenced key name
This commit is contained in:
unknown
2007-01-15 13:39:28 +04:00
parent d02e09ee80
commit 9af4bbc7b0
5 changed files with 24 additions and 15 deletions

View File

@ -4497,8 +4497,10 @@ get_referential_constraints_record(THD *thd, struct st_table_list *tables,
f_key_info->forein_id->length, cs);
table->field[4]->store(f_key_info->referenced_db->str,
f_key_info->referenced_db->length, cs);
table->field[5]->store(f_key_info->referenced_table->str,
table->field[10]->store(f_key_info->referenced_table->str,
f_key_info->referenced_table->length, cs);
table->field[5]->store(f_key_info->referenced_key_name->str,
f_key_info->referenced_key_name->length, cs);
table->field[6]->store(STRING_WITH_LEN("NONE"), cs);
table->field[7]->store(f_key_info->update_method->str,
f_key_info->update_method->length, cs);
@ -5668,6 +5670,7 @@ ST_FIELD_INFO referential_constraints_fields_info[]=
{"UPDATE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
{"DELETE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
{"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
{"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
};