使用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);
在網上尋求到如上的解釋!