mysqljs / mysql

A pure node.js JavaScript Client implementing the MySQL protocol.
MIT License
18.22k stars 2.53k forks source link

Question - Get query of row #2553

Closed fzn0x closed 2 years ago

fzn0x commented 2 years ago

Data too long for column 'name' at row 27808, I get this type of error. How to see what query at row 27808 on bulk insert?

dougwilson commented 2 years ago

It would be whatever was at that row in your input file.

fzn0x commented 2 years ago

It would be whatever was at that row in your input file.

Solved by debug it using fs, mysql.format then get the row (line number)