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‘, ‘[email protected]‘, ‘0‘, ‘0‘, ‘2‘, null, ‘1469936755211000‘, null, null, ‘1‘, ‘0‘, ‘1‘, ‘[email protected]‘, ‘9‘, null, null, ‘1‘, ‘{\"sms\":0,\"email\":1}‘, ‘600000‘, ‘1469936755211000‘, ‘1469936755211‘, null);

  

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

时间: 2024-08-08 01:28:27

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

解决mysql插入数据报错[Err] 1146 - Table 'performance_schema.session_status' doesn't exist

解决办法:1.打开cmd 执行命令cd/ 进入C盘根目录2.dir 查看C盘根目录下文件夹  找到 Program Files文件夹3.cd Program Files 进入该文件夹下 再输入dir 查看该文件夹下所有文件夹4.cd MySQL 进入该文件夹  再输入dir 查看该文件夹下所有文件夹5.cd MySQLServer 5.7 进入该文件夹  再输入dir 查看该文件夹下所有文件夹6.cd bin 进入该文件夹  7.输入mysql_upgrade -u root -p --forc

mysql插入数据报错IntegrityError: (1062, "Duplicate entry 'xx' for key 'xxxxx'")

1.问题描述 MySQL插入数据的时候报错,提示如下: IntegrityError: (1062, "Duplicate entry 'xx' for key 'xxxxx'")2.问题分析 根据错误提示我们可以大致得到以下信息: 1.IntegrityError表示这个字段在MySQL中的类型为:整型. 2.Duplicate Entry:“Duplicate”——something that is an exact copy  of something else.所以这句话的意思

mysql插入数据报错1366

数据表插入中文数据报错 Warning Code : 1366 Incorrect string value: '\xE5\x9C\xA8' for column 'name' at row 1 原因是表中列的编码是默认 latin1 要改成utf8 ALTER TABLE student CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci 把student表列编码改成utf8 SHOW FULL COLUMNS FROM student

MySQL数据库报错pymysql.err.InterfaceError: (0, '')

今天入库的时候出现了报错pymysql.err.InterfaceError: (0, ''),经过排查,发现是由于把连接数据库的代码放到了插入函数的外部,导致多线程运行出错 1 def write_into_db(data): 2 db = pymysql.connect(host=db_host, user=db_user, password=db_password, port=db_port, db=db_name, charset='utf8') 3 cursor = db.cursor

Entity Framework插入数据报错:Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.

stackoverflow的解决方法 try { db.Entity.Add(entity); db.SaveChanges(); } catch (DbEntityValidationException dbEx) { foreach (var validationErrors in dbEx.EntityValidationErrors) { foreach (var validationError in validationErrors.ValidationErrors) { System

向Oracle数据库中CLOB插入数据报错问题

今天在项目中向数据库的CLOB属性插入一段篇文章(1000~2000)字就会报一个字符串过长的错误. 网上说用流来处理,没有这么做.这像是一个Bug,只要把插入的数据,默认扩充到2000以上就ok了. 下面是这段代码: if((temp.length()>=1000)&&(temp.length()<=2000)){ temp=StringUtils.rightPad(temp, 2008); } 使用StringUtils的rightPad方法使没超过2000的部分,在右边自

mysql插入报错:java.sql.SQLException: Incorrect string value: &#39;\xE6\x9D\xAD\xE5\xB7\x9E...&#39; for column &#39;address&#39; at row 1

界面报错: 日志报错: java.sql.SQLException: Incorrect string value: '\xE6\x9D\xAD\xE5\xB7\x9E...' for column 'address' at row 1 at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.17.jar:8.0.17] at com.mys

插入数据库失败([Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version)

报错信息如下: [SQL]INSERT INTO read VALUES(123, 456) [Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'read VALUES(123, 456)' at line 1 原因,read是数据库的关键字, 牢记,如果

程序插入数据报错ORA-01461: can bind a LONG value only for

我的ORACLE表里没有long字段,可是保存时报错: ORA-01461 :仅可以为插入LONG列的LONG值赋值 ORA-01461: can bind a LONG value only for insert into a LONG column 本来我这张表里只有一个VARCHAR2(4000)的字段,一直没有这种错误发生,后来我把另一个字段长度调整为VARCHAR2(4000),这错误就开始发生了. 你的数据库字符集可能是UTF-8的,对于UTF-8或欧洲的某些字符集,oracle在存