Skip to content
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

Consider all DB-collations beginning w/ 'utf8mb4' to be utf8mb4 collations #402

Merged
merged 2 commits into from
Jul 8, 2020

Conversation

tmantynen
Copy link
Contributor

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.

@niczem
Copy link
Contributor

niczem commented Jun 23, 2020

thanks for the pr! The fail of the build pipeline seems not to be caused by your change.

@niczem niczem added the staged staged for merging label Jul 3, 2020
@niczem niczem changed the base branch from master to develop July 8, 2020 05:18
@niczem niczem merged commit 484a16a into digitalmethodsinitiative:develop Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staged staged for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants