Fix | Fix batch insert failing when AE is turned on #1378
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #1301. Testing shows it also fixes #1360, but will need to confirm from user.
Continues from PR #1334. Testing has been carried over, but the fix is different.
The problem was coming from executing
sp_describe_parameter_encryption
. This statement is executed when AE is turned on to retrieve the encryption parameter. Code was currently written in such a way thatsp_describe_paramter_encryption
was being executed twice (or multiple times) if AE was enabled, which caused the driver to think that the current request was completed, which caused the driver to error out during the actual execution of the batch statement (and a plethora of other problems). Adding logic to only run param fetch once and save the encryption metadata for the subsequent batches as well solves this problem.Before: (PrecisionScaleTest::testMultiBatch)
After:
Testing was done against with both AE and AEv2 enabled.