wmjie / ibm-db

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

NULL value can't pass the "not homogeneous with privious parameters array" check #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?
1. Edit file tests/test_execute_many.py
2. Go to line 50
3. Change "55.5" to "None"
4. Run the single test

> What is the expected output? What do you see instead?
Test should fail, as we are trying to INSERT a NULL value to a NOT NULL column.

The test passes instead, meaning that the same "not homogeneous with privious 
parameters array" error got raised.

> What version of the product are you using? On what operating system?
Express-C 9.7.4 on Linux

Original issue reported on code.google.com by sok...@gmail.com on 29 Sep 2011 at 7:20

GoogleCodeExporter commented 9 years ago
This one is expected result. When you changed "55.5" to None then also it is 
not homogeneous with previous parameters array.

Original comment by rahul.pr...@in.ibm.com on 3 Oct 2011 at 5:34

GoogleCodeExporter commented 9 years ago
With the check in place, you can't get it to issue:

INSERT INTO DEPARTMENT (DEPTNO, DEPTNAME, ADMRDEPT)
     VALUES ('B11', 'PURCHASING', 'B01'),
            ('E41', 'DATABASE ADMINISTRATION', NULL)

Original comment by sok...@gmail.com on 3 Oct 2011 at 5:57

GoogleCodeExporter commented 9 years ago
yes, through this you are able to insert none homogeneous array also. 
But execute_many have some limitations to insert homogeneous parameters array 
only(we are using ArrayInputChaining feature of DB2 CLI to ensure minimum round 
trip to the database, and this doesn't allow non homogeneous parameters array).

We catch non-homogeneous parameters before sending to the database that's why 
you are getting "not homogeneous with previous parameters array" error.

Original comment by rahul.pr...@in.ibm.com on 3 Oct 2011 at 6:19