Open ShishkovSpace opened 2 years ago
Well I haven't looked at this project in a while and no longer have write access to it since I left Zillow. I can probably ask around and get back on the project though.
There does seem to be some issue as I can get a seg fault on OS X with similar inputs to yours. I'll see if I can find some time to look into it more in the coming week.
It would be great.
Thanks a lot!
Hi,
Faced an unexpected error trace during inserting NULL value into table column which has a NOT NULL constraint and rightmost in table. In scenario above i've expected to recieve
_tds.IntegrityError
with error trace about NOT NULL constraint but instead of it i'm recieving:_tds.OperationalError: While reading current row from host, a premature end-of-message was encountered--an incoming data stream was interrupted when the server expected to see more data. The host program may have terminated. Ensure that you are using a supported client application programming interface (API).
Here is a Python code to reproduce it:
If i'm trying to insert NULL value into any other not rightmost column with NOT NULL constraint i recieve expected error trace:
_tds.IntegrityError: Cannot insert the value NULL into column 'second_col', table 'test.dbo.ctds_test'; column does not allow nulls. INSERT fails.
I guess this behaviour is not correct and in this scenario ctds should message about NOT NULL constraint violation. Or problem above already fixed/excluded for higher ctds versions (i'm using 1.10.0 or 1.12.0 in projects)? Or maybe there are some workarounds for it how it should be handled?
P.S. Hope you are still supporting project and repository, because its hard to find any alternatives with bulk operations for SQL Server via python other than ctds!)