mariano / node-db-mysql

MySQL database bindings for Node.js
http://nodejsdb.org
150 stars 30 forks source link

Problem with multiple result sets #74

Closed Tharit closed 12 years ago

Tharit commented 12 years ago

The current release appears to be unable to handle queries returning multiple result sets. Even a simple stored procedure (with just one select) call can therefore apparently result in all further queries triggering the error "Commands out of sync; you can't run this command now" because not all result sets are processed.

I've added a simple "workaround" to the Results class, that discards all additional sets, so that at least the first one can be used, and the connection remains error free.

P.S.: Had a typo in my first pull request, just ignore that one, sorry :)