How Mariadb Administrates Temporary Tables?
Solution 1:
Thanks to Georg Richter who answered a similar question here I can explain what happened. The crucial sentence of his answer is:
In case a temporary table has the same name as an existing non temporary table the temporary table will shadow the name of a non temporary table.
So, as long a temporary table exists, all select
, insert
, update
will be performed on the temporary table. Even drop table
will drop first the temporary table whereas drop temporary table
drops only temporary tables and gives an error when there is no temporary table.
All this explains what happened with my script. When I made the insert into the table after creating persistent and temporary table only temporary table got the records. After first dropping, the temporary table was dropped and select shows the empty persistent table.
Post a Comment for "How Mariadb Administrates Temporary Tables?"