Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15377 10.2+ Integer DEFAULT values missing quotes
  3. MDEV-15390

information_schema returns quoted strings for default textual columns

    XMLWordPrintable

Details

    • Technical task
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.2
    • N/A
    • Documentation, Server
    • None
    • GNU/Linux

    Description

      Just when I thought that INFORMATION_SCHEMA returns proper default values which could be used across different MariaDB server versions....

      • Numbers are now just fine (e.g. not quoted) on both 10.0 and 10.2
      • But now textual columns (varchar, text...) are quoted and only IF they contain some default value (even empty string) on 10.2+ only

      10.2:

      +--------------+---------------+-------------+-------------+------------------+----------------+
      | TABLE_SCHEMA | TABLE_NAME    | COLUMN_NAME | COLUMN_TYPE | ORDINAL_POSITION | COLUMN_DEFAULT |
      +--------------+---------------+-------------+-------------+------------------+----------------+
      | erschema     | partner_sites | er_order    | varchar(4)  |               70 | 'DESC'         |
      | erschema     | partner_sites | er_limit    | tinyint(4)  |               71 | 10             |
      +--------------+---------------+-------------+-------------+------------------+----------------+
      

      10.0

      +--------------+---------------+-------------+-------------+------------------+----------------+
      | TABLE_SCHEMA | TABLE_NAME    | COLUMN_NAME | COLUMN_TYPE | ORDINAL_POSITION | COLUMN_DEFAULT |
      +--------------+---------------+-------------+-------------+------------------+----------------+
      | erschema     | partner_sites | er_order    | varchar(4)  |               70 | DESC           |
      | erschema     | partner_sites | er_limit    | tinyint(4)  |               71 | 10             |
      +--------------+---------------+-------------+-------------+------------------+----------------+
      

      So we have different results depending on the context (INFORMATION_SCHEMA vs. SHOW CREATE TABLE...). What a mess.

      Attachments

        Issue Links

          Activity

            People

              greenman Ian Gilfillan
              stamster Nemanja Stambolic
              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.