Problem with mysql


#1

Hi in my seafile log thers a lot of errors like this

my mysql collation ist utf8-general-ci und all tables too

[04/05/2018 11:29:44 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, p.timestamp FROM Repo r LEFT JOIN FolderPermTimestamp p ON r.repo_id=p.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:29:44 AM] http-server.c(2993): Failed to get folder perm timestamp.
[04/05/2018 11:29:44 AM] http-server.c(3082): Failed to find origin repo perm ts. Returning empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:29:49 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, l.update_time FROM Repo r LEFT JOIN FileLockTimestamp l ON r.repo_id=l.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:29:49 AM] http-server.c(3245): Failed to get file lock timestamp.
[04/05/2018 11:29:49 AM] http-server.c(3332): Failed to find origin repo lock ts. Returing empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:30:14 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, p.timestamp FROM Repo r LEFT JOIN FolderPermTimestamp p ON r.repo_id=p.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:30:14 AM] http-server.c(2993): Failed to get folder perm timestamp.
[04/05/2018 11:30:14 AM] http-server.c(3082): Failed to find origin repo perm ts. Returning empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:30:19 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, l.update_time FROM Repo r LEFT JOIN FileLockTimestamp l ON r.repo_id=l.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:30:19 AM] http-server.c(3245): Failed to get file lock timestamp.
[04/05/2018 11:30:19 AM] http-server.c(3332): Failed to find origin repo lock ts. Returing empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:30:45 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, p.timestamp FROM Repo r LEFT JOIN FolderPermTimestamp p ON r.repo_id=p.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:30:45 AM] http-server.c(2993): Failed to get folder perm timestamp.
[04/05/2018 11:30:45 AM] http-server.c(3082): Failed to find origin repo perm ts. Returning empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:30:50 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, l.update_time FROM Repo r LEFT JOIN FileLockTimestamp l ON r.repo_id=l.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:30:50 AM] http-server.c(3245): Failed to get file lock timestamp.
[04/05/2018 11:30:50 AM] http-server.c(3332): Failed to find origin repo lock ts. Returing empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:31:16 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, p.timestamp FROM Repo r LEFT JOIN FolderPermTimestamp p ON r.repo_id=p.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:31:16 AM] http-server.c(2993): Failed to get folder perm timestamp.
[04/05/2018 11:31:16 AM] http-server.c(3082): Failed to find origin repo perm ts. Returning empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:31:21 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, l.update_time FROM Repo r LEFT JOIN FileLockTimestamp l ON r.repo_id=l.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:31:21 AM] http-server.c(3245): Failed to get file lock timestamp.
[04/05/2018 11:31:21 AM] http-server.c(3332): Failed to find origin repo lock ts. Returing empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:31:47 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, p.timestamp FROM Repo r LEFT JOIN FolderPermTimestamp p ON r.repo_id=p.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:31:47 AM] http-server.c(2993): Failed to get folder perm timestamp.
[04/05/2018 11:31:47 AM] http-server.c(3082): Failed to find origin repo perm ts. Returning empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:31:52 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, l.update_time FROM Repo r LEFT JOIN FileLockTimestamp l ON r.repo_id=l.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:31:52 AM] http-server.c(3245): Failed to get file lock timestamp.
[04/05/2018 11:31:52 AM] http-server.c(3332): Failed to find origin repo lock ts. Returing empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:32:18 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, p.timestamp FROM Repo r LEFT JOIN FolderPermTimestamp p ON r.repo_id=p.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:32:18 AM] http-server.c(2993): Failed to get folder perm timestamp.
[04/05/2018 11:32:18 AM] http-server.c(3082): Failed to find origin repo perm ts. Returning empty array. Request content is: [{“repo_id”:“9c9f5fc5-ca59-48a5-8498-f23515ed0990”,“token”:“cf8fcb89c509fa541180caf1968e6fbdef074381”,“ts”:0}]
[04/05/2018 11:32:23 AM] …/common/seaf-db.c(460): Error prepare statement SELECT r.repo_id, l.update_time FROM Repo r LEFT JOIN FileLockTimestamp l ON r.repo_id=l.repo_id WHERE r.repo_id IN (‘9c9f5fc5-ca59-48a5-8498-f23515ed0990’): mysql_stmt_prepare failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’.
[04/05/2018 11:32:23 AM] http-server.c(3245): Failed to get file lock timestamp.


#2

Problem solved.

I checked all db and tables and run seaf-fsck and now all errors gone.


#3

What do you mean by “checked all db and tables”? Checked in what way? This could be useful for others later on. -Thanks


#4

Simply via mysqlcheck --check and --repair


#5

OK, thanks very much.


#6

Just for reference, do you have any idea what caused the MySQL damage/problem/errors in the first place?

Are you running Pro or CE? What operating system?

-Thanks again