summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-09-06 22:45:19 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2018-09-06 22:45:19 +0200
commit31081593aabb116b6d8f86b6c7e76126edb392b4 (patch)
tree767a069f255359b5ea37e7c491dfeacf6e519fad /sql/table.cc
parentb0026e33af8fc3b25a42099c096a84591fd550e2 (diff)
parent3a4242fd57b3a2235d2478ed080941b67a82ad1b (diff)
downloadmariadb-git-31081593aabb116b6d8f86b6c7e76126edb392b4.tar.gz
Merge branch '11.0' into 10.1
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index b3a1c2eaa3d..e1edcc0b407 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -411,6 +411,7 @@ void TABLE_SHARE::destroy()
ha_share= NULL; // Safety
}
+ delete_stat_values_for_table_share(this);
free_root(&stats_cb.mem_root, MYF(0));
stats_cb.stats_can_be_read= FALSE;
stats_cb.stats_is_read= FALSE;
@@ -7509,3 +7510,23 @@ double KEY::actual_rec_per_key(uint i)
return (is_statistics_from_stat_tables ?
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;
+}
+
+bool fk_modifies_child(enum_fk_option opt)
+{
+ static bool can_write[]= { false, false, true, true, false, true };
+ return can_write[opt];
+}