1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

cleanup: FOREIGN_KEY_INFO

instead of returning strings for CASCADE/RESTRICT
from every storage engine, use enum values
This commit is contained in:
Sergei Golubchik
2016-11-10 14:56:51 +01:00
parent 94462aa9e6
commit a3614d33e8
9 changed files with 58 additions and 57 deletions

View File

@ -7365,6 +7365,7 @@ get_referential_constraints_record(THD *thd, TABLE_LIST *tables,
LEX_STRING *db_name, LEX_STRING *table_name)
{
CHARSET_INFO *cs= system_charset_info;
LEX_CSTRING *s;
DBUG_ENTER("get_referential_constraints_record");
if (res)
@ -7409,10 +7410,10 @@ get_referential_constraints_record(THD *thd, TABLE_LIST *tables,
else
table->field[5]->set_null();
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);
table->field[8]->store(f_key_info->delete_method->str,
f_key_info->delete_method->length, cs);
s= fk_option_name(f_key_info->update_method);
table->field[7]->store(s->str, s->length, cs);
s= fk_option_name(f_key_info->delete_method);
table->field[8]->store(s->str, s->length, cs);
if (schema_table_store_record(thd, table))
DBUG_RETURN(1);
}