File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed
Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -738,8 +738,29 @@ bool MySQL_Connection::match_ff_req_options(const MySQL_Connection *c) {
738738
739739 // Only required to be checked for fast_forward sessions
740740 if (frontend->myds && frontend->myds ->sess ->session_fast_forward ) {
741- return (frontend->options .client_flag & CLIENT_DEPRECATE_EOF) ==
741+ bool ret = (frontend->options .client_flag & CLIENT_DEPRECATE_EOF) ==
742742 (backend->mysql ->server_capabilities & CLIENT_DEPRECATE_EOF);
743+ if (ret == false ) {
744+ if (frontend->myds && frontend->myds ->PSarrayIN ) {
745+ PtrSizeArray * PSarrayIN = frontend->myds ->PSarrayIN ;
746+ if (PSarrayIN->len == 1 ) {
747+ PtrSize_t pkt = PSarrayIN->pdata [0 ];
748+ if (pkt.size >= 5 ) {
749+ unsigned char c = *reinterpret_cast <unsigned char *>(static_cast <char *>(pkt.ptr ) + 4 );
750+ switch ((enum_mysql_command)c) {
751+ case _MYSQL_COM_BINLOG_DUMP:
752+ case _MYSQL_COM_BINLOG_DUMP_GTID:
753+ case _MYSQL_COM_REGISTER_SLAVE:
754+ ret = true ;
755+ break ;
756+ default :
757+ break ;
758+ };
759+ }
760+ }
761+ }
762+ }
763+ return ret;
743764 } else {
744765 return true ;
745766 }
You can’t perform that action at this time.
0 commit comments