Before commit 1f987e7, there were issues upgrading my music database to
the latest format (because of duplicate keys, which are solved by using
REPLACE instead of INSERT).
This pointed out a severe memory leak in
xbmc/dbwrappers/mysqldataset.cpp, which is confirmed by valgrind.
This is an attempt to fix the leak, and should solve #12459.