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

注册 用户名太长 没有限制导致报错 #47

Open
lazyTai opened this issue Aug 15, 2019 · 1 comment
Open

注册 用户名太长 没有限制导致报错 #47

lazyTai opened this issue Aug 15, 2019 · 1 comment

Comments

@lazyTai
Copy link

lazyTai commented Aug 15, 2019

注册的时候我使用了 [email protected]的长度字符串报错
也没有提示 后来看了后台logs

m','18819448261',1565861057993,0,1), Time: 5ms
{ Error: ER_DATA_TOO_LONG: Data too long for column 'username' at row 1
    at Query.Sequence._packetToError (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/sequences/Sequence.js:47:14)
    at Query.ErrorPacket (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/sequences/Query.js:77:18)
    at Protocol._parsePacket (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/Protocol.js:291:23)
    at Parser._parsePacket (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/Parser.js:433:10)
    at Parser.write (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/Parser.js:43:10)
    at Protocol.write (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/Protocol.js:38:16)
    at Socket.<anonymous> (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/Connection.js:91:28)
    at Socket.<anonymous> (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/Connection.js:525:10)
    at Socket.emit (events.js:189:13)
    at addChunk (_stream_readable.js:284:12)
    at readableAddChunk (_stream_readable.js:265:11)
    at Socket.Readable.push (_stream_readable.js:220:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
    --------------------
    at Protocol._enqueue (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/protocol/Protocol.js:144:48)
    at PoolConnection.query (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@mysql/lib/Connection.js:201:25)
    at Promise (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@think-helper/index.js:83:10)
    at new Promise (<anonymous>)
    at args (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@think-helper/index.js:82:12)
    at ThinkMysql.[think-mysql-query] (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@think-mysql/index.js:169:12)
    at getConnection.then.connection (/Users/macbook/Downloads/CmsWing/node_modules/[email protected]@think-mysql/index.js:247:25)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  code: 'ER_DATA_TOO_LONG',
@arterli
Copy link
Owner

arterli commented Aug 24, 2019

数据库字段限制了长度,这个后面修复下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants