Skip to content
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

Bug: mysql INSERT INTO channel ON DUPLICATE KEY UPDATE activity 崩溃 #493

Closed
Tracked by #482
im20A0 opened this issue Feb 4, 2022 · 0 comments
Closed
Tracked by #482
Labels
bug BUG

Comments

@im20A0
Copy link

im20A0 commented Feb 4, 2022

Describe the bug

[W] mysql INSERT INTO channel (id,platform,flag,assignee,name,activity) VALUES ('#######', 'onebot', 0, '', '', '{"19027":null}')
ON DUPLICATE KEY UPDATE activity = if(id = '#######' AND platform = 'onebot', json_set(ifnull(activity, '{}'), '$."19027"', (json_unquote(json_extract(activity, '$."19027"')) + 13)), VALUES(activity))

/root/koishi/node_modules/@koishijs/plugin-database-mysql/src/index.ts:242
const error = new Error()
^
ER_TRUNCATED_WRONG_VALUE: Truncated incorrect DOUBLE value: 'null':
at MysqlDatabase.query (/root/koishi/node_modules/@koishijs/plugin-database-mysql/src/index.ts:242:19)
at MysqlDatabase.upsert (/root/koishi/node_modules/@koishijs/plugin-database-mysql/src/index.ts:418:16)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at _StatisticsProvider._uploadGuilds (/root/koishi/node_modules/@koishijs/plugin-status/src/stats.ts:190:5)
at async Promise.all (index 3)
at _StatisticsProvider.upload (/root/koishi/node_modules/@koishijs/plugin-status/src/stats.ts:205:7)

Steps to reproduce

调用各种指令后不定期发生

Expected behavior

Screenshots

No response

Versions

  • OS: Ubuntu 21.04 LTS
  • Platform: onebot 及 onebot qqguild
  • Node version: 16.13.2
  • Koishi version: 4.1.2

Additional context

No response

@im20A0 im20A0 added the bug BUG label Feb 4, 2022
@im20A0 im20A0 changed the title Bug: Bug: ON DUPLICATE KEY UPDATE activity Feb 4, 2022
@im20A0 im20A0 changed the title Bug: ON DUPLICATE KEY UPDATE activity Bug: mysql ON DUPLICATE KEY UPDATE activity Feb 4, 2022
@im20A0 im20A0 changed the title Bug: mysql ON DUPLICATE KEY UPDATE activity Bug: mysql ON DUPLICATE KEY UPDATE activity 崩溃 Feb 4, 2022
@im20A0 im20A0 changed the title Bug: mysql ON DUPLICATE KEY UPDATE activity 崩溃 Bug: mysql INSERT INTO channel ON DUPLICATE KEY UPDATE activity 崩溃 Feb 4, 2022
@shigma shigma mentioned this issue Feb 8, 2022
13 tasks
@shigma shigma closed this as completed in d549df1 Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug BUG
Projects
None yet
Development

No branches or pull requests

1 participant