Merge pull request #2319 from sysown/v2.0.8-autocommit_reset

If a connection is reset, assume autocommit=1
pull/2333/head
René Cannaò 7 years ago committed by GitHub
commit d493fca3ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1789,6 +1789,13 @@ bool MySQL_Connection::IsAutoCommit() {
// we assume that what we sent last is correct . #873
ret = false;
}
} else {
if (options.last_set_autocommit==-1) {
// if a connection was reset (thus last_set_autocommit==-1)
// the information related to SERVER_STATUS_AUTOCOMMIT is lost
// therefore we fall back on the safe assumption that autocommit==1
ret = true;
}
}
}
return ret;

Loading…
Cancel
Save