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

insert can use Buffer, but not work with Uint8Array (I use mysql2) #6045

Open
i18n-now opened this issue Mar 26, 2024 · 0 comments
Open

insert can use Buffer, but not work with Uint8Array (I use mysql2) #6045

i18n-now opened this issue Mar 26, 2024 · 0 comments

Comments

@i18n-now
Copy link

i18n-now commented Mar 26, 2024

when use Uint8Array , will cause error (the hash column)


Error: insert ignore into `v` (`css`, `hash`, `idLi`, `js`) values (151, {"0":114,"1":108,"2":86,"3":55,"4":10,"5":74,"6":187,"7":109,"8":165,"9":203,"10":90,"11":226,"12":165,"13":144,"14":143,"15":33,
"16":98,"17":122,"18":116,"19":22,"20":231,"21":192,"22":78,"23":37,"24":13,"25":131,"26":169,"27":153,"28":129,"29":125,"30":136,"31":157}, X'01010101010101010101010101010101010101010101010101010101010
1010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101', 38) - Unknown column '0' in 'field list'
    at Packet.asError (/Volumes/d/i18n/node/s3dist/node_modules/.pnpm/mysql2@3.9.2/node_modules/mysql2/lib/packets/packet.js:728:17)
    at Query.execute (/Volumes/d/i18n/node/s3dist/node_modules/.pnpm/mysql2@3.9.2/node_modules/mysql2/lib/commands/command.js:29:26)
    at Connection.handlePacket (/Volumes/d/i18n/node/s3dist/node_modules/.pnpm/mysql2@3.9.2/node_modules/mysql2/lib/connection.js:481:34)
    at PacketParser.onPacket (/Volumes/d/i18n/node/s3dist/node_modules/.pnpm/mysql2@3.9.2/node_modules/mysql2/lib/connection.js:97:12)
    at PacketParser.executeStart (/Volumes/d/i18n/node/s3dist/node_modules/.pnpm/mysql2@3.9.2/node_modules/mysql2/lib/packet_parser.js:75:16)
    at Socket.<anonymous> (/Volumes/d/i18n/node/s3dist/node_modules/.pnpm/mysql2@3.9.2/node_modules/mysql2/lib/connection.js:104:25)
    at Socket.emit (node:events:519:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  code: 'ER_BAD_FIELD_ERROR',
  errno: 1054,
  sqlState: '42S22',
  sqlMessage: "Unknown column '0' in 'field list'",
  sql: "insert ignore into `v` (`css`, `hash`, `idLi`, `js`) values (151, `0` = 114, `1` = 108, `2` = 86, `3` = 55, `4` = 10, `5` = 74, `6` = 187, `7` = 109, `8` = 165, `9` = 203, `10` = 90, `11` = 226,
 `12` = 165, `13` = 144, `14` = 143, `15` = 33, `16` = 98, `17` = 122, `18` = 116, `19` = 22, `20` = 231, `21` = 192, `22` = 78, `23` = 37, `24` = 13, `25` = 131, `26` = 169, `27` = 153, `28` = 129, `29
` = 125, `30` = 136, `31` = 157, X'01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010
101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101', 38)"
}
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

1 participant