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

Dynamic columns & COLUMN_ADD() behaviour

    XMLWordPrintable

Details

    Description

      At present when using dynamic columns, one must first create a dynamic column using COLUMN_CREATE() in order to be able to use COLUMN_ADD() otherwise when COLUMN_ADD is called it returns NULL and ROW_COUNT() returns 0.

      If one is adding attributes to a blob of dynamic columns it would be advantageous to not have to check for each record if a column needs to be created first.

      For instance would it be possible/proper to do away with the column_create() function altogether and incorporate its functionality into the COLUMN_ADD(). Consider the following functionality for COLUMN_ADD.

      IF(col does not exist){
              create new column
      }elseif(col exists)
              overwrite existing column
      }

      Strangely this is only an issue if the blob is empty. If COLUMN_CREATE has been run to create a different column then COLUMN_ADD will add a new column to the blob. However if the blob is empty then COLUMN_ADD returns NULL.

      Attachments

        Activity

          People

            Unassigned Unassigned
            boneill81 Barry O' Neill
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.