Revision 3161
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
218 | 218 |
# Connect |
219 | 219 |
self.__db = module.connect(**db_config) |
220 | 220 |
|
221 |
# Record that a transaction is already open |
|
222 |
self._savepoint += 1 |
|
223 |
|
|
221 | 224 |
# Configure connection |
222 | 225 |
if hasattr(self.db, 'set_isolation_level'): |
223 | 226 |
import psycopg2.extensions |
... | ... | |
229 | 232 |
log_level=4))) |
230 | 233 |
run_query(self, 'SET search_path TO '+(','.join(search_path)), |
231 | 234 |
log_level=3) |
232 |
|
|
233 |
# Record that a transaction is already open |
|
234 |
self._savepoint += 1 |
|
235 | 235 |
|
236 | 236 |
return self.__db |
237 | 237 |
|
Also available in: Unified diff
sql.py: DbConn._db(): Record that a transaction is already open before setting the search_path so that a query is never run with an _savepoint value less than 1 (manual transactions are not supported yet)