GithubHelp home page GithubHelp logo

Comments (13)

bimalkjha avatar bimalkjha commented on August 25, 2024 1

@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.

bimalkjha avatar bimalkjha commented on August 25, 2024 1

@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.

bimalkjha avatar bimalkjha commented on August 25, 2024 1

@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.

bimalkjha avatar bimalkjha commented on August 25, 2024 1

@rklbgiw We have plan to release new version before 30th September. Thanks.

from node-ibm_db.

bimalkjha avatar bimalkjha commented on August 25, 2024 1

@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.

bimalkjha avatar bimalkjha commented on August 25, 2024 1

@rklbgiw The fix has been publish on npm. You can install latest version of ibm_db and verify it. Thanks.

from node-ibm_db.

rklbgiw avatar rklbgiw commented on August 25, 2024

Hello guys @bbigras @theduderog @Sannis @mhamann @bimalkjha
Can anyone advice on this?

from node-ibm_db.

rklbgiw avatar rklbgiw commented on August 25, 2024

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.

rklbgiw avatar rklbgiw commented on August 25, 2024

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.

rklbgiw avatar rklbgiw commented on August 25, 2024

Great thanks!

from node-ibm_db.

rklbgiw avatar rklbgiw commented on August 25, 2024

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.

rklbgiw avatar rklbgiw commented on August 25, 2024

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.

rklbgiw avatar rklbgiw commented on August 25, 2024

great thanks for the message @bimalkjha

from node-ibm_db.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.