[sql lab] allow EXPlAIN queries (#5558)

* [sql lab] allow EXPlAIN queries

closes https://github.com/andialbrecht/sqlparse/issues/421

* typo
This commit is contained in:
Maxime Beauchemin
2018-08-03 15:33:33 -07:00
committed by GitHub
parent faf35b0daa
commit 9331cf79b5
4 changed files with 27 additions and 2 deletions

View File

@@ -130,7 +130,7 @@ def execute_sql(
superset_query = SupersetQuery(rendered_query)
executed_sql = superset_query.stripped()
SQL_MAX_ROWS = app.config.get('SQL_MAX_ROW')
if not superset_query.is_select() and not database.allow_dml:
if not superset_query.is_readonly() and not database.allow_dml:
return handle_error(
'Only `SELECT` statements are allowed against this database')
if query.select_as_cta: