-
-
Notifications
You must be signed in to change notification settings - Fork 427
Closed
Labels
Milestone
Description
When running audit_database.php under mariadb 10.3.17 found below error

Reproduce steps:
- Prepare two env, mariadb 5.5 and mariadb 10.3.17 with both collation_server = utf8mb4_unicode_ci set in my.cnf
- create a table in cacti DB
[root@lsf1x200 ~]# mysql cacti -e "desc disku_groups;"
+-----------+------------------+------+-----+---------------------+-------------------------------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------------------+-------------------------------+
| domain | varchar(20) | NO | PRI | | |
| name | varchar(64) | NO | PRI | | |
| groupid | int(10) unsigned | NO | PRI | 0 | |
| firstSeen | timestamp | NO | | 0000-00-00 00:00:00 | |
| lastSeen | timestamp | NO | | current_timestamp() | on update current_timestamp() |
+-----------+------------------+------+-----+---------------------+-------------------------------+ - Check audit_schema.sql
INSERT INTOtable_columnsVALUES ('disku_groups',5,'lastSeen','timestamp','NO','','CURRENT_TIMESTAMP','on update CURRENT_TIMESTAMP'); - Run audit_database.php under mariadb 5.5 env, no error exist
- Run audit_database.php under mariadb 10 env, error exist as show in screenshot.
- Run mysql cacti -e "show table status" to check table collection value, on mariadb 5.5, collection value for this table is utf8mb4_unicode_ci, but on mariadb 10, collection value for this table is utf8mb4_general_ci.
- The audit_database.php does not deal with utf8mb4_general_ci to cause this error