Please Help,

Database: 7.3.0.29

I have found a critical Bug,
when Inserting/Updating LONG Fields.

The Bug only occurs if the LONG-data has a certain size. 

here a python script to reproduce:
-------------------------------------------------------
#!/usr/bin/env python

import sapdb,cStringIO

conn=sapdb.connect("USER","PWD","SERVICE")
try:
        conn.sql("DROP TABLE TEST")
except:
        pass

conn.sql("CREATE TABLE TEST (A INTEGER PRIMARY KEY, B LONG)")

i=64885
while 1:
        i=i+1
        print i
        #------------------------------------------
        # create data1
        data1="x"*i #292352
        f=cStringIO.StringIO(data1)
        #------------------------------------------
        # write data1
        conn.sqlX("INSERT INTO TEST (A,B) VALUES (1,?)" , [f.read])
        #------------------------------------------
        # re-read data1 into data2
        rset =conn.sql("SELECT * FROM TEST WHERE A=1")
        row  =rset.next()
        data2=row[1].read()
        #------------------------------------------
        # stop if data1!=data2
        if data1!=data2:
                raise RuntimeError("data1!=data2")
        #------------------------------------------
        # empty table
        conn.sql("DELETE FROM TEST")
        conn.commit()

conn.release()

----------------------------------------------------------------------------
Output:
64886
64887
64888
64889
64890
64891
64892
64893
64894
64895
64896
64897
64898
                                          ABEND: sqlabort called
Speicherzugriffsfehler
----------------------------------------------------------------------------

- The Seg-fault only occurs when len(data1) is near 65536 and multiples of 65536 
(*2,*3,...)
- The error does not occur when connecting to sapdb-instance 7.3.0.21
- The error also occurs with python-driver 7.4.0.3 
(sapdb-python-linux-i386-7.4.03.12a.tgz)

Questions:
----------

- Daniel: Could you please help me finding out if it is a problem of the python-driver 
or 
  if it is a problem of the database (7.3.0.29) [VERY IMPORTANT!!!!]
- CVS of sapdb-7.3: ./sys/src/in/vin77.cpp What is this file for?
- CVS of sapdb-7.3: ./sys/src/in/vin77.c   What is this file for?  (which one is for 
sapdbmodule.so?)
- Are there other files needed (included) for the python-driver?

Greetings, and Best regards, Andre' Reitz



-- 
_____________________________________________
inworks GmbH            Andre Reitz             
Magirusstrasse 44       Tel. 0731/93 80 7-21
89077 Ulm               http://www.inworks.de

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to