Skip to content

Commit 3497160

Browse files
committed
Fixed length of set autocommit
1 parent 36ce914 commit 3497160

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/MySQL_Session.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ bool MySQL_Session::handler_special_queries(PtrSize_t *pkt) {
405405

406406
// Handle autocommit BEGIN
407407
size_t sal=strlen("set autocommit");
408-
if ( pkt->size > 7+sal) {
408+
if ( pkt->size >= 7+sal) {
409409
if (strncasecmp((char *)"set autocommit",(char *)pkt->ptr+5,sal)==0) {
410410
__sync_fetch_and_add(&MyHGM->status.autocommit_cnt, 1);
411411
unsigned int i;

0 commit comments

Comments
 (0)