Consider all DB-collations beginning w/ 'utf8mb4' to be utf8mb4 collations #402
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.
Instead of 'utf8mb4_unicode_ci' or 'utf8mb4_general_ci', the DB-collation in my MySQL 8.0.20-0ubuntu0.20.04.1. is 'utf8mb4_0900_ai_ci' (and there is a long list of other collations beginning with 'utf8mb4'). Function current_collation() thus returns 'utf8_bin', not 'utf8mb4_bin'.
The following error is thrown any time I try to launch any of the Networks analyzes: PHP Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1253 COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4' in /var/www/dmi-tcat/analysis/mod.mention_graph.php:56
The PR changes function current_collation() so that it considers all DB-collations beginning with string 'utf8mb4' to be an utf8mb4 collations, thus returning 'utf8mb4_bin'. Launching any of the Networks analyzes no longer throw an error.