Bug #50381 | Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) | ||
---|---|---|---|
Submitted: | 15 Jan 2010 19:45 | Modified: | 22 Nov 2010 1:09 |
Reporter: | Patrick Crews | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 6.0 | OS: | Any |
Assigned to: | Olav Sandstå | CPU Architecture: | Any |
Tags: | crashing bug, mrr, optimizer_switch, pushbuild, rqg_pb2, test failure |
[15 Jan 2010 19:45]
Patrick Crews
[18 Feb 2010 12:29]
John Embretsen
This bug looks like the cause of the Random Query Generator test rqg_info_schema failing in the mysql-6.0-codebase-bugfixing branch. The stand-alone query causing server crash is: SELECT * FROM (INFORMATION_SCHEMA.PLUGINS AS table1 STRAIGHT_JOIN mysql.ndb_binlog_index AS table2 ON ( table2.deletes = table1.PLUGIN_LICENSE ) ) WHERE ( table1.PLUGIN_STATUS != table1.PLUGIN_NAME AND table2.epoch > 'vd'); Closer inspection shows that this test failure started occurring January 15 2010 after the push of a fix for Bug#50237, bzr revid tor.didriksen@sun.com-20100115121255-26i42spl5b1bg1o9.
[1 Mar 2010 14:10]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/101877
[16 Mar 2010 17:54]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/103499 3824 Olav.Sandstaa@sun.com 2010-03-16 Fix for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) The crash occured when an assert was checking that the value for the average IO cost in the cost vector did not have the value NaN. The NaN value was introduced in the cost vector object in get_sweep_read_cost() when the size of the data file for the table was 0 byte (ie. empty data file). This resulted in a division by zero when computing the estimated number of blocks needed to be read from disk. The fix for avoiding the division by zero is to assume that the data file always contains at least one block. This is similar to what is done for the estimated number of blocks to be accessed. So after this fix the cost estimate in get_sweep_read_cost() will assume both that the data file and the estimate for number of blocks to access are at least 1. @ mysql-test/include/mrr_tests.inc Test for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) @ mysql-test/r/innodb_mrr.result Result file for test for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) @ mysql-test/r/myisam_mrr.result Result file for test for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) @ sql/handler.cc In get_sweep_read_cost: To avoid a division by zero when computing the estimated number of "busy blocks" when the data file has zero length we assume that the data file contains at least one block.
[16 Mar 2010 18:01]
Olav Sandstå
Pushed to mysql-6.0-codebase-bugfixing with revision id: olav.sandstaa@sun.com-20100316175401-iax4ockzqybjrjpl .
[24 Mar 2010 8:14]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100324081249-yfwol7qtcek6dh7w) (version source revid:alik@sun.com-20100324081113-kc7x1iytnplww91u) (merge vers: 6.0.14-alpha) (pib:16)
[25 Mar 2010 1:22]
Paul DuBois
Noted in 6.0.14 changelog. The optimizer raised an assertion due to a divide-by-zero error during I/O cost estimation.
[7 May 2010 14:16]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/107764 3151 Olav Sandstaa 2010-05-07 Fix for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) (backporting of revid:olav.sandstaa@sun.com-20100316175401-iax4ockzqybjrjpl) The crash occured when an assert was checking that the value for the average IO cost in the cost vector did not have the value NaN. The NaN value was introduced in the cost vector object in get_sweep_read_cost() when the size of the data file for the table was 0 byte (ie. empty data file). This resulted in a division by zero when computing the estimated number of blocks needed to be read from disk. The fix for avoiding the division by zero is to assume that the data file always contains at least one block. This is similar to what is done for the estimated number of blocks to be accessed. So after this fix the cost estimate in get_sweep_read_cost() will assume both that the data file and the estimate for number of blocks to access are at least 1. @ mysql-test/include/mrr_tests.inc Test for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) @ mysql-test/r/innodb_mrr.result Result file for test for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) @ mysql-test/r/myisam_mrr.result Result file for test for Bug#50381 Assertion failing in handler.h:1283: void COST_VECT::add_io(double, double) @ sql/handler.cc In get_sweep_read_cost: To avoid a division by zero when computing the estimated number of "busy blocks" when the data file has zero length we assume that the data file contains at least one block.
[16 Aug 2010 6:40]
Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[13 Nov 2010 16:20]
Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)
[22 Nov 2010 1:09]
Paul DuBois
Noted in 5.6.1 changelog.
[23 Nov 2010 2:27]
Paul DuBois
Correction: No 5.6.1 changelog entry. Bug does not appear in any released 5.6.x version.