mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Feature_check_constraint status variable
This commit is contained in:
parent
7450cb7f69
commit
eac7e57529
5 changed files with 19 additions and 3 deletions
|
@ -3,6 +3,7 @@ set sql_mode="";
|
||||||
flush status;
|
flush status;
|
||||||
show status like "feature%";
|
show status like "feature%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
Feature_check_constraint 0
|
||||||
Feature_delay_key_write 0
|
Feature_delay_key_write 0
|
||||||
Feature_dynamic_columns 0
|
Feature_dynamic_columns 0
|
||||||
Feature_fulltext 0
|
Feature_fulltext 0
|
||||||
|
@ -158,3 +159,9 @@ drop table t1;
|
||||||
show status like "feature_delay_key_write";
|
show status like "feature_delay_key_write";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Feature_delay_key_write 2
|
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;
|
drop table t1;
|
||||||
|
|
||||||
show status like "feature_delay_key_write";
|
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;
|
uint max_digest_length= 0;
|
||||||
ulong slave_retried_transactions;
|
ulong slave_retried_transactions;
|
||||||
ulonglong slave_skipped_errors;
|
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;
|
ulonglong denied_connections;
|
||||||
my_decimal decimal_zero;
|
my_decimal decimal_zero;
|
||||||
|
|
||||||
|
@ -8390,6 +8390,7 @@ SHOW_VAR status_vars[]= {
|
||||||
{"Empty_queries", (char*) offsetof(STATUS_VAR, empty_queries), SHOW_LONG_STATUS},
|
{"Empty_queries", (char*) offsetof(STATUS_VAR, empty_queries), SHOW_LONG_STATUS},
|
||||||
{"Executed_events", (char*) &executed_events, SHOW_LONG_NOFLUSH },
|
{"Executed_events", (char*) &executed_events, SHOW_LONG_NOFLUSH },
|
||||||
{"Executed_triggers", (char*) offsetof(STATUS_VAR, executed_triggers), SHOW_LONG_STATUS},
|
{"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_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_dynamic_columns", (char*) offsetof(STATUS_VAR, feature_dynamic_columns), SHOW_LONG_STATUS},
|
||||||
{"Feature_fulltext", (char*) offsetof(STATUS_VAR, feature_fulltext), 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
|
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);
|
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;
|
bitmap_count= 1;
|
||||||
if (share->table_check_constraints)
|
if (share->table_check_constraints)
|
||||||
{
|
{
|
||||||
|
feature_check_constraint++;
|
||||||
if (!(share->check_set= (MY_BITMAP*)
|
if (!(share->check_set= (MY_BITMAP*)
|
||||||
alloc_root(&share->mem_root, sizeof(*share->check_set))))
|
alloc_root(&share->mem_root, sizeof(*share->check_set))))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Reference in a new issue