wmjie / ibm-db

Automatically exported from code.google.com/p/ibm-db
0 stars 0 forks source link

Segmentation fault when retreiving value of DBCLOB of very large dimensions #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a table with a column of type DBCLOB and a very large size (e.g. 
1073741823);

CREATE TABLE MYDB.MYTBL (
    MYID INTEGER NOT NULL,
        MYTEXT 
    MYVALUE DBCLOB(1073741823)
);
INSERT INTO MYDB.MYTBL(MYID, MYVALUE) VALUES (1, 'Foo');

2. Execute a select statement;
3. Attempt to read the value in the result set corrisponding to the DBCLOB 
column

What is the expected output? 

In the case above, I'd expect to get 'Foo'.

What do you see instead?

A segmentation fault occurs.

>>> result = ibm_db.fetch_tuple(stmt)
>>> result
(<nil>,)
>>> result[0]
Segmentation fault

What version of the product are you using? 

I can replicate this on trunk.

On what operating system?

Linux 2.6.18 / Python 2.6.5

Please provide any additional information below.

Original issue reported on code.google.com by rig...@gmail.com on 20 Mar 2012 at 12:12

GoogleCodeExporter commented 9 years ago
Scratch "MYTEXT" from the SQL table creation statement.

Original comment by rig...@gmail.com on 20 Mar 2012 at 5:03

GoogleCodeExporter commented 9 years ago
We are able to reproduce your problem and working on this issue.

Will update you very soon with the patch.

Original comment by rahul.pr...@in.ibm.com on 29 Mar 2012 at 11:05

GoogleCodeExporter commented 9 years ago
I have created a patch for this issue and the patch is working fine with our 
initial testing.

Please find the modified ibm_db.c file in attachment and let me know how it 
works for you. 

Original comment by rahul.pr...@in.ibm.com on 3 Apr 2012 at 12:45

Attachments:

GoogleCodeExporter commented 9 years ago
I can confirm that the patch attached to #3 solves the problem.

>>> result = ibm_db.fetch_tuple(stmt)
>>> result
(u'',)
>>> result[0]
u''

Thank you very much for your support in solving this issue.

Original comment by rig...@gmail.com on 3 Apr 2012 at 1:35

GoogleCodeExporter commented 9 years ago
Released with ibm_db-1.0.6

Original comment by rahul.pr...@in.ibm.com on 25 May 2012 at 6:49