summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-02-23 13:41:46 +0100
committerSergei Golubchik <serg@mariadb.org>2018-02-24 01:28:50 +0100
commit794f71cbc412d17a09eed8f003119cef03880462 (patch)
treea4f35ec3e6d2df0fc773aa80653868235d349c69 /sql/table.cc
parent17f8e0ecdf68846d6fb5e157e003794ba9a959c2 (diff)
downloadmariadb-git-794f71cbc412d17a09eed8f003119cef03880462.tar.gz
create a reusable function that tells what FK actions can write
and few indentation changes
Diffstat (limited to 'sql/table.cc')
-rw-r--r--sql/table.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 7d3d7412ba5..b39ead6d8a8 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -8554,6 +8554,12 @@ LEX_CSTRING *fk_option_name(enum_fk_option opt)
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];
+}
+
enum TR_table::enabled TR_table::use_transaction_registry= TR_table::MAYBE;
TR_table::TR_table(THD* _thd, bool rw) :