Skip to content

Commit

Permalink
WIP Command BINLOG_DUMP enable fast forward
Browse files Browse the repository at this point in the history
  • Loading branch information
javsanpar committed Dec 22, 2022
1 parent fcd59ff commit f530b4b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3987,9 +3987,22 @@ int MySQL_Session::get_pkts_from_client(bool& wrong_pass, PtrSize_t& pkt) {
case _MYSQL_COM_STMT_SEND_LONG_DATA:
handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_STMT_SEND_LONG_DATA(pkt);
break;
case _MYSQL_COM_BINLOG_DUMP:
case _MYSQL_COM_BINLOG_DUMP_GTID:
proxy_warning("COM_BINLOG_DUMP_GTID received. Changing session fast foward to true");
proxy_warning(
"COM_BINLOG_DUMP or COM_BINLOG_DUMP_GTID received. "
"Changing session fast foward to true\n"
);
session_fast_forward = true;

if (client_myds->PSarrayIN->len) {
proxy_error("UNEXPECTED PACKET FROM CLIENT -- PLEASE REPORT A BUG\n");
assert(0);
}
mybe=find_or_create_backend(current_hostgroup);
mybe->server_myds->reinit_queues();
mybe->server_myds->PSarrayOUT->add(pkt.ptr, pkt.size);

break;
case _MYSQL_COM_QUIT:
proxy_debug(PROXY_DEBUG_MYSQL_COM, 5, "Got COM_QUIT packet\n");
Expand Down

0 comments on commit f530b4b

Please sign in to comment.