Commit eac7e575 authored by Sergei Golubchik's avatar Sergei Golubchik

Feature_check_constraint status variable

parent 7450cb7f
......@@ -3,6 +3,7 @@ set sql_mode="";
flush status;
show status like "feature%";
Variable_name Value
Feature_check_constraint 0
Feature_delay_key_write 0
Feature_dynamic_columns 0
Feature_fulltext 0
......@@ -158,3 +159,9 @@ drop table t1;
show status like "feature_delay_key_write";
Variable_name Value
Feature_delay_key_write 2
create table t1 (a int check (a > 5));
create table t2 (b int, constraint foo check (b < 10));
drop table t1, t2;
show status like "feature_check_constraint";
Variable_name Value
Feature_check_constraint 2
......@@ -130,3 +130,11 @@ insert into t1 values(2);
drop table t1;
show status like "feature_delay_key_write";
#
# Feature CHECK CONSTRAINT
#
create table t1 (a int check (a > 5));
create table t2 (b int, constraint foo check (b < 10));
drop table t1, t2;
show status like "feature_check_constraint";
......@@ -530,7 +530,7 @@ ulong extra_max_connections;
uint max_digest_length= 0;
ulong slave_retried_transactions;
ulonglong slave_skipped_errors;
ulong feature_files_opened_with_delayed_keys;
ulong feature_files_opened_with_delayed_keys= 0, feature_check_constraint= 0;
ulonglong denied_connections;
my_decimal decimal_zero;
......@@ -8390,6 +8390,7 @@ SHOW_VAR status_vars[]= {
{"Empty_queries", (char*) offsetof(STATUS_VAR, empty_queries), SHOW_LONG_STATUS},
{"Executed_events", (char*) &executed_events, SHOW_LONG_NOFLUSH },
{"Executed_triggers", (char*) offsetof(STATUS_VAR, executed_triggers), SHOW_LONG_STATUS},
{"Feature_check_constraint", (char*) &feature_check_constraint, SHOW_LONG },
{"Feature_delay_key_write", (char*) &feature_files_opened_with_delayed_keys, SHOW_LONG },
{"Feature_dynamic_columns", (char*) offsetof(STATUS_VAR, feature_dynamic_columns), SHOW_LONG_STATUS},
{"Feature_fulltext", (char*) offsetof(STATUS_VAR, feature_fulltext), SHOW_LONG_STATUS},
......
......@@ -823,8 +823,7 @@ typedef struct system_status_var
Global status variables
*/
extern ulong feature_files_opened_with_delayed_keys;
extern ulong feature_files_opened_with_delayed_keys, feature_check_constraint;
void add_to_status(STATUS_VAR *to_var, STATUS_VAR *from_var);
......
......@@ -2306,6 +2306,7 @@ int TABLE_SHARE::init_from_binary_frm_image(THD *thd, bool write,
bitmap_count= 1;
if (share->table_check_constraints)
{
feature_check_constraint++;
if (!(share->check_set= (MY_BITMAP*)
alloc_root(&share->mem_root, sizeof(*share->check_set))))
goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment