Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Incomplete
-
5.5.50
-
we are running MariaDB 5.5.50 on CentOS 7.2
Description
If you run optimize table on a table that does not exist you get the following message:
optimize table traders_test;
Table | Op | Msg_type | Msg_text |
tradegraph_db.traders_test | optimize | Error | Table 'tradegraph_db.traders_test' doesn't exist |
tradegraph_db.traders_test | optimize | status | Operation failed |
If you are running the sql_error_log plugin, you can see an error is generated:
ERROR 1146: Table 'tradegraph_db.traders_test' doesn't exist : optimize table traders_test
However, the optimize table command is written to the binary log which is counter intuitive. In the case of a replication slave, if the object doesn't exist on the slave, it does not pass the error back to the replication thread. So the replication thread thinks it was fine, when in fact the object did not exist. My assumption would be the thread should crash like other sql error would break replication no ignore the error and continue.