-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when rolling back transaction after performing only a SELECT query #43
Comments
Just fyi, this is a simplified example of how to reproduce the issue. In reality my process should run update and insert statements, but I noticed this happening if an error occurs before actually writing anything. |
If I remove the query execute, like below, it completes without error.
|
I discovered that if I do something to complete the result object's stream, this error does not occur. for instance:
running result.toList() causes the result object to finish its stream, after which the transaction can be rolled back without issue. |
Not fixed properly - need to do more work on this. |
When I run this code:
I get this output:
2014-07-04 14:35:46.528: INFO: (ConnectionPool) Starting transaction
2014-07-04 14:35:46.572: INFO: (FilesResource) Closing
2014-07-04 14:35:46.573: INFO: (FilesResource) Rolling
2014-07-04 14:35:46.574: SEVERE: (RestServer) MySQL Client Error: Connection #0 cannot process a request for Instance of '_QueryStreamHandler' while a request is already in progress for Instance of '_ExecuteQueryHandler'
Uncaught Error: Bad state: Future already completed
Stack Trace:
#0 _AsyncCompleter.completeError (dart:async/future_impl.dart:35)
#1 _handleData (package:sqljocky/src/connection.dart:211:31)
#2 _rootRunUnary (dart:async/zone.dart:730)
#3 _RootZone.runUnary (dart:async/zone.dart:864)
#4 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:488)
#5 _Future._propagateToListeners (dart:async/future_impl.dart:571)
#6 _Future._completeWithValue (dart:async/future_impl.dart:331)
#7 _Future._asyncComplete. (dart:async/future_impl.dart:393)
#8 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#9 _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:128)
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: