When returning gates, I get:
SQL/DB Error -- [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(gates_avail + 1)) WHERE identifier = 'CPH'' at line 1]
As I recall it, the available gates at the airport are not ADDED but DEDUCTED as a result. I have produced a "minus gates" at CDG by returning gates. (Sure, I do not know if somebody else caused it at the same time, but I guess it could have been me).
You could check that on a clean server where only you have access to.