{"action":"created","issue":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/2133","repository_url":"https://api.github.com/repos/mysqljs/mysql","labels_url":"https://api.github.com/repos/mysqljs/mysql/issues/2133/labels{/name}","comments_url":"https://api.github.com/repos/mysqljs/mysql/issues/2133/comments","events_url":"https://api.github.com/repos/mysqljs/mysql/issues/2133/events","html_url":"https://github.com/mysqljs/mysql/issues/2133","id":378810670,"node_id":"MDU6SXNzdWUzNzg4MTA2NzA=","number":2133,"title":"App crashes execute statement error","user":{"login":"cimit1994","id":21237040,"node_id":"MDQ6VXNlcjIxMjM3MDQw","avatar_url":"https://avatars0.githubusercontent.com/u/21237040?v=4","gravatar_id":"","url":"https://api.github.com/users/cimit1994","html_url":"https://github.com/cimit1994","followers_url":"https://api.github.com/users/cimit1994/followers","following_url":"https://api.github.com/users/cimit1994/following{/other_user}","gists_url":"https://api.github.com/users/cimit1994/gists{/gist_id}","starred_url":"https://api.github.com/users/cimit1994/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cimit1994/subscriptions","organizations_url":"https://api.github.com/users/cimit1994/orgs","repos_url":"https://api.github.com/users/cimit1994/repos","events_url":"https://api.github.com/users/cimit1994/events{/privacy}","received_events_url":"https://api.github.com/users/cimit1994/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-08T16:22:06Z","updated_at":"2018-11-08T16:56:47Z","closed_at":"2018-11-08T16:54:05Z","author_association":"NONE","body":"```\r\ninsert into test.log_all (`entity`, `content`) values\r\n========================[mysql error] { Error: ER_DATA_TOO_LONG: Data too long for column 'ENTITY' at row 1\r\n    at Query.Sequence._packetToError (E:\\cim\\node_modules\\mysql\\lib\\protocol\\sequences\\Sequence.js:47:14)\r\n    at Query.ErrorPacket (E:\\cim\\node_modules\\mysql\\lib\\protocol\\sequences\\Query.js:77:18)\r\n    at Protocol._parsePacket (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Protocol.js:278:23)\r\n    at Parser.write (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Parser.js:76:12)\r\n    at Protocol.write (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Protocol.js:38:16)\r\n    at Socket.<anonymous> (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:91:28)\r\n    at Socket.<anonymous> (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:502:10)\r\n    at Socket.emit (events.js:182:13)\r\n    at addChunk (_stream_readable.js:283:12)\r\n    at readableAddChunk (_stream_readable.js:264:11)\r\n    --------------------\r\n    at Protocol._enqueue (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Protocol.js:144:48)\r\n    at PoolConnection.query (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:200:25)\r\n    at E:\\cim\\databases\\mysql\\mysql-connect.js:90:20\r\n    at Handshake.onConnect (E:\\cim\\node_modules\\mysql\\lib\\Pool.js:64:7)\r\n    at Handshake.<anonymous> (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:502:10)\r\n    at Handshake._callback (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:468:16)\r\n    at Handshake.Sequence.end (E:\\cim\\node_modules\\mysql\\lib\\protocol\\sequences\\Sequence.js:83:24)\r\n    at Handshake.Sequence.OkPacket (E:\\cim\\node_modules\\mysql\\lib\\protocol\\sequences\\Sequence.js:92:8)\r\n    at Protocol._parsePacket (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Protocol.js:278:23)\r\n    at Parser.write (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Parser.js:76:12)\r\n  code: 'ER_DATA_TOO_LONG',\r\n  errno: 1406,\r\n  sqlMessage: \"Data too long for column 'ENTITY' at row 1\",\r\n  sqlState: '22001',\r\n  index: 0,\r\n  sql:\r\n   \"insert into test.log_all (`entity`, `content`) values ('entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2entity2','content1')\" }\r\nE:\\cim\\node_modules\\mysql\\lib\\protocol\\Parser.js:80\r\n        throw err; // Rethrow non-MySQL errors\r\n        ^\r\n\r\nReferenceError: stament is not defined\r\n    at Query.<anonymous> (E:\\cim\\databases\\mysql\\mysql-connect.js:92:52)\r\n    at Query.<anonymous> (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:502:10)\r\n    at Query._callback (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:468:16)\r\n    at Query.Sequence.end (E:\\cim\\node_modules\\mysql\\lib\\protocol\\sequences\\Sequence.js:83:24)\r\n    at Query.ErrorPacket (E:\\cim\\node_modules\\mysql\\lib\\protocol\\sequences\\Query.js:90:8)\r\n    at Protocol._parsePacket (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Protocol.js:278:23)\r\n    at Parser.write (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Parser.js:76:12)\r\n    at Protocol.write (E:\\cim\\node_modules\\mysql\\lib\\protocol\\Protocol.js:38:16)\r\n    at Socket.<anonymous> (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:91:28)\r\n    at Socket.<anonymous> (E:\\cim\\node_modules\\mysql\\lib\\Connection.js:502:10)\r\n[nodemon] app crashed - waiting for file changes before starting...\r\n```\r\n\r\ni am using pool connection with the version mysql@2.16.0\r\n\r\nCould you recommend help me \"how to push this error to error and the app is not crash\"\r\n\r\nThank all,\r\nCimit"},"comment":{"url":"https://api.github.com/repos/mysqljs/mysql/issues/comments/437075729","html_url":"https://github.com/mysqljs/mysql/issues/2133#issuecomment-437075729","issue_url":"https://api.github.com/repos/mysqljs/mysql/issues/2133","id":437075729,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzA3NTcyOQ==","user":{"login":"dougwilson","id":67512,"node_id":"MDQ6VXNlcjY3NTEy","avatar_url":"https://avatars3.githubusercontent.com/u/67512?v=4","gravatar_id":"","url":"https://api.github.com/users/dougwilson","html_url":"https://github.com/dougwilson","followers_url":"https://api.github.com/users/dougwilson/followers","following_url":"https://api.github.com/users/dougwilson/following{/other_user}","gists_url":"https://api.github.com/users/dougwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/dougwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dougwilson/subscriptions","organizations_url":"https://api.github.com/users/dougwilson/orgs","repos_url":"https://api.github.com/users/dougwilson/repos","events_url":"https://api.github.com/users/dougwilson/events{/privacy}","received_events_url":"https://api.github.com/users/dougwilson/received_events","type":"User","site_admin":false},"created_at":"2018-11-08T16:56:47Z","updated_at":"2018-11-08T16:56:47Z","author_association":"MEMBER","body":"Error is in your own code, not this module: ReferenceError: stament is not defined\r\nat Query. (E:\\cim\\databases\\mysql\\mysql-connect.js:92:52)"}}
{"actor":{"display_login":"dougwilson"}}