[MDEV-14934] JSON boolean values are not automatically converted to TINYINT(1) Created: 2018-01-12 Updated: 2018-01-15 Resolved: 2018-01-15 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | JSON |
| Affects Version/s: | 10.2.11 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Heinz Wiesinger | Assignee: | Sergei Golubchik |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Since BOOLEAN is an alias for TINYINT(1) I think it would make sense that JSON booleans automatically work as such as well. |
| Comments |
| Comment by Elena Stepanova [ 2018-01-13 ] | ||||||||||
|
It's not really related to virtual columns. Here is a similar example applicable both to MySQL and MariaDB, it shows the difference.
| ||||||||||
| Comment by Sergei Golubchik [ 2018-01-15 ] | ||||||||||
|
We cannot really do it. The standard syntax (SQL:2016, part 2, 6.27 <JSON value function>) is
And the Syntax Rules say
MariaDB does not support <JSON returning clause> yet, so JSON_VALUE() always returns a "character string type", as required by the SQL Standard. |