-
Notifications
You must be signed in to change notification settings - Fork 663
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
Mycat-1.4 配置主键自增长的问题. #32
Comments
你的折分算法在那儿,你又没有指定 |
|
遇到同样的问题,请问server里面做了配置并且也将本地的properties文件修改了,但是还是报同样的错误 |
碰到了ID自增不能的问题。。。。
schema.xml配置
squence_conf.properties配置
使用mycat
4.插入,语句中不设置id值
报错:
我还以为是mycat自动填充自增id的 |
多测试一下就知道了,语句里面需要加上类似这样。"id"=>'next value for MYCATSEQ_COMPANY'。 |
版本 - Mycat-server-1.4-RELEASE-20150901112004-linux.tar.gz
schema.xml配置文件内容:
在运行insert into语句的时候报错:
mysql> insert into sns_user_relation (user_id, rel_id, rel_type, is_valid, create_time, update_time, group_id, uid) values (149,145,3,1,NOW(),NOW(),0,7001317);
ERROR 1003 (HY000): mycat sequnce err.java.lang.NumberFormatException: null
日志错误:
09/23 23:14:54.712 ERROR Thread-1 -MyCATSequenceProcessor.executeSeq(SesionSQLPair)
java.lang.NumberFormatException: null
at java.lang.Long.parseLong(Long.java:404)
at java.lang.Long.parseLong(Long.java:483)
at org.opencloudb.sequence.handler.IncrSequenceHandler.nextId(IncrSequenceHandler.java:62)
at org.opencloudb.parser.druid.DruidSequenceHandler.getExecuteSql(DruidSequenceHandler.java:58)
at org.opencloudb.route.MyCATSequnceProcessor.executeSeq(MyCATSequnceProcessor.java:84)
at org.opencloudb.route.MyCATSequnceProcessor.access$200(MyCATSequnceProcessor.java:18)
at org.opencloudb.route.MyCATSequnceProcessor$ExecuteThread.run(MyCATSequnceProcessor.java:104)
The text was updated successfully, but these errors were encountered: