fix prepared statement ERROR due to EMPTY_QUERY defined as static. Reported by: Naoya Anzai

backpatch to 9.3