Added new command in 'Admin Module' used by 'mysqlsh' when starting in '--sql' mode

pull/2891/head
Javier Jaramago Fernández 6 years ago
parent 18a7d2b181
commit cc3bbfc759

@ -3924,6 +3924,15 @@ void admin_session_handler(MySQL_Session *sess, void *_pa, PtrSize_t *pkt) {
goto __run_query;
}
if (!strncasecmp("select @@sql_mode", query_no_space, strlen("select @@sql_mode"))) {
l_free(query_length,query);
char *q = const_cast<char*>("SELECT \"\" as \"@@sql_mode\"");
query_length = strlen(q) + strlen(PROXYSQL_VERSION) + 1;
query = static_cast<char*>(l_alloc(query_length));
sprintf(query, q, PROXYSQL_VERSION);
goto __run_query;
}
if (query_no_space_length==SELECT_DB_USER_LEN) {
if (!strncasecmp(SELECT_DB_USER, query_no_space, query_no_space_length)) {
l_free(query_length,query);

Loading…
Cancel
Save