Saturday, February 6, 2016

Fun with Bugs #41 - Bugs Fixed in MySQL 5.7.11

I've just noted that Oracle had released new versions of MySQL on February 5, 2016 formally, so while these days I am mostly thinking about the ways to do support properly, remembering my colleagues and trying to understand some of RocksDB internals, it's time to postpone all these and write about bugs again. This time about some of the public bug reports from MySQL Community and Oracle engineers that were fixed by Oracle in MySQL 5.7.11.

As usual, I'll try to mention who had reported a bug and who verified it, as I think that names matter in MySQL world. I'll concentrate mostly on InnoDB, replication and optimizer bug reports, trying to highlight regressions clearly.

As usual, I prefer to start with InnoDB bugs:
  • Bug #75112 - "Optimize table removes the data directory in partitions". This bug was reported by my former colleague Nilnandan Joshi and verified by Umesh. The fix should appear in MySQL 5.6.30 also.
  • Bug #79775 - "Innodb doesn't update index stats when dropping virtual column in virtual index". It was reported by Shaohua Wang and probably was verified and fixed by him. I am always happy to see Oracle engineers reporting MySQL bugs in public! Check also his Bug #79773, "handler::my_eval_gcolumn_expr doesn't set correct null bit" fixed in 5.7.11.
  • Bug #79691 - "Block Memcached from modifying tables that contain indexed virtual columns". One more  case of public bug reporting by Oracle engineer. This time it was Thirunarayanan Balathandayuthapani.
  • Bug #79516 - "Server crashes on invalid value for variable innodb_saved_page_number_debug". When I hit third public report by Oracle engineer, this time even about a crash, I started to think that there is a new generation of engineers there that just do right things from the very beginning. Thank you, Naga Satyanarayana Bodapati, for reporting this bug in public!
  • Bug #79030 - "REORGANIZE PARTITION MOVES PARTITION TO TABLE-LEVEL TABLESPACE BY DEFAULT". When I see all caps in the bug synopsis I suspect it's from Oracle engineer (and from Oracle's internal bugs database, originally). This bug was reported by Darshan M n.
  • Bug #79201 - "InnoDB: Too small buffer pool for innodb_page_size=64k". Marko Mäkelä had never hesitated to report bugs in public. Check also his Bug #79150, "InnoDB: Remove runtime checks for 32-bit file offsets". Thank you for noting and fixing these! 
  • Bug #79434 - "Incorrect NUMA-specific code in buf_chunk_init()". It was reported by my former colleague Alexey Kopytov and verified by Sinisa Milivojevic formally. Check also his Bug #79354, "Incomplete NUMA support on buffer pool resizing".
  • Bug #78960 - "Unclear note "InnoDB: not started" in the error log". I've reported this bug back in October, 2015, based on the log from some customer issue. The message that was produced during loading of the buffer pool looked scary and misleading for customer, so I reported the bug immediately. It was verified by Umesh and is also fixed in 5.8.0.
  • Bug #78955 - "Import Dump with InnoDB Fulltext Index and Constraint fails". This regression bug was reported by Nico Niepraschk and verified by Umesh.
  • Bug #78831 - "InnoDB looks for buffer pool file name in '/' if innodb_data_home_dir is empty". It was reported by someone named NOT_FOUND NOT_FOUND. I'd like to find out one day who is it, as I see other useful bug reports under the same name, all fixed.
  • Bug #78714 - "InnoDB: Failing assertion: !(&dict_sys->mutex)->is_owned() in 3049", was reported by my former colleague Roel Van de Paar and verified by Umesh
  • Bug #78647 - "POTENTIAL RUNNING OUT OF SPACE IN REDO - INVALID MARGIN CALCULATIONS". This bug was reported by Pawel Olchawa and probably verified by Marko Mäkelä. The fix was mostly to increase the minimum value of innodb_log_file_size from 1MB to 4MB.
  • Bug #78262 - "Adding indexes on empty table is slow with large innodb_sort_buffer_size.". It was reported by Jean-François Gagné (who had made a great presentation at FOSDEM 2016, by the way) and verified by Umesh.
  • Bug #74832 - "ut_delay missing compiler barrier, UT_RELAX_CPU isn't at all relaxing". This bug was reported long time ago by Stewart Smith, who had provided the patch also. It was formally processed by Umesh.
