I have been figuring out mysqlbinlog restore issue for some days and I have found that it is caused by some uncomplete SQL statements which are containing $ character.
Following SQL statements are logged into the general log and also appear in the binary logs:
delete from build_type$
insert into build_type$ values ('bt3')
delete from vcs_root_instance$
Why these statements passthrough (contatining $ symbol). Database is containing tables without $ symbol - build_type, vcs_root_instance?
desc build_type;
+-------------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+-------------+------+-----+---------+-------+
| int_id | varchar(80) | NO | PRI | NULL | |
| config_id | varchar(80) | NO | UNI | NULL | |
| origin_project_id | varchar(80) | YES | | NULL | |
| delete_time | bigint(20) | YES | | NULL | |
+-------------------+-------------+------+-----+---------+-------+
MariaDB version: 10.2.23
Use backtics around database, table, and column names if they contain most special characters, including
$
. (Underscore is OK.) Example:Better yet, don't use
$
.