Skip to content

cx_Oracle 6.3 regression IndexError: cxoVar_getSingleValue: array size exceeded #176

Closed
@zzzeek

Description

@zzzeek

output in cx_Oracle 6.2 and below for variable.getvalue() when there's no value, None. in 6.3 I am getting the above error "IndexError: cxoVar_getSingleValue: array size exceeded".

import cx_Oracle

c = cx_Oracle.connect(
    dsn=cx_Oracle.makedsn("oracle1120", 1521), user="scott", password="tiger")

cursor = c.cursor()

try:
    cursor.execute("drop table foo")
except:
    pass

cursor.execute("""
    create table foo(
        id integer primary key,
        data varchar(50)
    )
""")

cursor.execute("insert into foo (id, data) values (1, 'hi')")

var = cursor.var(cx_Oracle.STRING)

cursor.execute("""
    UPDATE foo set data='there' WHERE id=2 RETURNING foo.id INTO :ret_0
""", {"ret_0": var})

print(var.getvalue())


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions