-
Notifications
You must be signed in to change notification settings - Fork 1.1k
SQL 'Select/Explain' crashes because of redundant params substitution (fix provided) #383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The main issue is that the Form uses sql instead of raw_sql + everything which follows on that. The error I get is:
which is also a result of not interpolating quries properly. |
#417 should fix it. |
jezdez
added a commit
that referenced
this issue
Oct 18, 2013
Fixed #383 -- Feed the proper SQL to cursor.execute (the one with placeholders).
ryneeverett
pushed a commit
to ryneeverett/django-debug-toolbar
that referenced
this issue
Oct 2, 2016
…e one with placeholders).
ryneeverett
pushed a commit
to ryneeverett/django-debug-toolbar
that referenced
this issue
Oct 2, 2016
Fixed django-commons#383 -- Feed the proper SQL to cursor.execute (the one with placeholders).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I click on Select or Explain SQL panel I get following error:
After a bit of debugging I found that DebugToolbar is trying to substitute params to Select / Explain query - but this is wrong - parameters are already substituted because query is read from
form.cleaned_data
.Fix:
debug_toolbar/views.py
.params = form.cleaned_data['params']
withparams = ()
insql_select()
,sql_explain()
and probably even insql_profile()
(haven't tested)The text was updated successfully, but these errors were encountered: