summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2019-11-20 13:18:31 +0300
committerAleksey Midenkov <midenok@gmail.com>2019-11-20 13:18:31 +0300
commit5130f5206c150ba1e8a723aae63884ff64408012 (patch)
tree43304b46565bdc6dfbdef24b5f2afcab10e66a37 /sql/sql_class.h
parent20b474be5b75929727c693f91448f12257d1b6d4 (diff)
downloadmariadb-git-5130f5206c150ba1e8a723aae63884ff64408012.tar.gz
MDEV-20480 Obsolete internal parser for FK in InnoDB
Currently InnoDB uses internal parser for adding foreign keys. Remove internal parser and use data parsed by SQL parser (sql_yacc) for adding foreign keys. - create_table_info_t::create_foreign_keys() replacement for dict_create_foreign_constraints_low(); - Pass constraint name via Foreign_key object. Temporary until MDEV-20865: - Pass alter_info as part of create_info.
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 39b7f4dffa3..8fc33523896 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -393,12 +393,14 @@ class Foreign_key: public Key {
public:
enum fk_match_opt { FK_MATCH_UNDEF, FK_MATCH_FULL,
FK_MATCH_PARTIAL, FK_MATCH_SIMPLE};
+ LEX_CSTRING constraint_name;
LEX_CSTRING ref_db;
LEX_CSTRING ref_table;
List<Key_part_spec> ref_columns;
enum enum_fk_option delete_opt, update_opt;
enum fk_match_opt match_opt;
Foreign_key(const LEX_CSTRING *name_arg, List<Key_part_spec> *cols,
+ const LEX_CSTRING *constraint_name_arg,
const LEX_CSTRING *ref_db_arg, const LEX_CSTRING *ref_table_arg,
List<Key_part_spec> *ref_cols,
enum_fk_option delete_opt_arg, enum_fk_option update_opt_arg,
@@ -406,6 +408,7 @@ public:
DDL_options ddl_options)
:Key(FOREIGN_KEY, name_arg, &default_key_create_info, 0, cols, NULL,
ddl_options),
+ constraint_name(*constraint_name_arg),
ref_db(*ref_db_arg), ref_table(*ref_table_arg), ref_columns(*ref_cols),
delete_opt(delete_opt_arg), update_opt(update_opt_arg),
match_opt(match_opt_arg)