[MDEV-32973] SHOW TABLES LIKE shows temporary tables with non-matching names Created: 2023-12-08  Updated: 2024-02-07

Status: In Review
Project: MariaDB Server
Component/s: Data Definition - Temporary
Affects Version/s: 11.2.2
Fix Version/s: 11.2, 11.3

Type: Bug Priority: Major
Reporter: Lucas Werkmeister Assignee: Sergei Golubchik
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Linux amd64 (both Arch and Docker tested)


Issue Links:
Relates
relates to MDEV-28334 SHOW TABLE STATUS shows all temporary... Closed
relates to MDEV-28453 SHOW commands are inconsistent for te... Closed

 Description   

In MariaDB 11.2.2, SHOW TABLES LIKE '...' can show temporary tables with names that do not match the pattern. (I haven't fully figured out yet whether it always shows all temporary tables regardless of name and pattern, or whether they are sometimes not shown after all. But it seems to show them a lot of the time.)

To reproduce on a fresh install:

CREATE DATABASE db; USE db;
CREATE TABLE realtable (a INT); CREATE TEMPORARY TABLE temptable (a INT);
SHOW TABLES LIKE 'faketable';

Expected result: 0 rows; actual result: 1 row, "temptable".

Can be tested using the official Docker images; an interactive shell can be obtained with commands like the following:

docker run --rm --env MARIADB_ROOT_PASSWORD=root --name=T352695 mariadb:11.2.2
docker exec -it T352695 mariadb -uroot -proot

For the record, we're tracking this at Wikimedia as T352695, though I don't think there's any information useful for MariaDB devs over there.

MDEV-28334 is the closest-feeling existing issue I'm aware of (but probably not the same).



 Comments   
Comment by Lucas Werkmeister [ 2023-12-08 ]

(I left the priority at the default value – no idea if this should actually be Major or not. Component/s is just a best guess too.)

Generated at Thu Feb 08 10:35:25 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.