|
|
@@ -25,7 +25,7 @@ class Database: |
|
|
|
self.in_transaction = 0 |
|
|
|
self.transaction_writes = 0 |
|
|
|
self.testing_tables = [] |
|
|
|
self.auto_commit_on_excess = 0 |
|
|
|
self.auto_commit_on_many_writes = 0 |
|
|
|
|
|
|
|
self.password = self.get_db_password(self.user, password) |
|
|
|
|
|
|
@@ -93,7 +93,7 @@ class Database: |
|
|
|
if self.in_transaction and query[:6].lower() in ['update', 'insert']: |
|
|
|
self.transaction_writes += 1 |
|
|
|
if self.transaction_writes > 5000: |
|
|
|
if self.auto_commit_on_excess: |
|
|
|
if self.auto_commit_on_many_writes: |
|
|
|
webnotes.conn.commit() |
|
|
|
webnotes.conn.begin() |
|
|
|
else: |
|
|
|