Bug #37066 Valgrind error in test gis-rtree.test
Submitted: 29 May 2008 11:36 Modified: 20 Nov 2010 18:24
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:6.0-bk,5.4 OS:Linux
Assigned to: Alexey Botchkov CPU Architecture:Any

[29 May 2008 11:36] Guilhem Bichot
Description:
valgrind-3.3.0.
./mtr --mem --valgrind gis-rtree
says
==27451== Thread 14:
==27451== Conditional jump or move depends on uninitialised value(s)
==27451==    at 0x8382F10: get_key_scans_params(PARAM*, SEL_TREE*, bool, bool, d
ouble) (opt_range.cc:4752)
==27451==    by 0x8388E57: SQL_SELECT::test_quick_select(THD*, Bitmap<64>, unsig
ned long long, unsigned long long, bool, bool) (opt_range.cc:2351)
==27451==    by 0x83036E6: make_join_statistics(JOIN*, TABLE_LIST*, Item*, st_dy
namic_array*) (sql_select.cc:3652)
==27451==    by 0x830C25B: JOIN::optimize() (sql_select.cc:1492)
==27451==    by 0x8317E84: mysql_select(THD*, Item***, TABLE_LIST*, unsigned, Li
st<Item>&, Item*, unsigned, st_order*, st_order*, Item*, st_order*, unsigned lon
g long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2914
)
==27451==    by 0x8318439: handle_select(THD*, st_lex*, select_result*, unsigned
 long) (sql_select.cc:289)
==27451==    by 0x8298EF7: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.c
c:4795)
==27451==    by 0x829BD53: mysql_execute_command(THD*) (sql_parse.cc:1994)
==27451==    by 0x82A3711: mysql_parse(THD*, char const*, unsigned, char const**
) (sql_parse.cc:5751)
The line in opt_range.cc is:
      if (read_time > found_read_time && found_records != HA_POS_ERROR)

How to repeat:
valgrind-3.3.0.
./mtr --mem --valgrind gis-rtree
I'm using a clean 6.0 tree.
If you are not able to repeat, please don't just close this bug report; there surely is some problem.
[17 Oct 2008 9:07] Sveta Smirnova
Thank you for the report.

Verified as described.
[11 Dec 2008 14:01] 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/61364

2797 Alexey Botchkov	2008-12-11
      Bug#37066      Valgrind error in test gis-rtree.test
              when check_quick_select returns HA_POS_ERROR,
              the 'cost' parameter isn't touched in most cases
              thus contains garbage. That's why valgrind complains.
              Fixed - use the 'cost' only if noerror retured
      
      per-file messages:
        sql/opt_range.cc
      Bug#37066      Valgrind error in test gis-rtree.test
              don't calculate found_read_time if HA_POS_ERROR
[8 Jun 2009 10:47] Tomas Ulin
Changed to PQ as bug is fixed and in GIS future tree
[8 Jun 2009 10:58] Tomas Ulin
sorry needs review
[24 Jun 2009 12:23] 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/77032

2806 Alexey Botchkov	2009-06-24
      Bug#37066      Valgrind error in test gis-rtree.test
              when check_quick_select returns HA_POS_ERROR,
              the 'cost' parameter isn't touched in most cases
              thus contains garbage. That's why valgrind complains.
              Fixed - use the 'cost' only if noerror retured
      
      per-file messages:
        sql/opt_range.cc
      Bug#37066      Valgrind error in test gis-rtree.test
              don't calculate found_read_time if HA_POS_ERROR
[24 Jun 2009 12:24] Alexey Botchkov
pushed into mysql-azalea-bugfixing
[3 Jul 2009 6:13] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090702084644-k95gd2asolvz2zpu) (version source revid:jon.hauglid@sun.com-20090625092953-xiur7w0mz78g6nmo) (merge vers: 5.4.4-alpha) (pib:11)
[9 Jul 2009 7:34] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090702084644-k95gd2asolvz2zpu) (version source revid:jon.hauglid@sun.com-20090625092953-xiur7w0mz78g6nmo) (merge vers: 5.4.4-alpha) (pib:11)
[17 Jul 2009 2:52] Paul DuBois
Noted in 5.4.4 changelog.

A Valgrind warning that occurred when reading spatial indexes was silenced.
[10 May 2010 14:13] 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/107860

3161 Evgeny Potemkin	2010-05-10
      Bug#37066 Valgrind error in test gis-rtree.test
              when check_quick_select returns HA_POS_ERROR,
              the 'cost' parameter isn't touched in most cases
              thus contains garbage. That's why valgrind complains.
              Fixed - use the 'cost' only if noerror retured
      
      per-file messages:
        sql/opt_range.cc
      Bug#37066 Valgrind error in test gis-rtree.test
              don't calculate found_read_time if HA_POS_ERROR
      Original revid:holyfoot@mysql.com-20090624105541-pw2zagi5xijlt1gj
[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:15] 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)