Earl Miles wrote:
Hmm. In the instance I was toying with, the db already existed from a
previous run, and I was using the default user, who didn't have
permission with the database, so that's exactly what was happening in my
runs of resetdb.
I think you need to debug that more closely. If the first select_db()
fails, it will try to create_db, which _doesn't throw exceptions_ when
it fails. It just returns true (!) so the program ends.
For your patch to have any value, you'd have to create the database
(again? how?) and then fail to select the database you just created.