koishijs / koishi

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

Bug: MYSQL插件会把插入的数据中Z的字符替换成undefined #955

Closed ghost closed 1 year ago

ghost commented 1 year ago

Describe the bug

MYSQL插件在插入数据或者更新数据的时候会把插入的数据中Z的字符替换成undefined 插入是数据:

let test = {
        stuid: 'Z',
        stoken: 'z=',
        ltoken: 'ZZ',
        mid: 'Zz',
        uid: 'zZ',
        user_id: 'Bob',
        is_sign: true,
        login_ticket: undefined,
        qq: 'Bob',
        update_time: new Date(),
        create_time: new Date()
      }
      await global.dbHelper.create('genshin_user_stoken', test)

实际上是这样的 image

Steps to reproduce

复制代码插入到mysql表中

Expected behavior

不应该替换为undefined

Screenshots

image

Versions

Additional context

No response

Nikaidou-Shinku commented 1 year ago

好像和 shigma/minato#17 重复了。

shigma commented 1 year ago

奇妙的 bug 🤣

shigma commented 1 year ago

感谢反馈,已修复。