{"action":"created","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/1279","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/1279/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/1279/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/1279/events","html_url":"https://github.com/sysown/proxysql/issues/1279","id":280935009,"number":1279,"title":"Icinga2 -> ProxySQL -> MariaDB/Galera: MySQL_Session.cpp:3689 [ERROR] Unable to parse query","user":{"login":"xenuser","id":2216868,"avatar_url":"https://avatars0.githubusercontent.com/u/2216868?v=4","gravatar_id":"","url":"https://api.github.com/users/xenuser","html_url":"https://github.com/xenuser","followers_url":"https://api.github.com/users/xenuser/followers","following_url":"https://api.github.com/users/xenuser/following{/other_user}","gists_url":"https://api.github.com/users/xenuser/gists{/gist_id}","starred_url":"https://api.github.com/users/xenuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenuser/subscriptions","organizations_url":"https://api.github.com/users/xenuser/orgs","repos_url":"https://api.github.com/users/xenuser/repos","events_url":"https://api.github.com/users/xenuser/events{/privacy}","received_events_url":"https://api.github.com/users/xenuser/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-11T08:41:37Z","updated_at":"2017-12-13T11:10:06Z","closed_at":null,"author_association":"NONE","body":"**Short issue description**\r\n\r\nProxySQL throws an error on some of the connections coming from a specific DB client. As a consequence, some DB connections are not established.\r\n\r\n**Setup description**\r\n\r\nI configured the following setup:\r\n\r\nHost A: Icinga 2.7.2, ProxySQL 1.4.4 (SLES 12 SP2)\r\nHosts B, C, D: MariaDB 10.2.9 + Galera (RHEL 7.3)\r\n\r\nIcinga2 is connecting to localhost:6033 (ProxySQL) which then balances/forwards queries to Hosts B, C D.\r\n\r\n\r\n**Long issue description**\r\n\r\nWhen switching from \"Icinga2 goes directly to MariaDB on Host B\" to \"Icinga2 connects to ProxySQL on localhost instead\", some of the connections seem to be not established.\r\n\r\nLooking at journalctl -f, I see many entries with the following error:\r\n\r\n~~~\r\n\r\nDec 10 16:10:20 HOSTA proxysql[3468]: 2017-12-10 16:10:20 MySQL_Session.cpp:3689:handler___status_WAITING_CLIENT_DATA___STATE_SLEEP___MYSQL_COM_QUERY_qpo(): [ERROR] Unable to parse query. If correct, report it as a bug: SET SESSION SQL_MODE='STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,ANSI_QUOTES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,ANSI_QUOTES,PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION', NAMES utf8;\r\n\r\n~~~\r\n\r\nWhen running Icinga2 against ProxySQL, only some of the DB connections reach the three MariaDB/Galera nodes. As a consequence, Icinga2 starts spooling actions which should be runned against a DB. And, in addition, Icinga2 is not working as expected.\r\n\r\n**Workaround I tried**\r\n\r\nA co-worker of mine discovered the config variable \"mysql-query_digests\" which could affect the observed behavior. Our hope was that ProxySQL would stop parsing queries and act as a stupid proxy only until a solution could be found. After activating this setting with...\r\n\r\n\r\n~~~\r\n\r\nset mysql-query_digests = \"FALSE\";\r\nsave mysql variables to disk;\r\nload mysql variables to runtime;\r\n\r\n~~~~\r\n\r\n... the errors were gone. However, still only few SQL queries went through.\r\n\r\n\r\n**Expected behavior**\r\n\r\nProxySQL does not throw an error and makes sure all connections/queries will be handled successfully.\r\n\r\n**Questions**\r\n\r\n(a)\r\nIn your eyes, is the query I posted above incorrect or is this behavior related to an existing GitHub issue regarding that ProxySQL appends a \";\" or something like that?\r\n\r\n\r\n(b) Is there something I can do to workaround on this problem so I can continue using ProxySQL?\r\n\r\n(c) Can you please explain what mysql-query_digests does and how deactivating this setting changes the behavior of ProxySQL?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sysown/proxysql/issues/comments/351360084","html_url":"https://github.com/sysown/proxysql/issues/1279#issuecomment-351360084","issue_url":"https://api.github.com/repos/sysown/proxysql/issues/1279","id":351360084,"user":{"login":"xenuser","id":2216868,"avatar_url":"https://avatars0.githubusercontent.com/u/2216868?v=4","gravatar_id":"","url":"https://api.github.com/users/xenuser","html_url":"https://github.com/xenuser","followers_url":"https://api.github.com/users/xenuser/followers","following_url":"https://api.github.com/users/xenuser/following{/other_user}","gists_url":"https://api.github.com/users/xenuser/gists{/gist_id}","starred_url":"https://api.github.com/users/xenuser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenuser/subscriptions","organizations_url":"https://api.github.com/users/xenuser/orgs","repos_url":"https://api.github.com/users/xenuser/repos","events_url":"https://api.github.com/users/xenuser/events{/privacy}","received_events_url":"https://api.github.com/users/xenuser/received_events","type":"User","site_admin":false},"created_at":"2017-12-13T11:10:06Z","updated_at":"2017-12-13T11:10:06Z","author_association":"NONE","body":"Wow, great!! Thanks a lot."}}
{"actor":{"display_login":"xenuser"}}