Skip to content

Resetting sql_mode on top of sql file breaks import when ANSI_QUOTES was in the original #279

Open
@Jalliuz

Description

@Jalliuz

I have the option "ANSI_QUOTES" in my original sql_mode. Which means the table names etc. get surrounded with double quotes in the exported sql

CREATE TABLE "my_table"

But on top of the exported sql there is this comment:
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

So when importing the sql file again the sql_mode does not have the option ANSI_QUOTES anymore and the import fails fails because the dump has double quotes around table names and column names.

Solution is: if the option ANSI_QUOTES was present during the generation of the dump, it must stay present during the import too

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions