[Bug 41125] New: SQL reports should allow to SET variable
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 Bug ID: 41125 Summary: SQL reports should allow to SET variable Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: mathsabypro@gmail.com QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com It should be nice to have the ability to define a variable with the SET operator -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Why might you want to do this? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 --- Comment #2 from Mathieu Saby <mathsabypro@gmail.com> --- Not personally ;-) But if there's positive feedback on the idea, my library might be able to sponsor it. I don't really understand the technical challenges or the potential risks. What do you think of it? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- I don't see any benefits to it. Risks... it wouldn't be configurable from the web end as it could have server-side consequences. Maybe configurable from the backend... but then again I still don't know what possible use case would need it? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cbrannon@cdalibrary.org, | |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 --- Comment #4 from Christopher Brannon <cbrannon@cdalibrary.org> --- I have used variables many times in past reports, but doing it without the SET command makes it more difficult. When we added the ability to call the exact same parameter multiple times, this was a reasonable workaround, but really bloats the code. Instead of having a SET command, if maybe we had some options in the report setup to define some variables that could be "SET" when run, that could be helpful, and limit the use of the SET command. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Christopher Brannon from comment #4)
I have used variables many times in past reports, but doing it without the SET command makes it more difficult. When we added the ability to call the exact same parameter multiple times, this was a reasonable workaround, but really bloats the code.
Instead of having a SET command, if maybe we had some options in the report setup to define some variables that could be "SET" when run, that could be helpful, and limit the use of the SET command.
So these don't work the way people think they do. "Note: The @VARIABLE:= syntax is a feature of MySQL/MariaDB databases separate from Koha. These are database session variables which can act differently than intended if not used very carefully." https://wiki.koha-community.org/wiki/SQL_Reports_Library#Runtime_Variables Likewise SET can affect the operation of the server or the client. It can be user-defined variables but it can also be a whole lot of other things which a Koha user should never ever be allowed to touch. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41125 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- The key thing to remember is that these are scoped to the whole "session". That's not the same thing as an individual SQL report SELECT query. It's the whole life of the database connection, and that connection gets re-used across multiple HTTP requests. It's really easy for report runs to contaminate each other. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org