The ALTER TABLE parsing didn't properly handle escaped values and it used the current database unconditionally.