zim32 / mysql.dart

MySQL client for Dart written in Dart
BSD 3-Clause "New" or "Revised" License
64 stars 17 forks source link

INSERT not working on MariaDB when duplicate key error is raised #58

Open BananaMasterz opened 11 months ago

BananaMasterz commented 11 months ago

When I run an INSERT query on on a table the has unique key (for the ID column for example) I get

MySQLProtocolException: Wrong first byte, while decoding getVariableEncInt

but when I run the same query in DBeaver for example, I get

Duplicate entry '1' for key 'PRIMARY'

which is the correct error.

Is this expected behavior? In other situations I get the a message describing what went wrong instead of failure to decode.

I am using MariaDB 10.11.4 on windows.