Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.4.10, 10.3(EOL), 10.4(EOL)
-
None
Description
Create a table with a check constraint:
create table t (i int, constraint a check (i > 0));
|
Now consider this query, which should produce the above check constraint:
select
|
tc.TABLE_SCHEMA,
|
tc.TABLE_NAME,
|
cc.CONSTRAINT_NAME,
|
cc.CHECK_CLAUSE
|
from information_schema.TABLE_CONSTRAINTS tc
|
join information_schema.CHECK_CONSTRAINTS cc
|
using (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, TABLE_NAME, CONSTRAINT_NAME)
|
;
|
It does not produce any results.
Add two columns to the projection and ta-dah, we get the desired output:
select
|
tc.TABLE_SCHEMA,
|
tc.TABLE_NAME,
|
cc.CONSTRAINT_NAME,
|
cc.CHECK_CLAUSE,
|
tc.CONSTRAINT_CATALOG,
|
tc.CONSTRAINT_SCHEMA
|
from information_schema.TABLE_CONSTRAINTS tc
|
join information_schema.CHECK_CONSTRAINTS cc
|
using (CONSTRAINT_CATALOG, CONSTRAINT_SCHEMA, TABLE_NAME, CONSTRAINT_NAME)
|
;
|
Attachments
Issue Links
- duplicates
-
MDEV-19990 JOIN USING not behaving like 'equals'
-
- Closed
-
- is duplicated by
-
MDEV-24466 logic bug when joining INFROMATION_SCHEMA tables using USING
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Attachment | screenshot-1.png [ 49576 ] |
Attachment | screenshot-2.png [ 49577 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Affects Version/s | 10.3 [ 22126 ] | |
Affects Version/s | 10.4 [ 22408 ] | |
Assignee | Oleksandr Byelkin [ sanja ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Oleksandr Byelkin [ sanja ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3.24 [ 24306 ] | |
Fix Version/s | 10.4.14 [ 24305 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Fix Version/s | 10.5.5 [ 24423 ] |
Link |
This issue duplicates |
Link |
This issue is duplicated by |
Workflow | MariaDB v3 [ 101557 ] | MariaDB v4 [ 157039 ] |
Zendesk Related Tickets | 155253 |
Thanks for the report and test case. Reproducible as described on 10.3-10.5. Not reproducible on 10.2.