Skip to content

Commit

Permalink
Set default schema to "default" #1419
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Mar 17, 2018
1 parent e949e7a commit bfc2d5d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3268,6 +3268,14 @@ void MySQL_Session::handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(
l_free(pkt->size,pkt->ptr);
//if (client_myds->encrypted==false) {
if (client_myds->myconn->userinfo->schemaname==NULL) {
#ifdef PROXYSQLCLICKHOUSE
if (session_type == PROXYSQL_SESSION_CLICKHOUSE) {
if (strlen(default_schema) == 0) {
free(default_schema);
default_schema = strdup((char *)"default");
}
}
#endif /* PROXYSQLCLICKHOUSE */
client_myds->myconn->userinfo->set_schemaname(default_schema,strlen(default_schema));
}
int free_users=0;
Expand Down

0 comments on commit bfc2d5d

Please sign in to comment.