Tag Archives: can’t fetch sequnce in db

[Solved] Mycat Add Data Error: can’t fetch sequnce in db,sequnce

MYCAT error

 2021-11-08 17:13:01,310 [ERROR][Thread-1] MyCATSequenceProcessor.executeSeq(SesionSQLPair) java.lang.RuntimeException: can't fetch sequnce in db,sequnce :CN_TASK_LOCKSET detail:null
        at io.mycat.route.sequence.handler.IncrSequenceMySQLHandler.getSeqValueFromDB(IncrSequenceMySQLHandler.java:125)
        at io.mycat.route.sequence.handler.IncrSequenceMySQLHandler.nextId(IncrSequenceMySQLHandler.java:94)
        at io.mycat.route.parser.druid.DruidSequenceHandler.getExecuteSql(DruidSequenceHandler.java:64)
        at io.mycat.route.MyCATSequnceProcessor.executeSeq(MyCATSequnceProcessor.java:85)
        at io.mycat.route.MyCATSequnceProcessor.access$200(MyCATSequnceProcessor.java:19)
        at io.mycat.route.MyCATSequnceProcessor$ExecuteThread.run(MyCATSequnceProcessor.java:110)
 (io.mycat.route.MyCATSequnceProcessor:MyCATSequnceProcessor.java:89)
java.lang.RuntimeException: can't fetch sequnce in db,sequnce : detail:null
 mycat sequnce err.java.lang.RuntimeException: can't fetch sequnce in db,sequnce : detail:null
2021-11-08 17:15:38,328 [ERROR][Thread-1] MyCATSequenceProcessor.executeSeq(SesionSQLPair) java.lang.RuntimeException: can't fetch sequnce in db,sequnce :CN_TASK_LOCKSET detail:null
        at io.mycat.route.sequence.handler.IncrSequenceMySQLHandler.getSeqValueFromDB(IncrSequenceMySQLHandler.java:125)

There are various explanations on the Internet, such as configuration files, functions, etc

After testing, it is found that there is another problem, that is, the version of MySQL will also cause the above problems. Using mysql8 may cause the above problems. I use mysql5 to solve the problem