Closed yml closed 1 year ago
@yml hey! great to see you on here 👋
This is pretty strange indeed, maybe some issue with how our sql formatting library is handling mysql/backticks.
Would you be able to check one thing for me: Open the raw trace in VSCode:
Then search for end_sql_query
and paste the value you see for query
:
Just trying to make sure that we're saving it properly in the first place, without the extra spaces.
@wilhelmklopp I have been here all along :-)
It looks like it is saved properly may be the vscode extension does not display it as it should.
{
"database": "mysql",
"frame_id": "frm_01H7Z351BYVECP8BP2VMXSC77C",
"return_timestamp": 1692186871.1696987,
"query_template": "SELECT `redirects_redirect`.`id`, `redirects_redirect`.`created`, `redirects_redirect`.`modified`, `redirects_redirect`.`old_path`, `redirects_redirect`.`new_path` FROM `redirects_redirect` WHERE `redirects_redirect`.`old_path` = %s LIMIT 21",
"query": "SELECT `redirects_redirect`.`id`, `redirects_redirect`.`created`, `redirects_redirect`.`modified`, `redirects_redirect`.`old_path`, `redirects_redirect`.`new_path` FROM `redirects_redirect` WHERE `redirects_redirect`.`old_path` = '/test' LIMIT 21 /**/",
"query_data": [],
"thread": "MainThread",
"thread_native_id": 248920,
"timestamp": 1692186871.1696987,
"type": "end_sql_query"
},
@yml I just releases a new version of the vscode extension which should fix this mysql formatting issue – let me know if it works 🤞
@wilhelmklopp thank you. The problem is solved.
I can now copy paste happily :-)
May be it is just me but every time I do I need to add a ;
at the end to run the query but this is another topic and may be more controversial.
May be it is just me but every time I do I need to add a ; at the end to run the query but this is another topic and may be more controversial.
Ah yeah that's kind of interesting – never quite noticed this 🤔
@LilyFoote do you know why the SQL we capture doesn't include the ;
? does django for some reason not need to send the ;
to execute the query?
Most of my use cases of the SQL Query made
tab for me involve copy a query and pasting it in a terminal directly or prefixed by EXPLAIN ANALIZE FORMAT=tree
kolo version: 2.9.0 db is mysql
I can't copy paste SQL queries captured by kolo:
The issue is caused by the space
` after and before the
. I a bit puzzled on why I have such behavior because else where in the ticket tracker I have seen query without space.