Product version: dotConnect for MySQL Professional 10.1.35
OS Version and Bitness: Windows 10, Windows Server 2012 R2 and Windows Server 2022. All x64.
Project Type: Winforms app (.NET Framework 4.8)
Please describe the issue:
We are facing intermittent errors after upgrading the version from 8.4.521 to 9.4.235 and ultimately 10.1.35.
Exception:
Unknown prepared statement handler (14) given to mysql_stmt_precheck
(PS: the number, in this case 14, sometimes changes )
Stacktrace:
at Devart.Data.MySql.MySqlNet.ReadError()
at Devart.Data.MySql.MySqlNet.Receive()
at Devart.Data.MySql.MySqlSessionDirect.ReadQueryResult(MySqlBind[]& fields, Int32& fieldCount, Boolean ignoreRecordsAffected)
at Devart.Data.MySql.MySqlStmtDirect.GsiH()
at Devart.Data.MySql.MySqlStmtDirect.Execute(Boolean cached)
at Devart.Data.MySql.MySqlResult.KsEW()
at Devart.Data.MySql.MySqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteNonQuery()
at XXXX.VB$StateMachine_281_XXXX.MoveNext()
We started getting these errors when we first upgraded to version 8.4.521 a few months ago. We then upgraded to the latest version (10.1.35) to see if it solved the error, but it didn't help.
The exceptions happens on .ExecuteNonQuery() method.
MySQL databases version are "8.0.17-commercial" and "5.7.18-log". The error happens when targeting both.
We already checked the database health and it's is normal at the moment we have the exceptions.
In a debugging session we were able to reproduce, but it happens randomly in several parts of the code. When the exception is thrown, the db connection is opened and also returns true then calling .Ping().