diff --git a/test/tap/tests/generate_set_session_csv.cpp b/test/tap/tests/generate_set_session_csv.cpp index 009bbfe3fb..37c162658a 100644 --- a/test/tap/tests/generate_set_session_csv.cpp +++ b/test/tap/tests/generate_set_session_csv.cpp @@ -4,6 +4,7 @@ #include #include #include +#include std::vector bool_values = { "0", "1", @@ -263,6 +264,7 @@ int main() { vars["sql_mode"]->add(std::vector {"NO_ENGINE_SUBSTITUTION", "'NO_ENGINE_SUBSTITUTION'", "\"NO_ENGINE_SUBSTITUTION\""}); vars["sql_mode"]->add(std::vector {"concat(@@sql_mode,',STRICT_TRANS_TABLES')"}); vars["sql_mode"]->add(std::vector {"CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO')"}); + vars["sql_mode"]->add(std::vector {"''", "\"\"", "' '", "\" \"", "' '", "\" \"",}); vars["default_storage_engine"] = new variable("default_storage_engine", true, false, false); @@ -326,6 +328,10 @@ int main() { query += s; } j += "\"" + v->name + "\":\""; + if (v->name == "sql_mode") + // Remove all whitespaces + // see https://github.com/sysown/proxysql/issues/3863 + s.erase(std::remove(s.begin(), s.end(), ' '), s.end()); add_value_j(j,s,v); if (v->name == "max_join_size") { // see https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_max_join_size