Я получил очень странную ошибку при запросе из таблицы tbl_class.
COLLATION 'utf8_general_ci' недопустим для CHARACTER SET 'utf8mb4'
вот запрос
SELECT CONCAT(SUBSTRING_INDEX(ac.class_group_name, ';', 1), '/'),
ac.class_upper_class_id INTO return_path,
parent_id
FROM tbl_class AS ac
WHERE ac.class_id = category_id
and ac.class_org_group_code = org_group_code collate utf8_general_ci;
my.cnf похож на
[mysqld]
character-set-server=utf8
collaction-server=utf8_general_ci
show variables like '%character%'
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
, а параметры сортировки столбцов -
+------------------------+--------------+-----------------+------+-----+---------+-------+---------------------------------+-----------------------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+------------------------+--------------+-----------------+------+-----+---------+-------+---------------------------------+-----------------------+
| class_id | int(11) | NULL | NO | PRI | 0 | | select,insert,update,references | |
| class_kind | varchar(1) | utf8_general_ci | YES | | NULL | | select,insert,update,references | |
| class_upper_class_id | int(11) | NULL | YES | | NULL | | select,insert,update,references | |
| class_org_group_code | varchar(10) | utf8_general_ci | NO | PRI | | | select,insert,update,references | |
| class_group_code | varchar(50) | utf8_general_ci | YES | | NULL | | select,insert,update,references | |
, а набор символов таблицы -
KEY `tbl_class_idx2` (`class_org_group_code`,`class_upper_class_id`,`class_kind`,`class_order_no`),
KEY `tbl_class_idx3` (`class_org_group_code`,`class_group_code`),
KEY `tbl_class_idx4` (`class_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
I перезапущен mysql, но произошла та же ошибка. И нет вообще utf8mb4. почему?