The db_remove() function from salt.modules.mysql mistakenly tests the name against "information_scheme" #54938
Labels
Bug
broken, incorrect, or confusing behavior
severity-low
4th level, cosemtic problems, work around exists
Milestone
Description of Issue
This is a pretty insignificant bug, but in the
salt.modules.mysql
module, there's a misspelling when checking to see if the provided database name is invalid.https://github.com/saltstack/salt/blob/master/salt/modules/mysql.py#L1184
When calling
db_remove()
, the function first checks if the named database exists and then checks the name against a tuple. One of these names, "information_scheme" is misspelled and should be "information_schema". Thus, this results in different semantics than from what the author intended.I'm pretty sure that you're not able to drop the "information_schema" table though, and it's pretty crazy to try as it's used for reflection. So it's a 1-byte fix.
Setup
This is in the
salt/modules/mysql.py
file from the master branch.Steps to Reproduce Issue
Probably call db.remove like:
Versions Report
This was just found while doing something else in the master branch.
The text was updated successfully, but these errors were encountered: