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

invalid SHOW CREATE TABLE for tables in utf16 charset

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.5, 10.6, 10.11, 11.2(EOL), 11.4, 11.6(EOL)
    • N/A
    • Character Sets
    • None

    Description

      MariaDB [test]>  CREATE TABLE t (i text DEFAULT repeat('m',5), a int) CHARSET=utf16;
      Query OK, 0 rows affected (0,039 sec)
       
      MariaDB [test]> show create table t;
      +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                                            |
      +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
      | t     | CREATE TABLE `t` (
        `i` text DEFAULT  r e p e a t('m',5),
        `a` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_uca1400_ai_ci |
      +-------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0,002 sec)
       
      MariaDB [test]> CREATE or replace TABLE t (i text DEFAULT concat('m','a'), a int)  charset=utf16;
      Query OK, 0 rows affected (0,059 sec)
       
      MariaDB [test]> show create table t;
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
      | Table | Create Table                                                                                                                                              |
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
      | t     | CREATE TABLE `t` (
        `i` text DEFAULT  c o n c a t('m','a'),
        `a` int(11) DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf16 COLLATE=utf16_uca1400_ai_ci |
      +-------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
      1 row in set (0,002 sec)
      

      when trying to make a dump of this table:

      --
      -- Table structure for table `t`
      --
       
      DROP TABLE IF EXISTS `t`;
      /*!40101 SET @saved_cs_client     = @@character_set_client */;
      /*!40101 SET character_set_client = utf8 */;
      CREATE TABLE `t` (
        `i` text DEFAULT ;
      /*!40101 SET character_set_client = @saved_cs_client */;
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              alice Alice Sherepa
              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.