asfernandes / node-firebird-drivers

Node.js Firebird Drivers
MIT License
53 stars 17 forks source link

Subsequent use of Statement::execute* methods may send incorrect value of input parameters #69

Closed asfernandes closed 3 years ago

asfernandes commented 3 years ago

When parameter was set to null, all subsequent execution will use null instead of the passed values.

Test case:

const statement2 = await attachment.prepare(transaction, 'insert into t1 (n1) values (?)');
await statement2.execute(transaction, [1]);
await statement2.execute(transaction, [null]);
// Next executions will be incorrect!
await statement2.execute(transaction, [10]);
await statement2.execute(transaction, [100]);
await statement2.dispose();