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

Enforce check constraint on JSON type

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.4.3
    • Component/s: JSON
    • Labels:
      None

      Description

      Since there's no context where someone will want a JSON type without the constraint, and excluding it causes compatibility problems with MySQL, why not map

      CREATE TABLE t (j JSON);
      

      to

      CREATE TABLE t (
        j JSON 
        CHECK (JSON_VALID(j))
      );
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                greenman Ian Gilfillan
              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: