summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <toshio@fedoraproject.org>2014-11-25 08:06:15 -0800
committerToshio Kuratomi <toshio@fedoraproject.org>2014-11-25 08:06:15 -0800
commit9a77aefc338d15c5fe5c1407200cff7eeb8dfd16 (patch)
treedf4b11796ef10976042ce639bd02f9e05e53430a
parentd36c38c35e78ba49c3c56afe824d69d35c4bed18 (diff)
downloadansible-9a77aefc338d15c5fe5c1407200cff7eeb8dfd16.tar.gz
Special case the lone asterisk fragment in mysql
-rw-r--r--lib/ansible/module_utils/database.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/database.py b/lib/ansible/module_utils/database.py
index 50defb15d6..0dd1990d3e 100644
--- a/lib/ansible/module_utils/database.py
+++ b/lib/ansible/module_utils/database.py
@@ -117,4 +117,12 @@ def mysql_quote_identifier(identifier, id_type):
identifier_fragments = _identifier_parse(identifier, quote_char='`')
if len(identifier_fragments) > _MYSQL_IDENTIFIER_TO_DOT_LEVEL[id_type]:
raise SQLParseError('MySQL does not support %s with more than %i dots' % (id_type, _MYSQL_IDENTIFIER_TO_DOT_LEVEL[id_type]))
- return '.'.join(identifier_fragments)
+
+ special_cased_fragments = []
+ for fragment in identifier_fragments:
+ if fragment == '`*`':
+ special_cased_fragments.append('*')
+ else:
+ special_cased_fragments.append(fragment)
+
+ return '.'.join(special_cased_fragments)