This error was caused by mysql_backup (and mysql_optimize) by not catching the mysql result.
f you get Commands out of sync; you can't run this command now in your client code, you are calling client functions in the wrong order.
This can happen, for example, if you are using mysql_use_result() and try to execute a new query before you have called mysql_free_result(). It can also happen if you try to execute two queries that return data without calling mysql_use_result() or mysql_store_result() in between.
Its fixed in current git. I also added a "mysql_optimize_event" module, that installs an mysql event on modload to automatically execute "OPTIMIZE TABLE" each midnight. This event is triggered and executed directly on the mysql server.
How many people use mysql_backup? Should we make a mysql_backup_event module for it, too?
(Could be a bit more complicated than the OPTIMIZE TABLE event, but should be doable)
The "BACKUP TABLE" command is deprecated and removed in MySQL 5.5 ( see
http://dev.mysql.com/doc/refman/5.1/en/backup-table.html ) , so our mysql_backup module will only work with mysql versions before 5.5. Many newer distributions already use 5.5+, so I think we probably could burn this module with fire.