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

Wrong data type on CREATE..SELECT char_or_enum_or_text_spvar

Details

    Description

      DROP TABLE IF EXISTS t1;
      DELIMITER $$
      BEGIN NOT ATOMIC
        DECLARE var TEXT CHARACTER SET utf8;
        CREATE TABLE t1 AS SELECT var;
      END;
      $$
      DELIMITER ;
      SHOW CREATE TABLE t1;
      

      +-------+---------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                  |
      +-------+---------------------------------------------------------------------------------------------------------------+
      | t1    | CREATE TABLE `t1` (
        `var` mediumtext CHARACTER SET utf8 DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
      +-------+---------------------------------------------------------------------------------------------------------------+
      

      Notice, the column data type in the table does not match the variable data type.
      The expected data type for t1.var should be TEXT CHARACTER SET utf8 rather than MEDIUMTEXT CHARACTER SET utf8.

      Attachments

        Issue Links

          Activity

            bar Alexander Barkov created issue -
            bar Alexander Barkov made changes -
            Field Original Value New Value
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            Summary Wrong data type on CREATE..SELECT text_spvar Wrong data type on CREATE..SELECT enum_or_text_spvar
            bar Alexander Barkov made changes -
            Summary Wrong data type on CREATE..SELECT enum_or_text_spvar Wrong data type on CREATE..SELECT char_or_enum_or_text_spvar
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2018-04-22 11:53:14.0 2018-04-22 11:53:14.583
            bar Alexander Barkov made changes -
            Fix Version/s 10.3.7 [ 23005 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 86698 ] MariaDB v4 [ 154210 ]

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.