Skip to content

Commit bddd45b

Browse files
committed
Add support for MySQL PING command
1 parent 620238d commit bddd45b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/wp-mysql-proxy/src/class-mysql-session.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public function receive_bytes( string $data ): ?string {
8383
return $this->process_query( 'USE ' . substr( $payload, 1 ) );
8484
} elseif ( MySQL_Protocol::COM_QUIT === $command ) {
8585
return '';
86+
} elseif ( MySQL_Protocol::COM_PING === $command ) {
87+
return MySQL_Protocol::wrap_packet( MySQL_Protocol::build_ok_packet(), $received_sequence_id + 1 );
8688
} else {
8789
// Unsupported command
8890
$err_packet = MySQL_Protocol::build_err_packet( 0x04D2, 'HY000', 'Unsupported command' );

0 commit comments

Comments
 (0)