{"action":"created","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/645","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/645/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/645/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/645/events","html_url":"https://github.com/sysown/proxysql/issues/645","id":170114605,"number":645,"title":"Is it possible to rewrite an 'INSERT DELAYED' query?","user":{"login":"sschueller","id":1180107,"avatar_url":"https://avatars.githubusercontent.com/u/1180107?v=3","gravatar_id":"","url":"https://api.github.com/users/sschueller","html_url":"https://github.com/sschueller","followers_url":"https://api.github.com/users/sschueller/followers","following_url":"https://api.github.com/users/sschueller/following{/other_user}","gists_url":"https://api.github.com/users/sschueller/gists{/gist_id}","starred_url":"https://api.github.com/users/sschueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sschueller/subscriptions","organizations_url":"https://api.github.com/users/sschueller/orgs","repos_url":"https://api.github.com/users/sschueller/repos","events_url":"https://api.github.com/users/sschueller/events{/privacy}","received_events_url":"https://api.github.com/users/sschueller/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-09T08:56:31Z","updated_at":"2016-08-09T09:04:54Z","closed_at":null,"body":"I am trying to rewrite an insert delayed query to just insert however it does not appear to work. My backend is InnoDB which does not support a delayed insert so I was hopping I could rewrite queries written for MyISAM to work with InnoDB.\r\n\r\nI get a hit but I still get `DELAYED option not supported for table`\r\n\r\nMy setup:\r\n\r\n```\r\nINSERT INTO mysql_query_rules (rule_id,active,match_pattern,replace_pattern,cache_ttl,apply) VALUES (10,1,'^INSERT DELAYED(.*)$','INSERT\\1',NULL,1);\r\n\r\nSELECT hits, mysql_query_rules.rule_id, match_digest, match_pattern, replace_pattern, cache_ttl, apply FROM mysql_query_rules NATURAL JOIN stats.stats_mysql_query_rules ORDER BY mysql_query_rules.rule_id;\r\n+------+---------+--------------+--------------------+-----------------+-----------+-------+\r\n| hits | rule_id | match_digest | match_pattern      | replace_pattern | cache_ttl | apply |\r\n+------+---------+--------------+--------------------+-----------------+-----------+-------+\r\n| 5    | 10      | NULL         | INSERT DELAYED(.*) | INSERT\\1        | NULL      | 1     |\r\n+------+---------+--------------+--------------------+-----------------+-----------+-------+\r\n```\r\n\r\nQuery\r\n```\r\ninsert delayed db.table (row) VALUES ('my value');\r\n```\r\n\r\nSetup:\r\nProxySQL version 1.2.1, codename Truls\r\nDebian 3.2.68-1+deb7u3 x86_64 GNU/Linux\r\nmysql  Ver 15.1 Distrib 5.5.45-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2\r\n"},"comment":{"url":"https://api.github.com/repos/sysown/proxysql/issues/comments/238495874","html_url":"https://github.com/sysown/proxysql/issues/645#issuecomment-238495874","issue_url":"https://api.github.com/repos/sysown/proxysql/issues/645","id":238495874,"user":{"login":"renecannao","id":3645227,"avatar_url":"https://avatars.githubusercontent.com/u/3645227?v=3","gravatar_id":"","url":"https://api.github.com/users/renecannao","html_url":"https://github.com/renecannao","followers_url":"https://api.github.com/users/renecannao/followers","following_url":"https://api.github.com/users/renecannao/following{/other_user}","gists_url":"https://api.github.com/users/renecannao/gists{/gist_id}","starred_url":"https://api.github.com/users/renecannao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renecannao/subscriptions","organizations_url":"https://api.github.com/users/renecannao/orgs","repos_url":"https://api.github.com/users/renecannao/repos","events_url":"https://api.github.com/users/renecannao/events{/privacy}","received_events_url":"https://api.github.com/users/renecannao/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T09:04:54Z","updated_at":"2016-08-09T09:04:54Z","body":"Hi Stefan,\r\n\r\n`match_pattern` is case _insensitive_ for query matching only, while it becomes case _sensitive_ for query rewrite.\r\nPlease either try with queries like:\r\n```\r\nINSERT DELAYED db.table (row) VALUES ('my value');\r\n```\r\nOr change the query rules as:\r\n```\r\nINSERT INTO mysql_query_rules (rule_id,active,match_pattern,replace_pattern,cache_ttl,apply) VALUES (10,1,'^insert delayed(.*)$','INSERT\\1',NULL,1);\r\n```\r\nThank you"}}
{"actor":{"display_login":"renecannao"}}