8000 Support MariaDB's CHECK constraint error (#627) · ammogcoder/PyMySQL@2fa7b14 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2fa7b14

Browse files
authored
Support MariaDB's CHECK constraint error (PyMySQL#627)
fixes PyMySQL#607
1 parent 18b62f6 commit 2fa7b14

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

pymysql/constants/ER.py

+3
Original file line numberDiff line numberDiff line change
@@ -470,3 +470,6 @@
470470
HOSTNAME = 1467
471471
WRONG_STRING_LENGTH = 1468
472472
ERROR_LAST = 1468
473+
474+
# https://github.com/PyMySQL/PyMySQL/issues/607
475+
CONSTRAINT_FAILED = 4025

pymysql/err.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def _map_error(exc, *errors):
8989
ER.NOT_SUPPORTED_YET, ER.FEATURE_DISABLED, ER.UNKNOWN_STORAGE_ENGINE)
9090
_map_error(OperationalError, ER.DBACCESS_DENIED_ERROR, ER.ACCESS_DENIED_ERROR,
9191
ER.CON_COUNT_ERROR, ER.TABLEACCESS_DENIED_ERROR,
92-
ER.COLUMNACCESS_DENIED_ERROR)
92+
ER.COLUMNACCESS_DENIED_ERROR, ER.CONSTRAINT_FAILED)
9393

9494

9595
del _map_error, ER

0 commit comments

Comments
 (0)
0