mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Escape "_" in database name for "SHOW DATABASES" statement
This commit is contained in:
parent
b9a5242f03
commit
972b06ee5d
1 changed files with 1 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue