summaryrefslogtreecommitdiff
path: root/mysql-test/t/check_constraint_show.test
diff options
context:
space:
mode:
authorJacob Mathew <jacob.mathew@mariadb.com>2017-03-28 16:56:18 -0700
committerJacob Mathew <jacob.mathew@mariadb.com>2017-03-29 12:07:33 -0700
commit3c422e60bbee79bb636e65910c26ac193de70a84 (patch)
tree851ab6dddf07680adb7b1367aa746743df10c5ef /mysql-test/t/check_constraint_show.test
parent4ebdef2bcd28b641dc49aaef4a8c387442ae06dc (diff)
downloadmariadb-git-bb-10.2-MDEV-11115.tar.gz
MDEV-11115 CHECK constraints are not shown in I_S.TABLE_CONSTRAINTSbb-10.2-MDEV-11115
Added CHECK constraints to I_S.TABLE_CONSTRAINTS. Fixed a bug regarding virtual column definitions whose name is the field name. Added test case: check_constraint_show
Diffstat (limited to 'mysql-test/t/check_constraint_show.test')
-rw-r--r--mysql-test/t/check_constraint_show.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/check_constraint_show.test b/mysql-test/t/check_constraint_show.test
new file mode 100644
index 00000000000..4d57f247b5b
--- /dev/null
+++ b/mysql-test/t/check_constraint_show.test
@@ -0,0 +1,8 @@
+# Table with 2 column-level check constraints and 1 table-level check constraint
+create or replace table t1( c1 int check( c1 > 0 ), c2 int check( c2 > 0 ), c3 int, constraint `range` check( ( c3 >= c1 ) and ( c3 <= c2 ) ), primary key( c1 ) );
+show create table t1;
+
+# Show all constraints, including check constraints
+select * from information_schema.table_constraints where table_name = 't1';
+
+drop table t1;