diff options
author | unknown <knielsen@knielsen-hq.org> | 2012-08-24 10:06:16 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2012-08-24 10:06:16 +0200 |
commit | cdeabcfd436c65e0a97e74b1722d0259ba907541 (patch) | |
tree | 5f3bbc9f42cb88a5615ab48a421472a17f56d030 /sql/sql_insert.cc | |
parent | 34f2f8ea41726d98e50752ff3453ebde70912c35 (diff) | |
download | mariadb-git-cdeabcfd436c65e0a97e74b1722d0259ba907541.tar.gz |
MDEV-382: Incorrect quoting
Various places in the server replication code was incorrectly quoting
strings, which could lead to incorrect SQL on the slave/mysqlbinlog.
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 171e49aa7d6..b5b69add9b5 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3457,16 +3457,16 @@ int select_create::write_to_binlog(bool is_trans, int errcode) if (thd->lex->create_select_in_comment) query.append(STRING_WITH_LEN("/*! ")); if (thd->lex->ignore) - query.append(STRING_WITH_LEN("INSERT IGNORE INTO `")); + query.append(STRING_WITH_LEN("INSERT IGNORE INTO ")); else if (thd->lex->duplicates == DUP_REPLACE) - query.append(STRING_WITH_LEN("REPLACE INTO `")); + query.append(STRING_WITH_LEN("REPLACE INTO ")); else - query.append(STRING_WITH_LEN("INSERT INTO `")); + query.append(STRING_WITH_LEN("INSERT INTO ")); - query.append(create_table->db, db_len); - query.append(STRING_WITH_LEN("`.`")); - query.append(create_info->alias, table_len); - query.append(STRING_WITH_LEN("` ")); + append_identifier(thd, &query, create_table->db, db_len); + query.append(STRING_WITH_LEN(".")); + append_identifier(thd, &query, create_info->alias, table_len); + query.append(STRING_WITH_LEN(" ")); /* The insert items. |