Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.4.13
-
None
-
Windows 10
Description
When trying to insert an incorrect value into for example integer field an error is throw with code 1366. According to https://mariadb.com/kb/en/mariadb-error-codes/ and MySQL 8 the SQL status should be HY000 (General issue), however for MariaDB it is showing 22007 which is slightly misleading and not compatible with MySQL.
CREATE TABLE IF NOT EXISTS `testnum` ( |
`col1` integer NOT NULL |
) ENGINE=INNODB DEFAULT CHARSET=utf8mb4; |
 |
INSERT INTO `testnum` (`col1`) VALUES ('DEU'); |
In MySQL this produces:
ERROR 1366 (HY000): Incorrect integer value: 'DEU' for column 'col1' at row 1
and in MariaDB:
ERROR 1366 (22007): Incorrect integer value: 'DEU' for column `test`.`testnum`.`col1` at row 1