Comments (13)
@rklbgiw I am trying to write test program to repro this problem. It would be easy if you could have shared your Create Procedure SQL along with create table if any and CALL statement. Actually, if can write small test program to repro, it would much help so that we can just execute it and see the error. Thanks.
from node-ibm_db.
@rklbgiw I am able to repro the issue, but for null
value of BIGINT, I got Segmentation Fault (core dump) as below when installed ibm_db using npm install ibm_db --debug
command:
ODBC::GetOutputParameter - String: paramtype=2 c_type=1 type=1 buf_len=0 len=8 val=(null)
Segmentation fault (core dumped)
Please clarify why you are passing null for a BIGINT column. I think null is not a valid value for BIGINT, right?
And when you pass null as INPUT, what value you expect should be inserted in Db2 table? A 0?
Thanks.
from node-ibm_db.
@rklbgiw We have delivered fix for this issue and it should be available with next release of ibm_db. Hence, closing the issue now. Thanks.
from node-ibm_db.
@rklbgiw We have plan to release new version before 30th September. Thanks.
from node-ibm_db.
@rklbgiw After copying the latest files under ibm_db
directory, you need to run below commands from terminal:
cd ...\node_modules\ibm_db
npm install
Now, you can run your test program to verify. You can update your database connection info in file ibm_db\test\config.testConnectionStrings.json
and then execute node test-sp-resultset.js
to verify it.
If issue still exist for your, please edit Test 4
of test-sp-resultset.js
file and run it to reproduce your issue. If you are able to reproduce, share the updated test file here so that I can look into it. Thanks.
from node-ibm_db.
@rklbgiw The fix has been publish on npm. You can install latest version of ibm_db and verify it. Thanks.
from node-ibm_db.
Hello guys @bbigras @theduderog @Sannis @mhamann @bimalkjha
Can anyone advice on this?
from node-ibm_db.
Hi @bimalkjha, thanks much for having a look at the issue and coming back.
Here is the create procedure signature: CREATE OR REPLACE PROCEDURE SP_NAME (in doc xml, inout refno bigint, out docid bigint)
As I mentioned in the original issue content, the stored proc is expecting a NULL value for the INOUT param as it is written to validate the input to find matching value in a DB table for any value(including 0) except NULL and it looks the NULL value for BIGINT is allowed in the DB and the existing JDBC based consumer, so the existing call through JDBC works fine for a NULL value, we are new consumer to this stored procedure trying to consume it through ibm_db javascript driver and facing this segmentation fault error when we set null for the INOUT param, apparently the stored procedure returns validation error saying no match found for the given input when we set numeric default value( which is 0) to the INOUT param.
Can you advise, is this something can be addressed in the ibm_db lib to fix the segmentation fault error and accept NULL value binding for a BIGINT INOUT param?
Let me know for any other questions. thanks.
from node-ibm_db.
That's great and thanks much @bimalkjha and one last Q, can you advise any tentative date for the next release please? it would be great if you could advise the possible rel / version number?
from node-ibm_db.
Great thanks!
from node-ibm_db.
Hi @bimalkjha can I bother you again? I have tried downloading the changed files from you Git master repo and replaced it for the respective file on the node modules installed on my Mac, but I am still facing the Segmentation fault error, Am I doing something wrong here?
To reconfirm - here is the create procedure signature of our SP: CREATE OR REPLACE PROCEDURE SP_NAME (in doc xml, inout refno bigint, out docid bigint) and we are trying bind null for this field "inout refno bigint"
here is the binding..
const refno = {
ParamType: 'INOUT',
DataType: 'BIGINT',
Data: null
}
from node-ibm_db.
Hi @bimalkjha followed the steps you have given above and it called the SP with NULL value binding for BIGINT inout param, there is no segmentation fault this time and my test SP works okay on my local(i.e dev laptop), we are now looking forward the fix to be published on npmjs.org for us to get the lib with fix installed without any manual intervention and promote the fix to the project environments. It will be great if the fix published ASAP. thanks.
from node-ibm_db.
great thanks for the message @bimalkjha
from node-ibm_db.
Related Issues (20)
- [TypeScript] Type issue with ODBCStatement? HOT 11
- Incorrect results with XML containing Chinese data on Linux. Same code works on Windows. HOT 12
- await ODBCStatement.executeNonQuery does not work as the callback version does HOT 4
- ibm_db install on z/OS is failing HOT 22
- New Feature/Enhancement Request: Stream data into a blob instead of having entire buffer in memory HOT 1
- New Feature/Enhancement Request: Binary release (and make it small) HOT 4
- Update Axios HOT 1
- Timeout is not working with connectionPool or non-pooled connection HOT 2
- byte change when inserting hex byte array into varchar(16) for bit data column HOT 2
- Error: /node_modules/ibm_db/build/Release/odbc_bindings.node: ELF file's phentsize not the expected size HOT 4
- Unable to connect using TLS. Error - SQL30081N, Protocol Specific Error -414 HOT 2
- Providing extended client information HOT 4
- DB2 connection pool is unavailable after DB2 server restart HOT 1
- PDF content error happens after inserted PDF BLOB to DB2 table HOT 6
- insert data error HOT 2
- Bug Report_Getting " PrintDeps.exe Bad image" pop-ups while running tests from terminal using ibm_db package with Playwright with JavaScript HOT 8
- string returned after date type requested HOT 1
- Fetch multiple rows HOT 2
- adm-zip can it be moved to dev dependencies HOT 2
- queryResult deferred callback result changed with version 3.2.3 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ibm_db.