Changeset 70e5ee7 in osmose-backend


Ignore:
Timestamp:
Dec 4, 2014 9:11:59 PM (5 years ago)
Author:
Jocelyn Jaubert <jocelyn.jaubert@…>
Branches:
master
Children:
1151586
Parents:
0ccb123
Message:

Don't run EXPLAIN if there is a ';' in the sql request

File:
1 edited

Legend:

Unmodified
Added
Removed
  • analysers/Analyser_Osmosis.py

    r0ccb123 r70e5ee7  
    129129        if self.explain_sql: 
    130130            self.logger.log(sql.strip()) 
    131         if self.explain_sql and (sql.strip().startswith("SELECT") or sql.strip().startswith("CREATE TABLE")): 
     131        if self.explain_sql and (sql.strip().startswith("SELECT") or sql.strip().startswith("CREATE TABLE")) and not ';' in sql[:-1]: 
    132132            sql_explain = "EXPLAIN " + sql.split(";")[0] 
    133133            self.giscurs.execute(sql_explain) 
Note: See TracChangeset for help on using the changeset viewer.