Skip to content

Commit

Permalink
Merge pull request #1457 from pondix/v1.4.8_chwt
Browse files Browse the repository at this point in the history
Fix to return OK packet for SET WAIT_TIMEOUT in ClickHouse
  • Loading branch information
renecannao authored Apr 4, 2018
2 parents d00a075 + 2cb7088 commit 52fdaa1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/ClickHouse_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -989,15 +989,16 @@ void ClickHouse_Server_session_handler(MySQL_Session *sess, void *_pa, PtrSize_t


if (sess->session_type == PROXYSQL_SESSION_CLICKHOUSE) {
if (!strncmp("SET ", query_no_space, 4)) {
if (!strncasecmp("SET ", query_no_space, 4)) {
if (
!strncasecmp("SET AUTOCOMMIT", query_no_space, 14) ||
!strncasecmp("SET NAMES ", query_no_space, 10) ||
!strncasecmp("SET CHARACTER", query_no_space, 13) ||
!strncasecmp("SET COLLATION", query_no_space, 13) ||
!strncasecmp("SET SQL_AUTO_", query_no_space, 13) ||
!strncasecmp("SET SQL_SAFE_", query_no_space, 13) ||
!strncasecmp("SET SESSION TRANSACTION", query_no_space, 23)
!strncasecmp("SET SESSION TRANSACTION", query_no_space, 23) ||
!strncasecmp("SET WAIT_TIMEOUT", query_no_space, 16)
) {
GloClickHouseServer->send_MySQL_OK(&sess->client_myds->myprot, NULL);
run_query=false;
Expand Down

0 comments on commit 52fdaa1

Please sign in to comment.