amitkr / nodejs-db-informix

Infomix bindings for nodejs
MIT License
3 stars 3 forks source link

async:true #11

Open dwhvan opened 10 years ago

dwhvan commented 10 years ago

Is the async mode implemented? It looks like all the tests that you have included her are using "async:false"?

When I try the "async:true", the execution result is not the same as the result when I use "async:false".

dwhvan commented 10 years ago

Hi amitkr,

For example, when I use the async:false to execute a query in a test table, it returns correct data like:

{ employee_id: 1, name: 'Van', age: 29 }

But when I use async:true to execute the same query to select data from the table, it returns data like:

{ employee_id: 0, name: '\u0000\u0000\u0000', age: 0 }

All values returned from the "async:true" mode are just 0.

Any idea?

Thanks.

dwhvan commented 10 years ago

Except the issue above, when I created two connections and executed queries on them in async mode simultaneously (as the queries are non-blocking in async mode), I met the following errors:

* glibc detected * node: malloc(): memory corruption: 0x00007f0348004732 ***

or sometimes:

Segmentation fault

(this one happens even in the async:false mode).

Looks like we cannot make two connections at the same time, right?

amitkr commented 10 years ago

Hi dwhvan, you are right, that is a bug. will try to fix it ASAP.

cheers.