Revise DROP USER/ROLE commands with more specific version numbers to constrain IF EXISTS usage.

This commit is contained in:
MattMontgomeryKochava 2022-02-14 14:10:15 -06:00
commit a268f5d28a
3 changed files with 3 additions and 3 deletions

View file

@ -338,7 +338,7 @@ def db_delete(cursor, db):
if not db:
return False
for each_db in db:
query = "DROP DATABASE %s" % mysql_quote_identifier(each_db, 'database')
query = "DROP DATABASE /*!50700 IF EXISTS */ /*M!100100 IF EXISTS */ %s" % mysql_quote_identifier(each_db, 'database')
executed_commands.append(query)
cursor.execute(query)
return True