Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList

  使用Navicat连接Mycat 8066 成功插入了分库表和全局表

  1、全局表 sql如下:

INSERT INTO `t_rank` VALUES ('259bfdc3-7922-4839-96c7-61c89e877dc5', '法国', '7', '11', '11', '12', null, '34');
INSERT INTO `t_rank` VALUES ('41eece5d-9d86-4cfe-b0ce-e6d4e4021cac', '中国', '2', '38', '27', '23', null, '88');
INSERT INTO `t_rank` VALUES ('4ae59e99-5f41-4a68-af07-65c15f72b247', '韩国', '5', '13', '8', '7', null, '28');

  插入成功!

  2、分库表 sql如下:

INSERT INTO `t_user_label` VALUES ('00041fc4-5947-11e6-a45d-fa163ee05659', '1ae56f42-dd56-4c00-9cf7-c580f428e20d', '0', null, '工作', '13', null, '1470207308693', '1470207308693', null, null, null, null);
INSERT INTO `t_user_label` VALUES ('00067f28-594c-11e6-a45d-fa163ee05659', '95dc53e0-de02-41fd-85a6-3da25caba599', '0', null, '工作', '13', null, '1470209456275', '1470209456275', null, null, null, null);
INSERT INTO `t_user_label` VALUES ('0006d1a6-5947-11e6-a45d-fa163ee05659', '1ae56f42-dd56-4c00-9cf7-c580f428e20d', '0', null, '生活', '3', null, '1470207308711', '1470207308711', null, null, null, null);

  本想这些sql是从mysql导出的,应该不会出错,但是执行的时候报错

  [Err] 1064 - partition table, insert must provide ColumnList 
  

  看意思是要sql提供要插入的表明,但是我是全列插入,所以不理解为什么?

  3、解决办法:

  我把所有的列明都添加上,发现添加成功:

INSERT INTO t_user_setting(ACCOUNT_ID,ACCOUNT_NAME,CTAG,ACCOUNT_TYPE,ACCOUNT_STATUS,REGIST_CHANNEL,REGIST_TIME,ACTIVE_CHANNEL,ACTIVE_TIME,CALENDAR_VIEW,WEEK_FORMAT,REPEAT_VIEW,USER_LABEL_NAME,USER_LABEL_COLOR,PROVINCE,MEAL,IS_NEED_REMIND,REMIND_TYPE,REMIND_TIME_AHEAD,CREATE_TIME,LAST_UPDATE_TIME,LAST_LOGIN_TIME) VALUES ('0006f1b5-956d-4b2d-a3d7-baa10174b841', '13062545830@189.cn', '0', '0', '2', null, '1469936755211000', null, null, '1', '0', '1', '13062545830@189.cn', '9', null, null, '1', '{\"sms\":0,\"email\":1}', '600000', '1469936755211000', '1469936755211', null);

  

  在网上寻求到如上的解释! 

posted @ 2016-08-15 09:00  星星满天  阅读(10056)  评论(1编辑  收藏  举报