Fix potential invalid syntax in TAP test queries

This is a follow-up of commit #19c8f8698
v2.7-fix_hang_on_resume
Javier Jaramago Fernández 1 year ago
parent 8774b31675
commit 321ffe0e8d

@ -106,7 +106,9 @@ int main(int argc, char** argv) {
// to check table alias issue:
{
const std::string& query = "SELECT data FROM testdb.dummy_table AS " + generate_random_string(length);
// NOTE: The randomly generated string should be escaped \`\`, otherwise could collide
// with SQL reserved words, causing an invalid test failure.
const std::string& query = "SELECT data FROM testdb.dummy_table AS `" + generate_random_string(length) + "`";
MYSQL_QUERY__(proxysql, query.c_str());
MYSQL_RES* res = mysql_use_result(proxysql);

Loading…
Cancel
Save