-
Notifications
You must be signed in to change notification settings - Fork 202
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
[dev.icinga.com #13951] MySQL Warnings due to OR operator instead of CONCAT function #703
Comments
Updated by leeclemens on 2017-01-11 20:21:08 +00:00
Note: I did NOT test PostgreSQL, but CONCAT is a PostgreSQL function with the same syntax. |
Updated by tgelf on 2017-01-11 20:23:42 +00:00
Guess you're running into this ProxySQL bug: Icinga Web 2 uses a pretty strict sql_mode for it's connections to MySQL (and it's variants). The string it uses is:
Your proxy needs to pass this to your database, you'd face a lot of other problems too in case it doesn't. There is nothing we could do to help you here, however it seems that ProxySQL fixed this bug a month ago: Alternatively you could try to somehow configure this as a default, not sure whether that would work out for your environment. Cheers, |
Updated by leeclemens on 2017-01-11 20:29:55 +00:00 In case it's useful, the resultant query which causes warnings:
|
Updated by leeclemens on 2017-01-11 20:36:00 +00:00 Thank you for that bug reference, that does seem to be related and could cause other issues. I'm curious why the decision to rely on PIPES_AS_CONCAT being set as opposed to using the CONCAT function explicitly? |
Updated by tgelf on 2017-01-11 20:44:57 +00:00 leeclemens wrote:
Pipes are ANSI SQL, CONCAT isn't. There is nothing wrong with CONCAT in MySQL. Just, PostgreSQL has no CONCAT, Oracle has it, but it behaves differently. PIPES_AS_CONCAT allows us to do string concatenation the same way for multiple databases. This is just a matter of personal preference, nothing more. And as soon as it goes to GROUP_CONCAT or similar we have to ship different queries anyways. |
Updated by leeclemens on 2017-01-11 20:58:50 +00:00 PostgreSQL 9.1 docs show it having CONCAT. But I'm inclined to agree with the ANSI rationale regardless, always appreciate the response/explanation! |
Updated by tgelf on 2017-01-11 21:09:49 +00:00 leeclemens wrote:
Honestly, I didn't know that, thanks for the hint!
You're welcome! |
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13951
Created by leeclemens on 2017-01-11 20:09:42 +00:00
Assignee: (none)
Status: Closed (closed on 2017-01-11 20:23:42 +00:00)
Target Version: (none)
Last Update: 2017-01-11 21:09:49 +00:00 (in Redmine)
I ran into this issue when using ProxySQL between Icinga2 and my database servers (MariaDB 10.1).
When I ran the query directly, it caused a lot of warnings (below). By using the CONCAT function instead of the OR operator (||), these warnings do no appear and the expected text is displayed on the Activity Log screen.
I'm looking into other areas affected by this, but the only place in Director seems to be the Activity Log screen (IDO is also affected).
Attachments
The text was updated successfully, but these errors were encountered: