{"id":2933,"date":"2014-05-04T10:58:46","date_gmt":"2014-05-04T15:58:46","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/?p=2933"},"modified":"2014-05-05T22:31:55","modified_gmt":"2014-05-06T03:31:55","slug":"per-query-variable-settings-in-mysqlpercona-serverwebscalesql","status":"publish","type":"post","link":"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql","title":{"rendered":"Per query variable settings in MySQL\/Percona Server\/WebScaleSQL"},"content":{"rendered":"<p>Recently there was a discussion on the <a href=\"https:\/\/groups.google.com\/forum\/#!topic\/webscalesql\">webscalesql mailing list<\/a>\u00a0started by Chip Turner on a <a href=\"https:\/\/groups.google.com\/forum\/#!topic\/webscalesql\/r1Zwnhvi72I\">proposed change to the MAX_STATEMENT_TIME patch<\/a>. This feature has been known as <a href=\"http:\/\/dev.mysql.com\/worklog\/task\/?id=681\">per query variable settings (WL#681)<\/a>\u00a0and even shipping in Percona Server 5.6 as <a href=\"http:\/\/www.percona.com\/doc\/percona-server\/5.6\/flexibility\/per_query_variable_statement.html\">per-query variable statement<\/a>.<\/p>\n<p>This feature has piqued my interest since 2009, when the MySQL project (then owned by Sun Microsystems) <a href=\"http:\/\/www.bytebot.net\/blog\/archives\/2009\/07\/13\/google-summer-of-code-in-the-mid-term\">participated<\/a> in Google Summer of Code 2009, and we got code from Joseph Lukas to do just that (see his tree on Launchpad &#8211;\u00a0<a href=\"https:\/\/code.launchpad.net\/~jlukas79\/+junk\/mysql-server\">lp:~jlukas79\/+junk\/mysql-server<\/a>).<\/p>\n<p>So code has been floating around since 2009. It never made it into a shipping release of any MySQL-based distribution till 24 October 2013 when <a href=\"http:\/\/www.percona.com\/doc\/percona-server\/5.6\/release-notes\/Percona-Server-5.6.14-62.0.html#5.6.14-62.0\">Percona Server 5.6.14-62.0<\/a> was released. Percona\u2019s syntax implementation was as suggested in <a href=\"http:\/\/dev.mysql.com\/worklog\/task\/?id=681\">WL#681<\/a>. This got me curious as to if a feature is already shipping in a distribution of MySQL, what is the WebScaleSQL answer to things &#8211; is there a look at other branches or is compatibility from a user\/DBA perspective only with focus on upstream?<\/p>\n<p>I got my <a href=\"https:\/\/groups.google.com\/d\/msg\/webscalesql\/r1Zwnhvi72I\/pjX_XZkHPDAJ\">answer<\/a> from Steaphan Greene. Very sensible, and a great direction to see how the companies involved can influence upstream MySQL and quite obviously the downstream distributions. It is of course great to note that this syntax improvement will probably be in MySQL 5.7.5 DMR (it already is in 5.7.4 DMR).<\/p>\n<p>For what it\u2019s worth, this feature works well alongside server-side\u00a0<a href=\"http:\/\/www.percona.com\/doc\/percona-server\/5.6\/management\/statement_timeout.html\">statement timeouts<\/a>, which Percona Server 5.6 implements (as an alpha quality feature) via the Twitter <a href=\"https:\/\/github.com\/twitter\/mysql\/wiki\/Statement-Timeout\">patch<\/a> of Davi Arnaut. The MySQL team at Oracle has of course been listening, and in MySQL 5.7.4 DMR (<a href=\"https:\/\/dev.mysql.com\/doc\/relnotes\/mysql\/5.7\/en\/news-5-7-4.html\">release notes<\/a>) they too have <a href=\"http:\/\/mysqlserverteam.com\/server-side-select-statement-timeouts\/\">implemented this feature<\/a>\u00a0(<a href=\"http:\/\/dev.mysql.com\/worklog\/task\/?id=6936\">WL#6936<\/a>). Kudos!<\/p>\n<p><strong>Update (6 May 2014)<\/strong>: Morgan Tocker has opened up <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=72540\">mysql#72540<\/a>.<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"mailto:?subject=%5BShared%20Post%5D%20Per%20query%20variable%20settings%20in%20MySQL%2FPercona%20Server%2FWebScaleSQL&body=http%3A%2F%2Fwww.bytebot.net%2Fblog%2Farchives%2F2014%2F05%2F04%2Fper-query-variable-settings-in-mysqlpercona-serverwebscalesql&share=email\" target=\"_blank\" title=\"Click to email a link to a friend\" data-email-share-error-title=\"Do you have email set up?\" data-email-share-error-text=\"If you&#039;re having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself.\" data-email-share-nonce=\"ded0ed1ea1\" data-email-share-track-url=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=email\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-2933\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-2933\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-2933\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Recently there was a discussion on the webscalesql mailing list\u00a0started by Chip Turner on a proposed change to the MAX_STATEMENT_TIME patch. This feature has been known as per query variable settings (WL#681)\u00a0and even shipping in Percona Server 5.6 as per-query variable statement. This feature has piqued my interest since 2009, when the MySQL project (then [&hellip;]<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon-text sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-email\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-email sd-button share-icon\" href=\"mailto:?subject=%5BShared%20Post%5D%20Per%20query%20variable%20settings%20in%20MySQL%2FPercona%20Server%2FWebScaleSQL&body=http%3A%2F%2Fwww.bytebot.net%2Fblog%2Farchives%2F2014%2F05%2F04%2Fper-query-variable-settings-in-mysqlpercona-serverwebscalesql&share=email\" target=\"_blank\" title=\"Click to email a link to a friend\" data-email-share-error-title=\"Do you have email set up?\" data-email-share-error-text=\"If you&#039;re having problems sharing via email, you might not have email set up for your browser. You may need to create a new email yourself.\" data-email-share-nonce=\"ded0ed1ea1\" data-email-share-track-url=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=email\"><span>Email<\/span><\/a><\/li><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-2933\" class=\"share-facebook sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span>Facebook<\/span><\/a><\/li><li class=\"share-linkedin\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-linkedin-2933\" class=\"share-linkedin sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=linkedin\" target=\"_blank\" title=\"Click to share on LinkedIn\" ><span>LinkedIn<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-2933\" class=\"share-twitter sd-button share-icon\" href=\"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/04\/per-query-variable-settings-in-mysqlpercona-serverwebscalesql?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span>Twitter<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_options":[]},"categories":[23],"tags":[149,1775,1552,1376,151,1662],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4vJD-Lj","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":3199,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2016\/04\/08\/tweet-summary-of-percona-live-2015","url_meta":{"origin":2933,"position":0},"title":"(tweet) Summary of Percona Live 2015","date":"8\/4\/2016","format":false,"excerpt":"The problem with Twitter is that we talk about something and before you know it, people forget. (e.g. does WebScaleSQL have an async client library?) How many blog posts are there about Percona Live Santa Clara 2015? This time (2016), I'm going to endeavour to write more than to just\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2922,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2014\/05\/02\/mysql-related-irc-discussion-channels","url_meta":{"origin":2933,"position":1},"title":"MySQL related IRC discussion channels","date":"2\/5\/2014","format":false,"excerpt":"There are many MySQL related IRC discussion channels as the ecosystem itself grows. I join the following. Are there any that I\u2019m missing? Freenode (irc.freenode.net): #mysql - main channel for all kinds of end user MySQL related discussions (the noisiest of the lot, naturally) #maria - main channel for all\u2026","rel":"","context":"In &quot;MariaDB&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3156,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2016\/01\/12\/scale14x-lots-of-mysql-content-there","url_meta":{"origin":2933,"position":2},"title":"SCALE14x &#8211; lots of MySQL content there","date":"12\/1\/2016","format":false,"excerpt":"One of my favourite events run by a grassroots organisation is SCALE, and they are now doing their 14th edition, SCALE14x. If you\u2019re into opensource software as well as all things open, this is the place to be from January 21-24 2016. It is at a new location in Pasadena\u2026","rel":"","context":"In &quot;MariaDB&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2900,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2014\/04\/11\/korean-mysql-power-user-group","url_meta":{"origin":2933,"position":3},"title":"Korean MySQL Power User Group","date":"11\/4\/2014","format":false,"excerpt":"If you are a MySQL power user in Korea, its well worth joining the Korean MySQL Power User Group. This is a group led by senior DBAs at many Korean companies. From what I gather, there is experience there using MySQL, MariaDB, Percona Server and Galera Cluster (many on various\u2026","rel":"","context":"In &quot;MariaDB&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2298,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2012\/02\/05\/managing-mysql-with-percona-toolkit-by-frederic-descamps","url_meta":{"origin":2933,"position":4},"title":"Managing MySQL with Percona Toolkit by Fr\u00c3\u00a9d\u00c3\u00a9ric Descamps","date":"5\/2\/2012","format":false,"excerpt":"Fr\u00e9d\u00e9ric Descamps of Percona. Percona Toolkit is Maatkit & Aspersa combined. Opensource and the tools are very useful for a DBA. You need Perl, DBI, DBD::mysql, Term::ReadKey. Most tools are written in Perl, and whatever is in Bash is being re-written in Perl. There is also a tarball or RPM\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2366,"url":"http:\/\/www.bytebot.net\/blog\/archives\/2012\/04\/10\/twitter-facebook-mysql-trees-online-pushing-mysql-forward","url_meta":{"origin":2933,"position":5},"title":"Twitter, Facebook MySQL trees online &#8211; pushing MySQL forward","date":"10\/4\/2012","format":false,"excerpt":"Just yesterday, I'm sure many saw Twitter opensourcing their MySQL implementation. It is based on MySQL 5.5 and the code is on Github. For reference, the database team at Facebook has always been actively blogging, and keeping up their code available on Launchpad. Its worth noting that the implementation there\u2026","rel":"","context":"In &quot;MySQL&quot;","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"amp_enabled":true,"_links":{"self":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/2933"}],"collection":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=2933"}],"version-history":[{"count":2,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/2933\/revisions"}],"predecessor-version":[{"id":2935,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/2933\/revisions\/2935"}],"wp:attachment":[{"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=2933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=2933"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=2933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}