Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Won't Fix
-
10.2.11
-
None
Description
CREATE TABLE IF NOT EXISTS `json_boolean` (
|
`id` INT(11) UNSIGNED AUTO_INCREMENT,
|
`json` JSON NOT NULL,
|
`value` TINYINT(1) AS (JSON_VALUE(json, '$.value')) PERSISTENT,
|
PRIMARY KEY (`id`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
MariaDB> INSERT INTO json_boolean (`json`) VALUES ('{"value":true}');
|
ERROR 1366 (22007): Incorrect integer value: 'true' for column 'value' at row 1
|
Since BOOLEAN is an alias for TINYINT(1) I think it would make sense that JSON booleans automatically work as such as well.