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
b6f05502
Commit
b6f05502
authored
Aug 25, 2018
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make funcs_1.is_check_constraints deterministic
parent
d526679e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
mysql-test/suite/funcs_1/r/is_check_constraints.result
mysql-test/suite/funcs_1/r/is_check_constraints.result
+23
-23
mysql-test/suite/funcs_1/t/is_check_constraints.test
mysql-test/suite/funcs_1/t/is_check_constraints.test
+8
-8
No files found.
mysql-test/suite/funcs_1/r/is_check_constraints.result
View file @
b6f05502
...
...
@@ -7,7 +7,7 @@ create table t0
(
t int, check (t>32) # table constraint
) ENGINE=myisam;
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1
...
...
@@ -15,20 +15,20 @@ TABLE_NAME t0
CHECK_CLAUSE `t` > 32
ALTER TABLE t0
ADD CONSTRAINT CHK_t0_t CHECK(t<100);
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME C
ONSTRAINT_1
CONSTRAINT_NAME C
HK_t0_t
TABLE_NAME t0
CHECK_CLAUSE `t`
> 32
CHECK_CLAUSE `t`
< 100
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME C
HK_t0_t
CONSTRAINT_NAME C
ONSTRAINT_1
TABLE_NAME t0
CHECK_CLAUSE `t`
< 100
CHECK_CLAUSE `t`
> 32
ALTER TABLE t0
DROP CONSTRAINT CHK_t0_t;
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1
...
...
@@ -38,17 +38,17 @@ CREATE TABLE t1
( t int CHECK(t>2), # field constraint
tt int, CONSTRAINT CHK_tt CHECK(tt<100) # table constraint
) ENGINE=InnoDB;
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME t
CONSTRAINT_NAME
CHK_t
t
TABLE_NAME t1
CHECK_CLAUSE `t
` > 2
CHECK_CLAUSE `t
t` < 100
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME
CHK_t
t
CONSTRAINT_NAME t
TABLE_NAME t1
CHECK_CLAUSE `t
t` < 100
CHECK_CLAUSE `t
` > 2
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1
...
...
@@ -56,7 +56,7 @@ TABLE_NAME t0
CHECK_CLAUSE `t` > 32
ALTER TABLE t1
DROP CONSTRAINT CHK_tt;
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME t
...
...
@@ -74,7 +74,7 @@ start_date DATE,
end_date DATE,
CONSTRAINT CHK_dates CHECK(start_date IS NULL) #table constraint
)ENGINE=Innodb;
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME name
...
...
@@ -97,7 +97,7 @@ TABLE_NAME t0
CHECK_CLAUSE `t` > 32
ALTER TABLE t1
ADD CONSTRAINT CHK_new_ CHECK(t>tt);
SELECT * from information_schema.check_constraints;
SELECT * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME name
...
...
@@ -115,29 +115,29 @@ TABLE_NAME t1
CHECK_CLAUSE `t` > 2
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_new_
TABLE_NAME t1
CHECK_CLAUSE `t` > `tt`
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CONSTRAINT_1
TABLE_NAME t0
CHECK_CLAUSE `t` > 32
CONSTRAINT_CATALOG def
CONSTRAINT_SCHEMA test
CONSTRAINT_NAME CHK_new_
TABLE_NAME t1
CHECK_CLAUSE `t` > `tt`
create table t3
(
a int,
b int check (b>0), # field constraint named 'b'
CONSTRAINT b check (b>10) # table constraint
) ENGINE=InnoDB;
select * from information_schema.check_constraints;
select * from information_schema.check_constraints
order by check_clause
;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_NAME CHECK_CLAUSE
def test name t2 char_length(`name`) > 2
def test b t3 `b` > 0
def test b t3 `b` > 10
def test name t2 char_length(`name`) > 2
def test CHK_dates t2 `start_date` is null
def test t t1 `t` > 2
def test CHK_new_ t1 `t` > `tt`
def test CONSTRAINT_1 t0 `t` > 32
def test CHK_new_ t1 `t` > `tt`
drop table t0;
drop table t1;
drop table t2;
...
...
mysql-test/suite/funcs_1/t/is_check_constraints.test
View file @
b6f05502
...
...
@@ -12,29 +12,29 @@ create table t0
)
ENGINE
=
myisam
;
--
vertical_results
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
ALTER
TABLE
t0
ADD
CONSTRAINT
CHK_t0_t
CHECK
(
t
<
100
);
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
ALTER
TABLE
t0
DROP
CONSTRAINT
CHK_t0_t
;
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
CREATE
TABLE
t1
(
t
int
CHECK
(
t
>
2
),
# field constraint
tt
int
,
CONSTRAINT
CHK_tt
CHECK
(
tt
<
100
)
# table constraint
)
ENGINE
=
InnoDB
;
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
ALTER
TABLE
t1
DROP
CONSTRAINT
CHK_tt
;
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
create
table
t2
(
...
...
@@ -44,12 +44,12 @@ end_date DATE,
CONSTRAINT
CHK_dates
CHECK
(
start_date
IS
NULL
)
#table constraint
)
ENGINE
=
Innodb
;
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
ALTER
TABLE
t1
ADD
CONSTRAINT
CHK_new_
CHECK
(
t
>
tt
);
SELECT
*
from
information_schema
.
check_constraints
;
SELECT
*
from
information_schema
.
check_constraints
order
by
check_clause
;
# Create table with same field and table check constraint name
...
...
@@ -61,7 +61,7 @@ CONSTRAINT b check (b>10) # table constraint
)
ENGINE
=
InnoDB
;
--
horizontal_results
select
*
from
information_schema
.
check_constraints
;
select
*
from
information_schema
.
check_constraints
order
by
check_clause
;
drop
table
t0
;
drop
table
t1
;
...
...
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