{"id":4035,"date":"2016-02-26T10:46:31","date_gmt":"2016-02-26T00:46:31","guid":{"rendered":"https:\/\/www.flamingspork.com\/blog\/?p=4035"},"modified":"2016-02-26T10:46:31","modified_gmt":"2016-02-26T00:46:31","slug":"mysql-contributions-status","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2016\/02\/26\/mysql-contributions-status\/","title":{"rendered":"MySQL Contributions status"},"content":{"rendered":"<p>This post is an update to the status of various MySQL bugs (some with patches) that I&#8217;ve filed over the past couple of years (or that people around me have). I&#8217;m not looking at POWER specific ones, as there are these too, but each of these bugs here deal with general correctness of the code base.<\/p>\n<p>Firstly, let&#8217;s look at some points I&#8217;ve raised:<\/p>\n<ul>\n<li>Incorrect locking for global_query_id (bug <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=72544\">#72544<\/a>)<br \/>\nRaised on <a href=\"http:\/\/lists.mysql.com\/internals\/38789\">May 5th, 2014 on the internals list<\/a>. As of today, no action (apart from Dimitri verifying the bug back in May 2014). There continues to be locking that perhaps only works by accident around query IDs.Soon, this bug will be <strong>two years old.<\/strong><\/li>\n<li>Endian code based on CPU type rather than endian define (bug <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=72715\">#72715<\/a>)<br \/>\nAbout <strong>six-hundred and fifty<\/strong> days ago I filed this bug &#8211; back in May 2014, which probably has a relatively trivial fix of using the correct #ifdef of BIG_ENDIAN\/LITTLE_ENDIAN rather than doing specific behavior based on #ifdef __i386__<br \/>\nWhat&#8217;s worse is that this looks like somebody being clever for a compiler in the 1990s, which unlikely ends up with the most optimal code today.<\/li>\n<li>mysql-test-run.pl &#8211;valgrind-all does not run all binaries under valgrind (bug <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=74830\">#74830<\/a>)<br \/>\nYeah, this should be a trivial fix, but nothing has happened since <strong>November 2014<\/strong>.<br \/>\nI&#8217;m unlikely to go provide a patch simply because it seems to take <strong>sooooo damn long to get anything merged.<\/strong><\/li>\n<li>MySQL 5.1 doesn&#8217;t build with Bison 3.0 (bug #<a href=\"http:\/\/bugs.mysql.com\/bug.php?id=77529\">77529<\/a>)<br \/>\nProbably of little consequence, unless you&#8217;re trying to build MySQL 5.1 on a linux distro released in the last couple of years. Fixed in Maria for a long time now.<\/li>\n<\/ul>\n<p>Trivial patches:<\/p>\n<ul>\n<li>Incorrect function name in DBUG_ENTER (bug <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=78133\">#78133<\/a>)<br \/>\nPull request number 25 on github &#8211; a <strong>trivial<\/strong> patch that is obviously correct, simply correcting some debug only string.<br \/>\nSo far, <strong>over 191 days with no action<\/strong>. If you can&#8217;t get trivial and obvious patches merged in about 2\/3rds of a year, you&#8217;re not going to grow contributions. Nearly everybody coming to a project starts out with trivial patches, and if a long time contributor who will complain loudly on the internet (like I am here) if his trivial patches aren&#8217;t merged can&#8217;t get it in, what chance on earth does a newcomer have?<br \/>\nIn case you&#8217;re wondering, this is the patch:<\/p>\n<pre>--- a\/sql\/rpl_rli_pdb.cc\r\n+++ b\/sql\/rpl_rli_pdb.cc\r\n@@ -470,7 +470,7 @@ bool Slave_worker::read_info(Rpl_info_handler *from)\r\n \r\n bool Slave_worker::write_info(Rpl_info_handler *to)\r\n {\r\n-  DBUG_ENTER(\"Master_info::write_info\");\r\n+  DBUG_ENTER(\"Slave_worker::write_info\");<\/pre>\n<\/li>\n<li>InnoDB table flags in bitfield is non-optimal (bug #<a href=\"http:\/\/bugs.mysql.com\/bug.php?id=74831\">74831<\/a>)<br \/>\nWith a patch since I filed this back in <strong>November 2014<\/strong>, it&#8217;s managed to sit idle long enough for GCC 4.8 to practically disappear from anywhere I care about, and 4.9 makes better optimization decisions. There are other reasons why C bitfields are an awful idea too.<\/li>\n<\/ul>\n<p>Actually complex issues:<\/p>\n<ul>\n<li>InnoDB mutex spin loop is missing GCC barrier (bug <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=72755\">#72755<\/a>)<br \/>\nAgain, another bug filed back in <strong>May 2014<\/strong>, where InnoDB is doing a rather weird trick to attempt to get the compiler to not optimize away a spinloop. There&#8217;s a known good way of doing this, it&#8217;s called a compiler barrier. I&#8217;ve had a patch for nearly two years, not merged :(<\/li>\n<li>buf_block_align relies on random timeouts, volatile rather than memory barriers (bug <a href=\"http:\/\/bugs.mysql.com\/bug.php?id=74775\">#74775<\/a>)<br \/>\nThis bug was first filed in <strong>November 2014<\/strong> and deals with a couple of incorrect assumptions about memory ordering and what volatile means.<br \/>\nWhile this may only exhibit a problem on ARM and POWER processors (as well as any other relaxed memory ordering architectures, x86 is the notable exception), it&#8217;s clearly incorrect and very non-portable.<br \/>\nDon&#8217;t expect MySQL 5.7 to work properly on ARM (or POWER). Try this:<\/p>\n<pre class=\"note\">.\/mysql-test-run.pl rpl.rpl_checksum_cache --repeat=10<\/pre>\n<p>You&#8217;ll likely find MySQL &gt; 5.7.5 still explodes.<br \/>\nIn fact, there&#8217;s also <a href=\"https:\/\/bugs.mysql.com\/bug.php?id=79378\">Bug #79378 <\/a>which Alexey Kopytov filed <strong>with patch<\/strong> that&#8217;s been <strong>sitting idle since November 2015<\/strong> which is likely related to this bug.<\/li>\n<\/ul>\n<p>Not covered here: universal CRC32 hardware acceleration (rather than just for innodb data pages) and other locking issues (some only recently discovered). I also didn&#8217;t go into anything filed in December 2015&#8230; although in any other project I&#8217;d expect something filed in December 2015 to have been looked at by now.<\/p>\n<p>Like it or not, MySQL is still upstream for all the MySQL derivatives active today. Maybe this will change as RocksDB and TokuDB gain users and if WebScaleSQL, MariaDB and Percona can foster a better development community.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is an update to the status of various MySQL bugs (some with patches) that I&#8217;ve filed over the past couple of years (or that people around me have). I&#8217;m not looking at POWER specific ones, as there are &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2016\/02\/26\/mysql-contributions-status\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[76,14],"tags":[356,595,650,340,628,635,651,515,602],"class_list":["post-4035","post","type-post","status-publish","format-standard","hentry","category-code","category-mysql","tag-bugs","tag-community","tag-contribution","tag-mariadb","tag-mysql","tag-percona","tag-rocksdb","tag-tokudb","tag-webscalesql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-135","jetpack-related-posts":[{"id":2041,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/06\/29\/enum-now-works-properly-in-drizzle\/","url_meta":{"origin":4035,"position":0},"title":"ENUM now works properly (in Drizzle)","author":"Stewart Smith","date":"2010-06-29","format":false,"excerpt":"Over at the Drizzle blog, the recent 2010-06-07 tarball was announced. This tarball release has my fixes for the ENUM type, so that it now works as it should. I was quite amazed that such a small block of code could have so many bugs! One of the most interesting\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3752,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/06\/03\/mysql-5-6-on-power-patch-available\/","url_meta":{"origin":4035,"position":1},"title":"MySQL 5.6 on POWER (patch available)","author":"Stewart Smith","date":"2014-06-03","format":false,"excerpt":"The following sentence is brought to you by IBM Legal. The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. Okay, now that is out of the way.... If you're the kind of person who follows the MySQL bugs database closely or subscribes\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3793,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/09\/19\/mysql-5-6-20-on-power\/","url_meta":{"origin":4035,"position":2},"title":"MySQL 5.6.20 on POWER","author":"Stewart Smith","date":"2014-09-19","format":false,"excerpt":"It's been a little while since I blogged on MySQL on POWER (last time was thinking that new releases would be much better for running on POWER). Well, I recently grabbed the MySQL 5.6.20 source tarball and had a go with it on a POWER8 system in the lab. There\u2026","rel":"","context":"In &quot;IBM&quot;","block_context":{"text":"IBM","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/ibm-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2253,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/01\/05\/is-your-storage-engine-buggy-or-the-database-server\/","url_meta":{"origin":4035,"position":3},"title":"Is your Storage Engine buggy or the database server?","author":"Stewart Smith","date":"2011-01-05","format":false,"excerpt":"If your storage engine returns an error from rnd_init (or doStartTableScan as it's named in Drizzle) and does not save this error and return it in any subsequent calls to rnd_next, your engine is buggy. Namely it is buggy in that a) an error may not be reported back to\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3899,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/11\/11\/mysql-cluster-on-power8\/","url_meta":{"origin":4035,"position":4},"title":"MySQL Cluster on POWER8","author":"Stewart Smith","date":"2014-11-11","format":false,"excerpt":"So, I've written previously on MySQL on POWER, and today is a quick bit of news about MySQL Cluster on POWER - specifically MySQL Cluster 7.3.7. I ran into three main issues in getting some flexAsync benchmark results. One of them was the fact that I wanted to do this\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":801,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/03\/12\/irritation-of-the-day\/","url_meta":{"origin":4035,"position":5},"title":"irritation of the day&#8230;.","author":"Stewart Smith","date":"2007-03-12","format":false,"excerpt":"There's a lot of things about the MySQL bug tracking system i like... but there's a few things that annoy the heck out of me. Today it's the fact that if you put a term in the \"with any of the words\" field on advanced search that's an number (e.g.\u2026","rel":"","context":"In &quot;mysql&quot;","block_context":{"text":"mysql","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/mysql\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4035","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=4035"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4035\/revisions"}],"predecessor-version":[{"id":4036,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4035\/revisions\/4036"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=4035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=4035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=4035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}