Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-22976

CAST(JSON_EXTRACT() AS DECIMAL) does not handle boolean values

    XMLWordPrintable

    Details

      Description

      SELECT
        CAST(JSON_EXTRACT('{"x":true}', '$.x') AS DOUBLE) AS cf,
        CAST(JSON_EXTRACT('{"x":true}', '$.x') AS DECIMAL) AS cd;
      

      +------+------+
      | cf   | cd   |
      +------+------+
      |    1 |    0 |
      +------+------+
      1 row in set, 1 warning (0.012 sec)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: