[MDEV-28325] I_S.CHECK_CONSTRAINTS, COLUMNS etc. do not show temporary tables Created: 2022-04-15  Updated: 2022-04-17  Resolved: 2022-04-17

Status: Closed
Project: MariaDB Server
Component/s: Information Schema
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Anel Husakovic
Resolution: Won't Fix Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-12459 The information_schema tables for get... Closed

 Description   

create temporary table ttemp (a int check(a>=0), check(a>0));
create table tbase (b int check(b>=0), check(b>0));
 
select table_name, table_type, temporary from information_schema.tables where table_name in ('ttemp','tbase');
select table_name, constraint_name, level, check_clause from information_schema.check_constraints where table_name in ('ttemp','tbase');
 
# Cleanup
drop table tbase;

preview-10.9-MDEV-20119-misc e62a2a06

create temporary table ttemp (a int check(a>=0), check(a>0));
create table tbase (b int check(b>=0), check(b>0));
select table_name, table_type, temporary from information_schema.tables where table_name in ('ttemp','tbase');
table_name	table_type	temporary
ttemp	TEMPORARY	Y
tbase	BASE TABLE	N
select table_name, constraint_name, level, check_clause from information_schema.check_constraints where table_name in ('ttemp','tbase');
table_name	constraint_name	level	check_clause
tbase	b	Column	`b` >= 0
tbase	CONSTRAINT_1	Table	`b` > 0
drop table tbase;

Same for I_S.COLUMNS etc.
I'm not sure what it means given that the description in MDEV-12459 explicitly says it should work:

2. list them in I_S.COLUMNS and other I_S tables (3) if they don't shadow non-temp tables (4)

Maybe the concept changed later, then the description needs to be updated.



 Comments   
Comment by Anel Husakovic [ 2022-04-17 ]

MDEV-12459 updated

Generated at Thu Feb 08 09:59:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.