[MDEV-28334] SHOW TABLE STATUS shows all temporary tables ignoring database and conditions Created: 2022-04-17 Updated: 2023-12-08 Resolved: 2023-08-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Data Definition - Temporary |
| Affects Version/s: | N/A |
| Fix Version/s: | 11.2.1 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Note that show tables is not exposing temporary tables, only non-temporary tables. |
| Comments |
| Comment by Anel Husakovic [ 2022-04-18 ] | ||||||||||
|
For show table status the code fill_schema_table_by_open() should be executed from int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond), but it is not since there is no base table and lsel->table_list.first == NULL
In prepare_schema_table we cannot populate lsel->table_list.first, it is meant only for base table, or we should now do it to accept temporary tables too? | ||||||||||
| Comment by Elena Stepanova [ 2022-04-19 ] | ||||||||||
|
While working on this, please determine how select from I_S.tables, show table status [in ...] and show tables [in ...] should correlate in regard to temporary tables, and maybe add a note about it to | ||||||||||
| Comment by Anel Husakovic [ 2022-04-27 ] | ||||||||||
|
For last check review: https://github.com/MariaDB/server/commit/b98aad19f52861e6c80893e26d360d3b8221fa34 |