mysql2
mysql2 copied to clipboard
MySQL2 gem doesn't handle new MariaDB10.4 error code: 1396
Hi There,
Seems that the gem doesn't handle new error codes introduced by MariaDB 10.4. See this following error code 1396
which MariaDB throws when attempting to insert a new user which collides with an existing user:
ERROR 1396 (HY000): Operation CREATE USER failed for 'user4e63'@'%'
I did grep through the code and it seems this error code isn't currently handled. It would be awesome if it could catch this error code, and re-throw it in a more descriptive way. So clients are able to make a decision based on that result.
The error code is documented here: https://mariadb.com/kb/en/mariadb-error-codes/
Error Code | SQLSTATE | Error | Description |
---|---|---|---|
1396 | HY000 | ER_CANNOT_USER | Operation %s failed for %s |
There may be more that aren't currently accounted for.