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

ERROR 1901 (HY000) at line 29: Function or expression ... cannot be used in the GENERATED ALWAYS AS clause of ...

    XMLWordPrintable

Details

    Description

      Customer has a database with tables that have columns defined like this:

        `StartDate` datetime(3) GENERATED ALWAYS AS 
          (json_unquote(json_value(`ObjData`,'$.StartDate'))) STORED,
      

      Table can be understood if software is updated to higher release, such as 10.11 (tested). Table can be dumped by mariadb-dump at any release.

      However, when the table is imported in any DB 10.5 or higher, you get the following error:

      ERROR 1901 (HY000) at line 29: Function or expression 
      'json_unquote(json_value(`ObjData`,'$.StartDate'))' cannot be used 
      in the GENERATED ALWAYS AS clause of `StartDate
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              edward Edward Stoever
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.