Skip to content

Commit

Permalink
add case for information_schema.referenctial_constraints(1.1-dev) (#1…
Browse files Browse the repository at this point in the history
…5392)

Add case for information_schema.referenctial_constraints

Approved by: @heni02, @sukki37
  • Loading branch information
Ariznawlll committed Apr 10, 2024
1 parent bab0a03 commit 7dd603b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/distributed/cases/metadata/information_schema.result
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
select information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA,
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA,
information_schema.KEY_COLUMN_USAGE.COLUMN_NAME
from information_schema.REFERENTIAL_CONSTRAINTS
join information_schema.KEY_COLUMN_USAGE
on (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA =
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA and
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME =
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME and
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME =
information_schema.KEY_COLUMN_USAGE.TABLE_NAME)
where (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content') or
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content'))
order by information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA asc,
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME asc,
information_schema.KEY_COLUMN_USAGE.ORDINAL_POSITION asc;
constraint_schema constraint_name table_name referenced_table_name unique_constraint_name unique_constraint_schema column_name
20 changes: 20 additions & 0 deletions test/distributed/cases/metadata/information_schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
select information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA,
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.REFERENCED_TABLE_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME,
information_schema.REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA,
information_schema.KEY_COLUMN_USAGE.COLUMN_NAME
from information_schema.REFERENTIAL_CONSTRAINTS
join information_schema.KEY_COLUMN_USAGE
on (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA =
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA and
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME =
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME and
information_schema.REFERENTIAL_CONSTRAINTS.TABLE_NAME =
information_schema.KEY_COLUMN_USAGE.TABLE_NAME)
where (information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content') or
information_schema.REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA in ('plat_content'))
order by information_schema.KEY_COLUMN_USAGE.CONSTRAINT_SCHEMA asc,
information_schema.KEY_COLUMN_USAGE.CONSTRAINT_NAME asc,
information_schema.KEY_COLUMN_USAGE.ORDINAL_POSITION asc;

0 comments on commit 7dd603b

Please sign in to comment.