summaryrefslogtreecommitdiff
path: root/mysql-test/suite/funcs_1/r
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2019-01-24 03:06:56 -0800
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2019-12-13 16:38:14 +0200
commit8129ff14407826d54745346c552fadf3d292a0d8 (patch)
tree0b1200a9de302211a4474052701a1014c2d1651e /mysql-test/suite/funcs_1/r
parentf0aa073f2bf3d8d85b3d028df89cdb4cdfc4002d (diff)
downloadmariadb-git-8129ff14407826d54745346c552fadf3d292a0d8.tar.gz
PR #1127 and PR #1150
PR#1127: Fix is_check_constraints.result to be compatibile with 10.3 The patch is done according to the original patch for MDEV-14474 1edd09c325525cba33152 and not one which is merged on server d526679efd108478cc2af07578. This patch includes: - Rename from `is_check_constraint` to `is_check_constraints` to tests and results - Per review, change the order of fields in IS check_constraints table by adding the column `table_name` before `constraint_name`. According to the standard 2006 there is no `table_name` column. - Original patch and one in `10.3` supports embedded server this patch doesn't support. After the merge `10.3` will not support also. - Don't use patch c8b8b01b61 to change the length of `CHECK_CLAUSE` field PR#1150: MDEV-18440: Information_schema.check_constraints possible data leak This patch is extension of PR 1127 and includes: - Check for table grants - Additional test according to the MDEV specification Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
Diffstat (limited to 'mysql-test/suite/funcs_1/r')
-rw-r--r--mysql-test/suite/funcs_1/r/is_check_constraints.result (renamed from mysql-test/suite/funcs_1/r/is_check_constraint.result)26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/suite/funcs_1/r/is_check_constraint.result b/mysql-test/suite/funcs_1/r/is_check_constraints.result
index e36db395eb9..4d7c7b446e6 100644
--- a/mysql-test/suite/funcs_1/r/is_check_constraint.result
+++ b/mysql-test/suite/funcs_1/r/is_check_constraints.result
@@ -119,3 +119,29 @@ disconnect con1;
connection default;
DROP USER boo1;
DROP USER boo2;
+#
+# MDEV-18440: Information_schema.check_constraints possible data leak
+#
+CREATE USER foo;
+CREATE DATABASE db;
+USE db;
+CREATE TABLE t1 (a int, b int, CONSTRAINT CHECK (b > 0));
+INSERT INTO t1 VALUES (1, 2), (2, 3);
+GRANT SELECT (a) ON t1 TO foo;
+SHOW GRANTS FOR foo;
+Grants for foo@%
+GRANT USAGE ON *.* TO 'foo'@'%'
+GRANT SELECT (a) ON `db`.`t1` TO 'foo'@'%'
+SELECT * FROM information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+def db t1 CONSTRAINT_1 `b` > 0
+CONNECT con1,localhost, foo,, db;
+SELECT a FROM t1;
+a
+1
+2
+SELECT * FROM information_schema.check_constraints;
+CONSTRAINT_CATALOG CONSTRAINT_SCHEMA TABLE_NAME CONSTRAINT_NAME CHECK_CLAUSE
+connection default;
+DROP USER foo;
+DROP DATABASE db;