mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
9827c5e103
as a separate source for data Actually MDEV-15867 and MDEV-16192 are same, Slave adds "or replace" to create table stmt. So create table t1 is create or replace on slave. So this bug is not because of replication, We can get this bug on general server if we manually add or replace to create query. Problem:- So if we try to create table t1 (same name as of temp table t1 ) via CREATE or replace TABLE t AS SELECT * FROM t; Since in this query we are creating table from select * from t1 , we call unique_table function to see whether if source and destination table are same. But there is one issue unique_table does not account if source table is tmp table in this case source and destination table can be same. Solution:- We will change find_dup_table to not to look for temp table if CHECK_DUP_SKIP_TEMP_TABLE flag is on.
4 lines
118 B
Text
4 lines
118 B
Text
CREATE TEMPORARY TABLE t (i INT);
|
|
CREATE or replace TABLE t AS SELECT * FROM t;
|
|
DROP TEMPORARY TABLE t;
|
|
DROP TABLE t;
|