Skip to content

Commit

Permalink
Fixed length of set autocommit
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed Jan 6, 2016
1 parent 36ce914 commit 3497160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MySQL_Session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ bool MySQL_Session::handler_special_queries(PtrSize_t *pkt) {

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

0 comments on commit 3497160

Please sign in to comment.