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

Default values for text based fields contains a paired quotation marks

    XMLWordPrintable

Details

    Description

      When I create a table, I get different presentations when I execute the DESCRIBE statement for the default values of the text based fields.

      For example, If I create a varchar field, I get the default value without quotation marks when I execute the DESCRIBE statement, but when I create a text field (text, tinytext, mediumtext or longtext), I get the default value with quotation marks when I execute the DESCRIBE statement.

      I have attached a test case file.

      The actual result is:

      +-------------+--------------+------+-----+---------+----------------+
      | Field       | Type         | Null | Key | Default | Extra          |
      +-------------+--------------+------+-----+---------+----------------+
      | id          | int(11)      | NO   | PRI | NULL    | auto_increment |
      | some_number | int(11)      | NO   |     | 0       |                |
      | some_text1  | char(255)    | NO   |     |         |                |
      | some_text2  | varchar(255) | NO   |     |         |                |
      | some_text3  | text         | NO   |     | ''      |                |
      | some_text4  | tinytext     | NO   |     | ''      |                |
      | some_text5  | mediumtext   | NO   |     | ''      |                |
      | some_text6  | longtext     | NO   |     | ''      |                |
      +-------------+--------------+------+-----+---------+----------------+
      

      The expected result is:

      +-------------+--------------+------+-----+---------+----------------+
      | Field       | Type         | Null | Key | Default | Extra          |
      +-------------+--------------+------+-----+---------+----------------+
      | id          | int(11)      | NO   | PRI | NULL    | auto_increment |
      | some_number | int(11)      | NO   |     | 0       |                |
      | some_text1  | char(255)    | NO   |     |         |                |
      | some_text2  | varchar(255) | NO   |     |         |                |
      | some_text3  | text         | NO   |     |         |                |
      | some_text4  | tinytext     | NO   |     |         |                |
      | some_text5  | mediumtext   | NO   |     |         |                |
      | some_text6  | longtext     | NO   |     |         |                |
      +-------------+--------------+------+-----+---------+----------------+
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            sanz Josep Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.