• guilhem@mysql.com's avatar
    The automatic DROP TEMPORARY TABLE is now DROP TEMPORARY TABLE IF EXISTS, · d89f148d
    guilhem@mysql.com authored
    this is better in this case:
    - imagine user1 has created a temp table
    - imagine user2 does FLUSH TABLES WITH READ LOCK, then takes a backup,
    then RESET MASTER then UNLOCK TABLES, like mysqldump --first-slave
    - then in the binlog you will finally have the DROP TEMPORARY TABLE,
    but not the CREATE TEMPORARY TABLE, so when you later restore with
    mysqlbinlog|mysql, mysql will complain that table does not exist.
    Replication was already protected of this (it processes DROP TEMPORARY
    TABLE as if there was a IF EXISTS), now I add it directly to the query
    for mysqlbinlog|mysql to work.
    d89f148d
sql_base.cc 63.8 KB