- Notifications
You must be signed in to change notification settings - Fork 361
Closed
Labels
Description
I think that there is regression in cx_Oracle==6.0b1. Passing Decimal('0.000') as a parameter to the cursor doesn't return correct result, moreover passing Decimal('0'), '0', '0.000' works. Please find below regression test that fails in cx_Oracle==6.0b1 and works in cx_Oracle==5.3:
import cx_Oracle connection = cx_Oracle.connect("user", "password", "TNS") cursor = connection.cursor() cursor.execute('CREATE TABLE "TEST"("DATA" NUMBER(5,3) PRIMARY KEY)') cursor.execute('INSERT INTO "TEST"("DATA") VALUES (0)') cursor.execute( 'SELECT 1 FROM "TEST" WHERE "TEST"."DATA" = :arg0', {':arg0': Decimal('0.000')}, ) row = cursor.fetchone() assert row is not None assert row[0] == 1- Python 3.4.3 (64-bit)