Bug #56679 gis.test: valgrind error
Submitted: 9 Sep 2010 9:17 Modified: 20 Nov 2010 18:24
Reporter: Ramil Kalimullin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: GIS Severity:S3 (Non-critical)
Version:5.1.51 OS:Any
Assigned to: Ramil Kalimullin CPU Architecture:Any

[9 Sep 2010 9:17] Ramil Kalimullin
Description:
The issue is a result of the fix for #55531: crash with conversions of geometry types / strings:

main.gis                                 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2010-09-09 11:24:24
line
==20724== Thread 3:
==20724== Conditional jump or move depends on uninitialised value(s)
==20724==    at 0x5A2B55: String::c_ptr() (sql_string.h:105)
==20724==    by 0x61EA06: Item_func_spatial_collection::fix_length_and_dec() (item_geofunc.h:186)
==20724==    by 0x5B9B37: Item_func::fix_fields(THD*, Item**) (item_func.cc:198)
==20724==    by 0x5E6DD0: Item_str_func::fix_fields(THD*, Item**) (item_strfunc.cc:63)
==20724==    by 0x6CDC17: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7551)
==20724==    by 0x6E0C2A: JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) (sql_select.cc:514)
==20724==    by 0x6E873F: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2504)
==20724==    by 0x6E0397: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:269)
==20724==    by 0x67EABD: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5127)
==20724==    by 0x675AED: mysql_execute_command(THD*) (sql_parse.cc:2292)
==20724==    by 0x680ED8: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6051)
==20724==    by 0x6733F7: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1260)
==20724==    by 0x672391: do_command(THD*) (sql_parse.cc:888)
==20724==    by 0x67062F: handle_one_connection (sql_connect.cc:1136)
==20724==    by 0x3D4B007760: start_thread (in /lib64/libpthread-2.12.so)
==20724==    by 0x5AB070F: ???
==20724== Conditional jump or move depends on uninitialised value(s)
==20724==    at 0x4A0629C: strnlen (mc_replace_strmem.c:263)
==20724==    by 0xA1FAED: my_vsnprintf (my_vsnprintf.c:100)
==20724==    by 0x9D3972: my_error (my_error.c:96)
==20724==    by 0x61EA22: Item_func_spatial_collection::fix_length_and_dec() (item_geofunc.h:186)
==20724==    by 0x5B9B37: Item_func::fix_fields(THD*, Item**) (item_func.cc:198)
==20724==    by 0x5E6DD0: Item_str_func::fix_fields(THD*, Item**) (item_strfunc.cc:63)
==20724==    by 0x6CDC17: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7551)
==20724==    by 0x6E0C2A: JOIN::prepare(Item***, TABLE_LIST*, unsigned int, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, st_select_lex*, st_select_lex_unit*) (sql_select.cc:514)
==20724==    by 0x6E873F: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:2504)
==20724==    by 0x6E0397: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:269)
==20724==    by 0x67EABD: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5127)
==20724==    by 0x675AED: mysql_execute_command(THD*) (sql_parse.cc:2292)
==20724==    by 0x680ED8: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6051)
==20724==    by 0x6733F7: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1260)
==20724==    by 0x672391: do_command(THD*) (sql_parse.cc:888)
==20724==    by 0x67062F: handle_one_connection (sql_connect.cc:1136)

How to repeat:
./mtr --valgrind gis
[9 Sep 2010 15:05] Paul DuBois
Noted in 5.1.51, 5.5.7 changelogs.

Valgrind warnings for geometry type conversions were corrected.
[9 Sep 2010 18:06] Paul DuBois
Correction: This bug appeared in no released version. No changelog entry needed.
[28 Sep 2010 8:46] Bugs System
Pushed into mysql-5.1 5.1.52 (revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (version source revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (merge vers: 5.1.52) (pib:21)
[14 Oct 2010 8:32] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[14 Oct 2010 8:48] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (merge vers: 5.1.51-ndb-6.3.39) (pib:21)
[14 Oct 2010 9:02] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (merge vers: 5.1.51-ndb-6.2.19) (pib:21)
[15 Oct 2010 14:19] Jon Stephens
Set back to Closed; see above.
[9 Nov 2010 19:43] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (version source revid:marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2) (merge vers: 5.1.50) (pib:21)
[13 Nov 2010 16:19] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2) (merge vers: 5.1.50) (pib:21)
[13 Nov 2010 16:29] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2) (pib:21)