-
Notifications
You must be signed in to change notification settings - Fork 77
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
[BUG] null value bind to number value results in nulls for numeric values for subsequent calls even when afterwards a non null value is bound #334
Comments
Does anyone has a clue what goes wrong in above approach? This is what we can see what happens in de database by profiling all statements:
In step 2 the first row is prepared and inserted with value: 1, 'row 1', 1. As you can see in step 4 the value for column "numValue" is missing. So somewhere in the execution flow the bind to numValue parameter to value 3 is lost. |
@ErikJansenIRefact taking a peek now |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please re-open. |
Describe your system
Describe the bug
A prepared statement is created to insert values into a table with 3 parameters.
In a loop 3 rows will be inserted:
The bound value for the numeric value for row 3 is not inserted in the database. The column value is inserted as a null value.
It seems that after binding a null value to a numeric afterwards non null values are inserted as null values in the database.
Expected behavior
Proper insert of values after bind.
To Reproduce
Execute the provided script under code.
Code
Additional context
This is the result of retrieving the inserting rows from the table:
[
{ id: 1, textValue: 'row 1', numValue: 1 },
{ id: 2, textValue: null, numValue: null },
{ id: 3, textValue: 'row 3', numValue: null }
]
The text was updated successfully, but these errors were encountered: