Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
eac7e575
Commit
eac7e575
authored
Jul 25, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature_check_constraint status variable
parent
7450cb7f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
3 deletions
+19
-3
mysql-test/r/features.result
mysql-test/r/features.result
+7
-0
mysql-test/t/features.test
mysql-test/t/features.test
+8
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-1
sql/sql_class.h
sql/sql_class.h
+1
-2
sql/table.cc
sql/table.cc
+1
-0
No files found.
mysql-test/r/features.result
View file @
eac7e575
...
...
@@ -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
mysql-test/t/features.test
View file @
eac7e575
...
...
@@ -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"
;
sql/mysqld.cc
View file @
eac7e575
...
...
@@ -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
},
...
...
sql/sql_class.h
View file @
eac7e575
...
...
@@ -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
);
...
...
sql/table.cc
View file @
eac7e575
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment