fix for POSITION_IN_UNIQUE_CONSTRAINT in information_schema.KEY_COLUMN_USAGE

This commit is contained in:
lucky-sinx 2024-07-08 06:06:01 +00:00 committed by ob-robot
parent ce7aca9327
commit 6154c0b1e9
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -15654,7 +15654,7 @@ def_table_schema(
t.table_name collate utf8mb4_name_case as TABLE_NAME,
c.column_name as COLUMN_NAME,
fc.position as ORDINAL_POSITION,
CAST(NULL as UNSIGNED) as POSITION_IN_UNIQUE_CONSTRAINT, /* POSITION_IN_UNIQUE_CONSTRAINT is not supported now */
CAST(fc.position AS UNSIGNED) as POSITION_IN_UNIQUE_CONSTRAINT,
d2.database_name as REFERENCED_TABLE_SCHEMA,
t2.table_name as REFERENCED_TABLE_NAME,
c2.column_name as REFERENCED_COLUMN_NAME
@ -15685,7 +15685,7 @@ def_table_schema(
t.table_name collate utf8mb4_name_case as TABLE_NAME,
c.column_name as COLUMN_NAME,
fc.position as ORDINAL_POSITION,
CAST(NULL as UNSIGNED) as POSITION_IN_UNIQUE_CONSTRAINT, /* POSITION_IN_UNIQUE_CONSTRAINT is not supported now */
CAST(fc.position AS UNSIGNED) as POSITION_IN_UNIQUE_CONSTRAINT,
d.database_name as REFERENCED_TABLE_SCHEMA,
t2.mock_fk_parent_table_name as REFERENCED_TABLE_NAME,
c2.parent_column_name as REFERENCED_COLUMN_NAME