-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
value exception throws when using batch-insert to insert one row #347
Comments
I came across this when looking at reporting a similar issue. Environment
If you use the bind_null interface it works, but bind strings does not insert a null and instead will insert the string ignoring the "null" aspect. |
I believe the issue is in bind_parameter
In the one row example the buffer.size_ is 1 and the buffer_size is 2. Changing it fixes it, so that code is what is causing the issue but I am not 100% sure what the code is supposed to be doing (hence no PR). I am unsure as to why you wouldn't just always pass in the bind_len_or_null_ value but looking through the history that appears to have been there for many years (tracked it back as far as 2bd4e2e). Not sure if anyone has any insight here. |
@x-awaken & @HGeorge-Adapdix Thank you for your reports. Line 2242 in 71b7f0b
Line 2888 in 71b7f0b
I do not recall anything specific on the use of What I'd suggest is to submit PR with
and let's see what the CI builds think about it. |
Environment
Actual behavior
when insert one row in batch mode, exception throws:
data/time value out of range: "0000-00-00 00:00:00"
but it work well when insert one more rows.
Expected behavior
insert one row into database with null value success
Minimal Working Example
The text was updated successfully, but these errors were encountered: