File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Original file line number Diff line number Diff line change @@ -139,6 +139,9 @@ class object, used to create cursors (keyword only)
139
139
local_infile
140
140
integer, non-zero enables LOAD LOCAL INFILE; zero disables
141
141
142
+ autocommit
143
+ If True, autocommit is enabled.
144
+
142
145
There are a number of undocumented, non-standard methods. See the
143
146
documentation for the MySQL C API for some hints on what they do.
144
147
@@ -224,7 +227,7 @@ def string_decoder(s):
224
227
self .encoders [types .StringType ] = string_literal
225
228
self .encoders [types .UnicodeType ] = unicode_literal
226
229
self ._transactional = self .server_capabilities & CLIENT .TRANSACTIONS
227
- if self ._transactional :
230
+ if self ._transactional and not kwargs2 . pop ( 'autocommit' , False ) :
228
231
# PEP-249 requires autocommit to be initially off
229
232
self .autocommit (False )
230
233
self .messages = []
You can’t perform that action at this time.
0 commit comments