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

Unable to pin posts: "Illegal mix of collations" #420

Open
petermeem opened this issue Dec 17, 2020 · 1 comment
Open

Unable to pin posts: "Illegal mix of collations" #420

petermeem opened this issue Dec 17, 2020 · 1 comment

Comments

@petermeem
Copy link

Describe the bug

I cannot pin a post. As soon as I reload the page the pin is gone.

I get following error in MySQL:

writefreely[7512]: ERROR: 2020/12/17 22:58:24 database.go:1549: Unable to update pinned post: Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_0900_ai_ci,COERCIBLE) for operation '='

I have created the database as stated in the tutorial and the database has the latin1 charset and latin1_swedish_ci collation:

mysql> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| latin1 | latin1_swedish_ci |
+--------------------------+----------------------+

Steps to reproduce (if necessary)

Steps to reproduce the behavior:

  1. Pin a post.
  2. Reload the page.
  3. The pin is not there anymore.

Expected behavior

The pin should stay after reloading the page.
(It works if I choose sqlite)

Application configuration

  • Single mode
  • Database? [mysql]
  • Open registration? [no]
  • Federation enabled? [yes]

Version or last commit:
0.12.0_linux_amd64

@ghost
Copy link

ghost commented Jan 16, 2021

Same problem (same platform and setup). Since there is a problem with MySQL 8.0 and some queries (see #335), I think I will try to set up an instance with MySQL 5.6 or MariaDB 10 to see if it is a database related bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant