mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 00:03:10 +00:00
Merge pull request #8419 from georgeOsdDev/escape_underscore_in_database_name
mysql_db module: Escape "_" in database name for "SHOW DATABASES" statement
This commit is contained in:
@@ -114,7 +114,7 @@ else:
|
||||
#
|
||||
|
||||
def db_exists(cursor, db):
|
||||
res = cursor.execute("SHOW DATABASES LIKE %s", (db,))
|
||||
res = cursor.execute("SHOW DATABASES LIKE %s", (db.replace("_","\_"),))
|
||||
return bool(res)
|
||||
|
||||
def db_delete(cursor, db):
|
||||
|
||||
Reference in New Issue
Block a user