博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MariaDB ColumnStore一些限制和BUG总结
阅读量:6228 次
发布时间:2019-06-21

本文共 7092 字,大约阅读时间需要 23 分钟。

字段属性限制
1、不支持CHARACTER SET语法
MariaDB [test]> create table t1(id int,name varchar(10) CHARACTER SET utf8)
-> engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

2、不支持COLLATE语法
MariaDB [test]> create table t1(id int)
-> engine=Columnstore COLLATE=utf8_bin;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

MariaDB [test]> create table t1(id int,name varchar(10) COLLATE utf8_bin)
-> engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

3、不支持TEXT/BLOB
MariaDB [test]> create table t1(id int,info text)
-> engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.
MariaDB [test]>

MariaDB [test]> create table t1(id int,info blob)
-> engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

4、不支持timestamp,后面的DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP全部删除
MariaDB [test]> create table t1(update_time timestamp)engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

MariaDB [test]> create table t1(update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP)
-> engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

5、decimal不能大于18
MariaDB [test]> create table t1(money decimal(19,2)) engine=Columnstore; 
ERROR 1815 (HY000): Internal error: CAL0009: (3)Create table failed due to  Syntax error: The maximum precision (total number of digits) that can be specified is 18 

6、不支持ROW_FORMAT=COMPACT
MariaDB [test]> create table t1(id int)engine=Columnstore ROW_FORMAT=COMPACT;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

7、varchar最大8000
MariaDB [test]> create table t1(name varchar(8001))engine=Columnstore;
ERROR 1815 (HY000): Internal error: CAL0009: (3)Create table failed due to char, varchar and varbinary length may not exceed 8000

8、不支持bit类型
MariaDB [test]> create table t1(status bit)engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

9、comment不能携带''引号
MariaDB [test]> create table t3(id int comment '主键''ID')engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

10、行溢出,一行varchar不能大于65535(UTF8要除以3)
ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs

11、不支持enum枚举类型

MariaDB [test]> create table t1(`type` enum('HOLIDAY','WORKDAY') DEFAULT NULL)engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

12、不支持zerofill

MariaDB [test]> create table t2(id int(6) zerofill)engine=columnstore;       
ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.


BUG

不支持Reserved keywords保留关键字user、comment、match、key、update、status

MariaDB [test]> create table user(id int)engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

MariaDB [test]> create table t1(comment varchar(100))engine=Columnstore;
ERROR 1178 (42000): The storage engine for the table doesn’t support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

SQL语句限制

1、distinct的字段不在order by里,就不能排序

MariaDB [test]> select distinct apply_time from test ORDER BY id limit 1;          

ERROR 1178 (42000): The storage engine for the table doesn't support IDB-2022: ORDER BY column not in DISTINCT list.

2、查询的字段不在group by里,就不能分组统计

MariaDB [test]> select id from test group by qq;  

ERROR 1815 (HY000): Internal error: IDB-2021: 'test.id' is not in GROUP BY clause. All non-aggregate columns in the SELECT and ORDER BY clause must be included in the GROUP BY clause.

3、alter不支持change/modify更改字段属性

MariaDB [test]> alter table t1 change id id bigint;

ERROR 1815 (HY000): Internal error: CAL0001: Alter table Failed:  Changing the datatype of a column is not supported 

4、alter不支持多列操作和不支持after

MariaDB [test]> alter table t1 add age tinyint,add address varchar(100);

ERROR 1178 (42000): The storage engine for the table doesn't support Multiple actions in alter table statement is currently not supported by Columnstore.

MariaDB [test]> alter table t1 add age tinyint after id;  

ERROR 1178 (42000): The storage engine for the table doesn't support The syntax or the data type(s) is not supported by Columnstore. Please check the Columnstore syntax guide for supported syntax or data types.

5、字段类型不同 join 关联查询报错

MariaDB [test]> select t1.id from t1 join t2 on t1.id=t2.cid;

ERROR 1815 (HY000): Internal error: IDB-1002: 't1' and 't2' have incompatible column type specified for join condition.

6、DML语句会非常慢

DML, i.e. INSERT, UPDATE, and DELETE, provide row level changes. ColumnStore is optimized towards bulk modifications and so these operations are slower than they would be in say InnoDB.

  • Currently ColumnStore does not support operating as a replication slave target.

7、大批量数据导入text字段报内存不足

Internal error: CAL0001: Insert Failed:  IDB-2008: The version buffer overflowed.

8、不支持replace into和load data infile replace into

MariaDB官方回复:覆盖写目前优先级较低,因为这是一个非常大的项目,预计执行成本很高。

本文转自hcymysql51CTO博客,原文链接: http://blog.51cto.com/hcymysql/1980452,如需转载请自行联系原作者

你可能感兴趣的文章
[51Nod1487]占领资源
查看>>
Asymptote 学习记录(1):基本的安装以及用批处理模式和交互模式绘图
查看>>
高效率随机删除数据(不重复)
查看>>
什么是死锁?其条件是什么?怎样避免死锁?
查看>>
【JDK1.8】JUC——LockSupport
查看>>
第八组Postmortem事后分析
查看>>
扁平化设计2.0
查看>>
codevs1116
查看>>
聊聊Dubbo(三):架构原理
查看>>
tizen镜像制作
查看>>
Vue表单输入绑定
查看>>
团体程序设计天梯赛-练习集
查看>>
bootstrap使用后一个小bug---不知道大家碰到没
查看>>
Android训练课程(Android Training) - 添加活动栏(使用action bar)
查看>>
Unable to resolve target 'android-18'
查看>>
模拟键盘按键
查看>>
angularJS内置指令一览
查看>>
Redis的管理
查看>>
数字电路建模 - jchdl
查看>>
Tomcat6.x+jndi配置
查看>>