diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 0912f2f..8fae9b0 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1736,7 +1736,7 @@ void THD::init(void) randominit(&slog_rand, 0x11111111, 0x77777777);); } - server_status= SERVER_STATUS_AUTOCOMMIT; + server_status= ((this->variables.option_bits & OPTION_AUTOCOMMIT) ? SERVER_STATUS_AUTOCOMMIT : 0); if (variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) server_status|= SERVER_STATUS_NO_BACKSLASH_ESCAPES;