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

NULL is ambiguous in the DESC Default column output

    XMLWordPrintable

Details

    Description

      In the following output, NULL can mean three things:
      1) No default value
      2) A NULL default
      3) A string, 'NULL'

      CREATE TABLE t (c1 VARCHAR(10) NOT NULL, c2 VARCHAR(10) DEFAULT NULL, c3 VARCHAR(10) NOT NULL DEFAULT 'NULL');
      Query OK, 0 rows affected (0.06 sec)
       
      mysql [localhost] {msandbox} (test) > DESC t;
      +-------+-------------+------+-----+---------+-------+
      | Field | Type        | Null | Key | Default | Extra |
      +-------+-------------+------+-----+---------+-------+
      | c1    | varchar(10) | NO   |     | NULL    |       |
      | c2    | varchar(10) | YES  |     | NULL    |       |
      | c3    | varchar(10) | NO   |     | NULL    |       |
      +-------+-------------+------+-----+---------+-------+
      

      In MDEV-13132 this has been differentiated in INFORMATION_SCHEMA.COLUMNS, is it desirable to differentiate here as well?

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              greenman Ian Gilfillan
              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.