The only public bug in partitioning that is listed in the release notes as fixed is Bug #79145, by Debarun Banerjee, who is probably working for Oracle.

Now, let's move on to replication (and XA transactions) bugs:
  • Bug #79416 - "InnoDB: Failing assertion: total_trx >= trx_sys->n_prepared_trx". This (debug builds only) bug was reported by Roel Van de Paar and verified by Umesh. See also Bug #78695, "Assertion `static_cast<Sql_cmd_xa_commit*>(thd->lex->m_sql_cmd)-> get_xa_opt() =".
  • Bug #77740 - "silent failure to start if mysql.gtids_executed gets HA_ERR_LOCK_WAIT_TIMEOUT". It was reported and verified by Shane Bester. The fix is to NOT allow XA transactions to modify the mysql.gtid_executed table.
  • Bug #77417 - "Applying create temporary table SQL on a slave with replicate-rewrite-db fails". This bug was reported by JAMES HETHERINGTON (who seems to be a customer of Oracle) and verified by Umesh. Good to see Oracle customers following my old advice and reporting bugs in public!
  • Bug #77393 - "Failure to generate GTID leads to inconsistency". It was reported by Davi Arnaut, who had provided a patch, and verified by Umesh.
  • Bug #77354 - "multi drop temp table statements in UDF cause replication fails using 5.6 GTID". This bug was reported by Fungo Wang (check his other replication-related bug reports, still "Verified") and verified by Umesh (no wonder, he seems to verify up to 70% of all bugs recently...)
  • Bug #77288 - "Variables in alter event not replicated properly". It was reported by Trey Raymond and verified by Umesh.
  • Bug #77249 - "Drop table may cause slaves to break". This bug was reported by  Santosh Praneeth Banda (who is a very active bug reporter, I see 7 more replication bugs) and verified by Umesh. It is also fixed in MySQL 5.6.29.
  • Bug #71859 - "Replication broken after creation of scheduled events". It was reported by Shahid Hussain and verified by Sveta Smirnova long time ago. The bug is also fixed in MySQL 5.6.29.
Let me conclude with several optimizer-related bugs:
  • Bug #79590 - "ERROR 1093 (HY000): You can't specify target table '.' for update in FROM clause". It was reported by Zhang Jinzhu and verified by Miguel Solorzano.
  • Bug #79549 - "Regression: “unknown column” for outer computed values used inside a subquery". This bug was reported by Chris Adams and verified by Miguel Solorzano.
  • Bug #79398 - "view using hexadecimal or bit literal gives wrong results". It was reported, verified and probably fixed by Guilhem Bichot.
  • Bug #79333 - "Unexpected error 1093 on nested subquery for update". This regression bug was reported by Danielle McLean and verified by Miguel Solorzano
  • Bug #79294 - "Query with double nested subquery much slower in 5.7". This regression bug was reported by Jonathan Corwin and verified by Umesh. Nice to see it fixed.
  • Bug #79194 - "Wrong result on outer join with uncorrelated subquery, derived_merge". This regression bug was reported by Elena Stepanova and verified by Miguel Solorzano.
  • Bug #79131 - "Get negative FOUND_ROWS() for UNION stmt". It was reported by Su Dylan and verified by Umesh. Based on the comments, it's also a regression bug in 5.7 comparing to 5.6, even though it is not tagged like that.
  • Bug #78946 - "WRONG RESULT FOR SELECT NULL IN (<SUBQUERY>) ". One more bug report from an Oracle developer, Dag Wanvik. Good that he had found, reported and probably fixed this regression, but in general I am negatively surprised by the number of recent optimizer regression bugs in MySQL 5.7 that are found only after they are introduced into public releases.
There are many more bug fixes, changes in behavior and new features in MySQL 5.7.11. So, read the release notes carefully and prepare to upgrade.

No comments:

Post a Comment