Fix use-after-free in sqlite queries
Fix use-after-free in sqlite queries

These std::string objects are temporary, of course we want to copy
their contents...

It worked for so long without issues, amazing.

xaizek/uncov,xaizek/uncov,xaizek/uncov,xaizek/uncov,xaizek/uncov