cleanup for #34

This commit is contained in:
Bernardo Damele
2012-07-09 12:39:43 +01:00
parent d08a54e375
commit 99c5ea54f7
3 changed files with 15 additions and 12 deletions

View File

@@ -820,15 +820,6 @@ class Agent:
def runAsDBMSUser(self, query):
if conf.dCred and "Ad Hoc Distributed Queries" not in query:
for sqlTitle, sqlStatements in SQL_STATEMENTS.items():
for sqlStatement in sqlStatements:
if query.lower().startswith(sqlStatement):
sqlType = sqlTitle
break
if sqlType and "SELECT" not in sqlType:
query = "SELECT %d;%s" % (randomInt(), query)
query = getSPQLSnippet(DBMS.MSSQL, "run_statement_as_user", USER=conf.dbmsUsername, PASSWORD=conf.dbmsPassword, STATEMENT=query.replace("'", "''"))
return query