The used `query->handle` is always `NULL` at this point.
Change the code to use `handle` instead.
(cherry picked from commit 5b2b3e589c)
The used `query->handle` is always `NULL` at this point.
Change the code to use `handle` instead.
(cherry picked from commit 5b2b3e589c)