Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

字段 default 值输入汉字,show create table 显示的是 Unicode编码, #51995

Open
liyanwei89 opened this issue Oct 16, 2024 · 0 comments · May be fixed by #51997
Open

字段 default 值输入汉字,show create table 显示的是 Unicode编码, #51995

liyanwei89 opened this issue Oct 16, 2024 · 0 comments · May be fixed by #51997
Labels
type/bug Something isn't working

Comments

@liyanwei89
Copy link

Steps to reproduce the behavior (Required)

建表语句:
CREATE TABLE test111111 (
test3 varchar(111) NULL default '撒' COMMENT '撒',
test1 Char(10) NULL default '撒' COMMENT '撒',
test2 varchar NULL default '撒' COMMENT '撒',
test4 Char NULL default '撒' COMMENT '撒',
test5 tinyint(4) NULL COMMENT 'test1',
test6 varchar(1) NULL COMMENT 'test2'
) ENGINE=OLAP
DUPLICATE KEY(test3)
DISTRIBUTED BY HASH(test3);

查询 show create table test111111;

Expected behavior (Required)

希望显示的建表语句中 default 中文值可以正常显示

Real behavior (Required)

mysql> show create table test111111;
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| test111111 | CREATE TABLE test111111 (
test3 varchar(111) NULL DEFAULT "\u6492" COMMENT "撒",
test1 char(10) NULL DEFAULT "\u6492" COMMENT "撒",
test2 varchar(1) NULL DEFAULT "\u6492" COMMENT "撒",
test4 char(1) NULL DEFAULT "\u6492" COMMENT "撒",
test5 tinyint(4) NULL COMMENT "test1",
test6 varchar(1) NULL COMMENT "test2"
) ENGINE=OLAP
DUPLICATE KEY(test3)
DISTRIBUTED BY HASH(test3)
PROPERTIES (
"replication_num" = "3",
"in_memory" = "false",
"enable_persistent_index" = "false",
"replicated_storage" = "true",
"compression" = "LZ4"
); |
+------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
    select current_version()
    -> ;
    +-------------------+
    | current_version() |
    +-------------------+
    | 3.2.10-f61f51a |
    +-------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
1 participant