Merge pull request #1 from bpmdoty/do-not-intercept-version-id-as-prepared-stmt

Do not intercept COM_STMT_PREPARE packets for SELECT CONNECTION_ID()
pull/3826/head
bpmdoty 4 years ago committed by GitHub
commit 2d0b85ece2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6200,7 +6200,8 @@ bool MySQL_Session::handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_C
}
// handle case #1797
if ((pkt->size==SELECT_CONNECTION_ID_LEN+5 && strncasecmp((char *)SELECT_CONNECTION_ID,(char *)pkt->ptr+5,pkt->size-5)==0)) {
// handle case #2564
if ((pkt->size==SELECT_CONNECTION_ID_LEN+5 && *(char *)(pkt->ptr+4)!=(char)0x16 && strncasecmp((char *)SELECT_CONNECTION_ID,(char *)pkt->ptr+5,pkt->size-5)==0)) {
char buf[32];
char buf2[32];
sprintf(buf,"%u",thread_session_id);

Loading…
Cancel
Save