Issues

Issue #2678 wontfix

SAVEPOINT doesn't seem to entirely work w/ MSSQL/pyodbc/windows

Mike Bayer
repo owner created an issue

ORM test test_nested_transaction_connection_add output, the row inserted for "u2" seems to vanish, suggesting the ROLLBACK/COMMIT here isn't actually happening:

sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: INFO: COMMIT
sqlalchemy.engine.base.Engine: INFO: BEGIN (implicit)
sqlalchemy.engine.base.Engine: INFO: IF @@TRANCOUNT = 0 BEGIN TRANSACTION
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: INFO: SAVE TRANSACTION sa_savepoint_1
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: INFO: INSERT INTO users (name) OUTPUT inserted.id VALUES (?)
sqlalchemy.engine.base.Engine: INFO: ('u1',)
sqlalchemy.engine.base.Engine: DEBUG: Col ('id',)
sqlalchemy.engine.base.Engine: DEBUG: Row (1, )
sqlalchemy.engine.base.Engine: INFO: ROLLBACK TRANSACTION sa_savepoint_1
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: INFO: INSERT INTO users (name) OUTPUT inserted.id VALUES (?)
sqlalchemy.engine.base.Engine: INFO: ('u2',)
sqlalchemy.engine.base.Engine: DEBUG: Col ('id',)
sqlalchemy.engine.base.Engine: DEBUG: Row (2, )
sqlalchemy.engine.base.Engine: INFO: COMMIT
sqlalchemy.engine.base.Engine: INFO: SELECT users.id AS users_id, users.name AS users_name
FROM users
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: DEBUG: Col ('users_id', 'users_name')
sqlalchemy.engine.base.Engine: DEBUG: Row (2, 'u2')
sqlalchemy.engine.base.Engine: INFO: BEGIN (implicit)
sqlalchemy.engine.base.Engine: INFO: IF @@TRANCOUNT = 0 BEGIN TRANSACTION
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: INFO: SAVE TRANSACTION sa_savepoint_1
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: INFO: INSERT INTO users (name) OUTPUT inserted.id VALUES (?)
sqlalchemy.engine.base.Engine: INFO: ('u3',)
sqlalchemy.engine.base.Engine: DEBUG: Col ('id',)
sqlalchemy.engine.base.Engine: DEBUG: Row (3, )
sqlalchemy.engine.base.Engine: INFO: ROLLBACK
sqlalchemy.engine.base.Engine: INFO: SELECT users.id AS users_id, users.name AS users_name
FROM users
sqlalchemy.engine.base.Engine: INFO: ()
sqlalchemy.engine.base.Engine: DEBUG: Col ('users_id', 'users_name')
--------------------- >> end captured logging << ---------------------

Comments (4)

  1. Log in to comment