summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-07-17 14:35:04 +0200
committerSergei Golubchik <serg@mariadb.org>2018-09-04 08:37:44 +0200
commit22bcfa011acd81c44c2ad969a0edc2401a32a311 (patch)
tree165f6ab775eb9af5418970292325c87a83a817e9 /sql/table.cc
parentb9bc3c24630980b260b91fc856689dbad336064e (diff)
downloadmariadb-git-22bcfa011acd81c44c2ad969a0edc2401a32a311.tar.gz
cleanup: FOREIGN_KEY_INFO
instead of returning strings for CASCADE/RESTRICT from every storage engine, use enum values Backport of a3614d33e8a
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 5ea5d8cf3c5..144720986f2 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -7251,3 +7251,16 @@ double KEY::actual_rec_per_key(uint i)
read_stats->get_avg_frequency(i) : (double) rec_per_key[i]);
}
+LEX_CSTRING *fk_option_name(enum_fk_option opt)
+{
+ static LEX_CSTRING names[]=
+ {
+ { STRING_WITH_LEN("???") },
+ { STRING_WITH_LEN("RESTRICT") },
+ { STRING_WITH_LEN("CASCADE") },
+ { STRING_WITH_LEN("SET NULL") },
+ { STRING_WITH_LEN("NO ACTION") },
+ { STRING_WITH_LEN("SET DEFAULT") }
+ };
+ return names + opt;
+}