mysql.dart
mysql.dart copied to clipboard
execute: do not give valid result
This problem is occurred when I am trying to execute Store Procedure using CALL procedureName(:p1, :p2)
.
I faced the same problem. I found in the code where this happened. When we execute a procedure, the result of the statusFlag is 10, as there is a binary comparison between the statusFlag and mysqlServerFlagMoreResultsExists (which is 8 at the end of the execution) the result of the comparison gives a value != 0 and therefore the values are zeroed.
In the file https://github.com/zim32/mysql.dart/blob/main/lib/src/mysql_client/connection.dart on line 574 you can see the comparison. In my case I added the following (&& eofPayload.statusFlags != 10). Not sure this will result in issues, but it was a momentary solution that did the trick for me.
@zim32 Could you say if this is a risk?