I'm using MySqlBackup.dll (MySqlBackup.NET) which in turn uses MySql.Data.dll to dump the database. I thought MySqlBackup.NET was causing this behavior, so I took it out of the equation. If I run this code in my solution:
Dim cmd = New MySqlCommand()
cmd.Connection = New MySqlConnection(connectionString)
cmd.Connection.Open()
Dim result = QueryExpress.ExecuteScalarStr(cmd, "SHOW CREATE TABLE `airportcodes`;", 1)
cmd.Connection.Close()
I get
CREATE TABLE "airportcodes" (
"AirportCodeId" int(11) NOT NULL AUTO_INCREMENT,
"Code" varchar(4) CHARACTER SET utf8 NOT NULL,
"AirportName" varchar(100) CHARACTER SET utf8 DEFAULT NULL,
"Website" varchar(100) CHARACTER SET utf8 DEFAULT NULL,
"LastUpdate" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY ("AirportCodeId")
)
which I cannot use to restore because it uses double quotes. This happens when I use both the code above and MySqlBackup.NET. If I use the MySqlBackup.NET test application provided with its source code, the result is correct (uses backticks instead of double-quotes).
If I execute this query in the mysql CLI I also get the correct version (with backticks). I am using the same connection string all over.
It feels stupid to search-and-replace after the dump is created. What could be the cause of this?