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

Document allowed values for SET data type

    XMLWordPrintable

    Details

      Description

      https://mariadb.com/kb/en/set-data-type/ says:

      must be chosen from the list of values 'value1', 'value2', ...

      I tried exactly that using the following DDL:

      alter table testtabelle add column Blutgruppe set('a', 'b', 'a,b', '\'') not null default 'a,b';

      I got this:

      [22007][1367] (conn=41) Illegal set 'a,b' value found during parsing

      To avoid uncertainties like these, the valid values for a SET data type should be documented.

      As far as I could see in Column_definition::create_interval_from_interval_list, only the comma is an invalid character in the values of the set. It should be clearly documented that this is the only character that is not allowed and that this is the only way to avoid ambiguities in the default clause. Is that the only reason why the comma is illegal?

        Attachments

          Activity

            People

            Assignee:
            greenman Ian Gilfillan
            Reporter:
            rillig Roland Illig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration