SQL temp table not using utf8mb4 if server default already set to utf8mb4 #18012
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.
Overview
A unit test was failing locally with row size too large but the db settings should have supported it. (CRM/Export/BAO/ExportTest.php)
Technical Details
One thing was createWithColumns was not using the getUtf8String() helper, so it was overriding the server default and putting utf8.
Another thing is that it wasn't clear what the intent of the
if
statement in that function was. If it was meant to be a boolean AND, then it would always fail. If it was meant to be a boolean OR, as I suspect, then why two clauses.Comments
I don't know the exact server settings on the PR test sites but I'm a little confused as to why the test was working there before and not also getting row size too large. Maybe a different page_size or something?