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
Remove newlines from queries in execute_query() (Trac #2591) #2591
Comments
Milestone changed to |
Milestone changed to |
cash wrote on 41235121-10-30 (In [svn:8869]) Fixes #2591 removing newlines in queries - thanks to Tachyon |
trac user hellekin wrote on 41273249-01-18 Wow, wait a minute!
This "fix" should belong to a log filter, post execution of the SQL: you don't want free bloat, and MySQL will interpret the nicely written query. |
brettp wrote on 41275097-09-16
The removal is for both MySQL logs (which still show the \n) AND the debug log, so it needs to be done pre-execution. |
cash wrote on 41275111-05-04 Regarding execution speed, I did some profiling before accepting the patch and this does not add additional time to page creation (that can be measured). If we were doing a 1000 queries per page, it would add a few milliseconds. Replacing with a space is a valid point. It shouldn't be an issue because we always indent the lines of the query, but it wouldn't hurt. |
cash wrote on 41367955-04-14 (In [svn:9067]) Refs #2591 we were not logging inserts, updates, and deletes. Also logging was happening before formatting of the queries. All fixed in this commit. |
cash wrote on 41367964-08-18 Fixed the spaces issue also with [svn:9067]. Whether we do this only when logging or for all queries, we're talking about microseconds. I'm fine with only doing it for Elgg logging only since the only time I look at MySQL logs is for slow queries and it is easy to post process those logs. Don't know about other devs. I'm going to close this for now. We can also reopen if disagreement or something really odds happens and it does affect performance. |
cash wrote on 41862123-09-13 Fixes #4071 hellekin was right - it was a bad idea to format queries
|
Original ticket http://trac.elgg.org/ticket/2591 on 40821031-04-07 by brettp, assigned to unknown.
Elgg version: 1.7
Multiple line queries are nice for writing, but make grepping through logs painful.
The text was updated successfully, but these errors were encountered: