From b9cb1feb4c55ed727602a27d8373b8abd2660775 Mon Sep 17 00:00:00 2001 From: zhang2014 Date: Sat, 22 Jun 2019 12:40:41 +0800 Subject: [PATCH] some review fixes --- dbms/src/IO/WriteHelpers.h | 16 ++++++++-------- dbms/src/Storages/StorageMySQL.cpp | 2 -- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dbms/src/IO/WriteHelpers.h b/dbms/src/IO/WriteHelpers.h index 932f6e596ed..4eda129ddee 100644 --- a/dbms/src/IO/WriteHelpers.h +++ b/dbms/src/IO/WriteHelpers.h @@ -255,7 +255,7 @@ inline void writeJSONString(const char * begin, const char * end, WriteBuffer & } -template +template void writeAnyEscapedString(const char * begin, const char * end, WriteBuffer & buf) { const char * pos = begin; @@ -304,7 +304,7 @@ void writeAnyEscapedString(const char * begin, const char * end, WriteBuffer & b writeChar('\\', buf); break; case c: - writeChar(symbol, buf); + writeChar(escape_symbol, buf); writeChar(c, buf); break; default: @@ -353,27 +353,27 @@ inline void writeEscapedString(const StringRef & ref, WriteBuffer & buf) } -template +template void writeAnyQuotedString(const char * begin, const char * end, WriteBuffer & buf) { writeChar(c, buf); - writeAnyEscapedString(begin, end, buf); + writeAnyEscapedString(begin, end, buf); writeChar(c, buf); } -template +template void writeAnyQuotedString(const String & s, WriteBuffer & buf) { - writeAnyQuotedString(s.data(), s.data() + s.size(), buf); + writeAnyQuotedString(s.data(), s.data() + s.size(), buf); } -template +template void writeAnyQuotedString(const StringRef & ref, WriteBuffer & buf) { - writeAnyQuotedString(ref.data, ref.data + ref.size, buf); + writeAnyQuotedString(ref.data, ref.data + ref.size, buf); } diff --git a/dbms/src/Storages/StorageMySQL.cpp b/dbms/src/Storages/StorageMySQL.cpp index b235eb740d4..5b64b09aec6 100644 --- a/dbms/src/Storages/StorageMySQL.cpp +++ b/dbms/src/Storages/StorageMySQL.cpp @@ -15,8 +15,6 @@ #include #include #include -#include -#include namespace DB