Skip to content

Temporary table management #117

@hatarist

Description

@hatarist

Hey, Happy Birthday to your company and thanks for making an awesome DBMS!

It'd be great to have better control over the native TEMPORARY TABLEs.
For instance, if you create one using CREATE TEMPORARY TABLE temp_table (id UInt8);,
you won't be able to

  1. execute SHOW CREATE TABLE temp_table;
    #107: Cannot open file /.../metadata/default/temp_table.sql, errno: 2, strerror: No such file or directory.

Judging by the exception, it may look like it supports just the permanently-stored ones, but you certainly can do SHOW CREATE TABLE over the regular tables with the Memory engine.
Also I've thought that the table was already deleted, but it was the same session and SELECT * FROM temp_table; works OK.

  1. Same with SHOW TABLES; - the temporary tables aren't there.

  2. You can't run DROP TABLE over a temporary table. You can over a Memory one though.
    Of course, I'm free to end the session to make it disappear, but nevertheless...

I understand that it's not a big deal, and I guess I can send a pull request later that reflects these issues in the documentation. Just wanted to let you know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed user-visible misbehaviour in official release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions