MySQL from python - dropping a database IF EXISTS

B

Ben

Can someone explain why this might be happening:

parser_beta.py:129: Warning: Can't drop database 'foobar'; database
doesn't exist
self.cursor.execute("DROP DATABASE IF EXISTS "+name)

But the whole point about the "IF EXISTS" bit is (I thought) that it
will only drop it if it exists, if it doesn't do nothing and don't
throw an error.

I'm using MySQL 5.024 and python 2.4.3

It still works, but the unneccesary error is annoying :) Any ideas?

Cheers,

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top