node-mysql2
node-mysql2 copied to clipboard
Got warning: Warning: got packets out of order. Expected 14 but received 2
When I run the stored procedure query, I always got this message but the data result is correct. How can I disable the warning message.
here is my example code
let pool = await mysql.createPool({ "host": systemConfig.get("host"), "user": systemConfig.get("user"), "password": systemConfig.get("password"), "database": systemConfig.get("database"), "connectTimeout": systemConfig.get("connectTimeout"), "acquireTimeout": systemConfig.get("acquireTimeout"), "waitForConnections": systemConfig.get("waitForConnections"), "connectionLimit": systemConfig.get("connectionLimit"), "queueLimit": systemConfig.get("queueLimit"), "multipleStatements": systemConfig.get("multipleStatements"), "charset": systemConfig.get("charset"), "compress": true, "Promise":global.Promise });
let conn = await pool.getConnection();
let res = conn.query("CALL xxx (?,?,?)",['1212','1','fdsfs']);
hi @hungchai What's the server version you are using? Is there any way you can prepare docker image that I can pull to reproduce this?
Engine MySQL 5.6.27
As this is an AWS RDS, I cannot re-produce the same env in docker.
at the moment this is not configurable, the only way to disable warning is to comment out this line - https://github.com/sidorares/node-mysql2/blob/80c55ef2b60572ef7b0ac7bee2eb45db8de6a516/lib/connection.js#L459
I wonder if packet order AWS RDS server sends is actually incorrect or there is a bug in client code. If there is no sensitive information in your query, can you add debug: true
to you createPool()
config and post what you get in the output?
how can i pm you?
I will mask the hex data from raw: xxx before send to you. Is it alright for you to debug?
It could be that important bit (packet headers) is in hex. At least leave unmasked first 4 bytes of each line (8 hex chars)
I revised the question. I found the warning message coming from when querying stored procedure
sent to your email
Any updates
I'm having the same warning (using AWS RDS), did you fixed it @hungchai ? Can't you just put the warnings under an flag or .on
-like event @sidorares ?
I'm experiencing the same warning when connecting to mysql 8.
Same here