koishijs / koishi

Cross-platform chatbot framework made with love
https://koishi.chat
MIT License
4.5k stars 247 forks source link

Bug: dialogue 插件无法工作 #971

Closed ilharp closed 1 year ago

ilharp commented 1 year ago

Describe the bug

dialogue 插件无法工作,且任何人发消息都会打印如下报错:

2023-02-09 17:16:22 [W] mysql SELECT `id`, `flag`, `probS`, `probA`, `original`, `question`, `answer`, `predecessors`, `successorTimeout`, `writer`, `guilds`, `startTime`, `endTime` FROM `dialogue` qcbcagol WHERE (NOT(`predecessors`)) AND (`flag` & 16 = 0 AND find_in_set('onebot:群号', `guilds`) OR `flag` & 16 = 16 AND NOT((find_in_set('onebot:群号', `guilds`)))) AND (`flag` & 2 = 2 AND '消息' regexp `original` OR `flag` & 2 = 0 AND `question` = '消息') AND (((`_`.`endTime` - `_`.`startTime`) * (`_`.`startTime` - 1036) * (1036 - `_`.`endTime`)) >= 0)
2023-02-09 17:16:22 [W] session 消息
                        ER_BAD_FIELD_ERROR: Unknown column '_.endTime' in 'where clause'
                            at MySQLDriver.query (/files/proj/harperneko_4_11/node_modules/@minatojs/driver-mysql/lib/index.js:281:19)
                            at MySQLDriver._flushTasks (/files/proj/harperneko_4_11/node_modules/@minatojs/driver-mysql/lib/index.js:312:32)
                            at /files/proj/harperneko_4_11/node_modules/@minatojs/driver-mysql/lib/index.js:303:35
                            at processTicksAndRejections (node:internal/process/task_queues:78:11)

Steps to reproduce

使用最新版 MySQL 和 dialogue 全家桶

Expected behavior

正常工作

Screenshots

No response

Versions

System: OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish) CPU: (2) x64 AMD EPYC 7K62 48-Core Processor

Binaries: Node: 16.13.1 Yarn: 1.22.17

Koishi: Core: 4.11.4 Console: 5.2.3

Additional context

使用

均有此 bug

shigma commented 1 year ago

请尝试 mysql 5.3.1 是否修复此问题。