Skip to content

Commit

Permalink
Add support for sql_quote_show_create #4254
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Jun 19, 2023
1 parent 32fb422 commit dc732c5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/proxysql_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ enum mysql_variable_name {
SQL_GENERATE_INVISIBLE_PRIMARY_KEY,
SQL_SQL_LOG_BIN,
SQL_SQL_MODE,
SQL_QUOTE_SHOW_CREATE,
SQL_REQUIRE_PRIMARY_KEY,
SQL_SQL_SAFE_UPDATES,
SQL_SQL_SELECT_LIMIT,
Expand Down Expand Up @@ -1177,7 +1178,8 @@ mysql_variable_st mysql_tracked_variables[] {
{ SQL_GENERATE_INVISIBLE_PRIMARY_KEY, SETTING_VARIABLE, false, false, false, true, (char *)"sql_generate_invisible_primary_key", NULL, (char *)"" , false} ,
{ SQL_SQL_LOG_BIN, SETTING_VARIABLE, false, false, false, true, (char *)"sql_log_bin", NULL, (char *)"ON" , false} ,
{ SQL_SQL_MODE, SETTING_VARIABLE, true, false, false, false, (char *)"sql_mode" , NULL, (char *)"" , false} ,
{ SQL_REQUIRE_PRIMARY_KEY, SETTING_VARIABLE, false, false, false, true, (char *)"sql_require_primary_key", NULL, (char *)"" , false} ,
{ SQL_QUOTE_SHOW_CREATE, SETTING_VARIABLE, false, false, false, true, (char *)"sql_quote_show_create", NULL, (char *)"" , false} ,
{ SQL_REQUIRE_PRIMARY_KEY, SETTING_VARIABLE, false, false, false, true, (char *)"sql_require_primary_key", NULL, (char *)"" , false} ,
{ SQL_SQL_SAFE_UPDATES, SETTING_VARIABLE, true, false, false, true, (char *)"sql_safe_updates", NULL, (char *)"OFF" , false} ,
{ SQL_SQL_SELECT_LIMIT, SETTING_VARIABLE, false, false, true, false, (char *)"sql_select_limit", NULL, (char *)"DEFAULT" , false} ,
{ SQL_TIME_ZONE, SETTING_VARIABLE, true, false, false, false, (char *)"time_zone", NULL, (char *)"SYSTEM" , false} ,
Expand Down
1 change: 1 addition & 0 deletions lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static const std::set<std::string> mysql_variables_boolean = {
"sql_big_selects",
"sql_generate_invisible_primary_key",
"sql_log_bin",
"sql_quote_show_create",
"sql_require_primary_key",
"sql_safe_updates",
"unique_checks",
Expand Down
3 changes: 3 additions & 0 deletions test/tap/tests/generate_set_session_csv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ int main() {
vars["wsrep_osu_method"] = new variable("wsrep_osu_method", true, false, false);
add_values_and_quotes("wsrep_osu_method", {"TOI","RSU"});

vars["sql_quote_show_create"] = new variable("sql_quote_show_create", true, false, true);
vars["sql_quote_show_create"]->add(bool_values);

vars["sql_require_primary_key"] = new variable("sql_require_primary_key", true, false, true);
vars["sql_require_primary_key"]->add(bool_values);

Expand Down
2 changes: 1 addition & 1 deletion test/tap/tests/set_testing-240-t.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ char *schema=(char *)"information_schema";
int silent = 0;
int sysbench = 0;
int local=0;
int queries=3000;
int queries=5000;
int uniquequeries=0;
int histograms=-1;

Expand Down
1 change: 1 addition & 0 deletions test/tap/tests/set_testing-240.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const std::vector<std::string> possible_unknown_variables = {
"max_statement_time",
"sql_generate_invisible_primary_key",
"log_slow_filter",
"sql_quote_show_create",
"sql_require_primary_key"
};

Expand Down

0 comments on commit dc732c5

Please sign in to comment.