Use of the Update And Run SQL button causes koha to append the report ID to the end of the query. It's commented out, so it doesn't break the query, but it's adding useless characters. To recreate: - save and run this report: SELECT id, savedsql FROM saved_sql WHERE savedsql like "%saved_sql.id: %" - see your report returns itself - click Edit - click Update and Run SQL without changing anything in your report - click Update and Run SQL again - look at your report results, notice that the saved query is now repeating "/* saved_sql.id: 1334 */" at the end
I think that was an intentional addition - so we need to dig back on why it as added in the first place. If I remember correctly it might have been to be able to see in the server logs which reports a problematic query might belong to. Adding Kyle - maybe he knows.
(In reply to Katrin Fischer from comment #1) > I think that was an intentional addition - so we need to dig back on why it > as added in the first place. If I remember correctly it might have been to > be able to see in the server logs which reports a problematic query might > belong to. > Adding Kyle - maybe he knows. I've got no quarrel with displaying that little note of the query ID as part of the report results. However this bug is for the fact that the string "/* saved_sql.id: XXX*/" is being actually saved as part of the query and gets repeated the more one used the Update and Run button. After clicking Update and Run 7 times, my original query has become: SELECT id, savedsql FROM saved_sql WHERE savedsql like "%saved_sql.id: %" /* saved_sql.id: 1336 */ /* saved_sql.id: 1336 */ /* saved_sql.id: 1336 */ /* saved_sql.id: 1336 */ /* saved_sql.id: 1336 */ /* saved_sql.id: 1336 */
Ok, I bet THAT was not intentional!
I noticed that when fixing bug_37763, the saved_sql.id repeating issue corrected itself.
*** This bug has been marked as a duplicate of bug 37763 ***