Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.5, 10.6, 10.11, 11.2(EOL), 11.4, 11.6(EOL)
-
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
- duplicates
-
MDEV-29968 Functions in default values in tables with some character sets break SHOW CREATE (and mysqldump)
- Closed