olivierphi / Node-DBI

A SQL database abstraction layer strongly inspired by the PHP Zend Framework Zend_Db API, with support of multiple Node.js database engines
https://github.com/DrBenton/Node-DBI
93 stars 22 forks source link

generic-pool of mysql-libmysqlclient #13

Open buxit opened 12 years ago

buxit commented 12 years ago

hi!

I'm trying to use node-dbi with generic-pool. It works well with adaptor mysql. With mysql-libmysqlclient i get:

ERROR pool dbi - release called twice for the same resource: Error
    at Object.exports.Pool.me.release (.../node_modules/generic-pool/lib/generic-pool.js:317:61)
    at exports.Pool.diff (.../node_modules/generic-pool/lib/generic-pool.js:263:14)
    at poolModule.Pool.create (.../dbi-pool.js:18:7)
    at DBWrapper._onAdapterConnection (.../node_modules/node-dbi/lib/dbWrapper.js:536:44)
    at Adapter.EventEmitter.emit (events.js:93:17)
    at Adapter.DBAdapterAbstract._onConnectionInitialization (.../node_modules/node-dbi/lib/dbAdapterAbstract.js:239:8)

Apparently the resources returned by two subsequent new DBWrapper() are the same for mysql-libmysqlclient? Am I doing something wrong?

olivierphi commented 10 years ago

@buxit Well, I've never worked with this "generic-pool" feature. I don't have any idea about how we could fix this.

Furthermore,the "mysql-libmysqlclient" seems to be broken at the moment for Node.js v 0.10 - I had to disable its unit tests for the moment... :-/ (@see https://github.com/Sannis/node-mysql-libmysqlclient/issues/181 or error messages after "npm install" on https://travis-ci.org/DrBenton/Node-DBI/jobs/16871572)

If you know how to solve this problem, let me now! :-)