Skip to content

Commit 9508904

Browse files
committed
Exceptions: ER_BAD_FIELD_ERROR - wrong exception
ER_BAD_FIELD_ERROR (1054) was not handled and therefore returned as OperationalError instead of ProgrammingError.
1 parent 7cfc325 commit 9508904

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mariadb/mariadb_exception.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ static PyObject *get_exception_type(int error_number)
8282
case ER_WRONG_DB_NAME:
8383
case ER_WRONG_TABLE_NAME:
8484
case ER_BAD_DB_ERROR:
85+
case ER_BAD_FIELD_ERROR:
8586
return Mariadb_ProgrammingError;
8687

8788
/* IntegrityError: Exception raised when the relational integrity of the database is affected,

0 commit comments

Comments
 (0)