diff --git a/db/drivers/mysql/db.c b/db/drivers/mysql/db.c index 5e5748c11f5..0fe72f8a359 100644 --- a/db/drivers/mysql/db.c +++ b/db/drivers/mysql/db.c @@ -62,6 +62,14 @@ int db__driver_open_database(dbHandle *handle) db_d_report_error(); return DB_FAILED; } + /* Set SQL ANSI_QUOTES MODE which allow to use double quotes instead of + * backticks */ + if (mysql_query(connection, "SET SQL_MODE=ANSI_QUOTES") != 0) { + db_d_append_error("%s %s", _("Unable to set SQL ANSI_QUOTES mode:"), + mysql_error(connection)); + db_d_report_error(); + return DB_FAILED; + } } return DB_OK;