mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 21:13:51 +03:00
minor bug fix
This commit is contained in:
parent
d5cddd40f6
commit
9b99530add
|
@ -22,6 +22,7 @@ class HashDB(object):
|
||||||
self.filepath = filepath
|
self.filepath = filepath
|
||||||
self._write_cache = {}
|
self._write_cache = {}
|
||||||
self._cache_lock = threading.Lock()
|
self._cache_lock = threading.Lock()
|
||||||
|
self._in_transaction = False
|
||||||
|
|
||||||
def _get_cursor(self):
|
def _get_cursor(self):
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
@ -108,7 +109,11 @@ class HashDB(object):
|
||||||
self.endTransaction()
|
self.endTransaction()
|
||||||
|
|
||||||
def beginTransaction(self):
|
def beginTransaction(self):
|
||||||
|
if not self._in_transaction:
|
||||||
self.cursor.execute('BEGIN TRANSACTION')
|
self.cursor.execute('BEGIN TRANSACTION')
|
||||||
|
self._in_transaction = True
|
||||||
|
|
||||||
def endTransaction(self):
|
def endTransaction(self):
|
||||||
|
if self._in_transaction:
|
||||||
self.cursor.execute('END TRANSACTION')
|
self.cursor.execute('END TRANSACTION')
|
||||||
|
self._in_transaction = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user