diff --git a/datasette/views/base.py b/datasette/views/base.py index 67aa3a42..6b01fdd2 100644 --- a/datasette/views/base.py +++ b/datasette/views/base.py @@ -378,7 +378,11 @@ class DataView(BaseView):
SQL query took too long. The time limit is controlled by the sql_time_limit_ms configuration option.
-{}
+
+
""".format(
escape(ex.sql)
)
diff --git a/tests/test_api.py b/tests/test_api.py
index ebd675b9..de0223e2 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -662,7 +662,11 @@ def test_sql_time_limit(app_client_shorter_time_limit):
"SQL query took too long. The time limit is controlled by the\n" 'sql_time_limit_ms\n' "configuration option.
\n" - "select sleep(0.5)" + '\n' + "" ), "status": 400, "title": "SQL Interrupted", diff --git a/tests/test_html.py b/tests/test_html.py index 4b394199..7cfe9d90 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -172,7 +172,7 @@ def test_sql_time_limit(app_client_shorter_time_limit): """ sql_time_limit_ms """.strip(), - "
select sleep(0.5)", + '', ] for expected_html_fragment in expected_html_fragments: assert expected_html_fragment in response.text