Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-3095

LP:666322 - Valgrind warning "Use of uninitialised value of size 4" at my_strnncollsp_simple

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Resolution: Not a Bug
    • None
    • None
    • None

    Description

      The following query:

      SELECT table2 . `col_varchar_key` AS field1
      FROM ( C AS table1 INNER JOIN C AS table2 ON (table2 . `col_int_key` = table1 . `col_int_key` ) )
      GROUP BY field1 HAVING field1 < 1 ORDER BY field1 ;

      produces the following valgrind warning:

      ==18898== Use of uninitialised value of size 4
      ==18898== at 0x8768836: my_strnncollsp_simple (ctype-simple.c:166)
      ==18898== by 0x825776D: Field_varstring::cmp_max(unsigned char const*, unsigned char const*, unsigned int) (field.cc:7140)
      ==18898== by 0x8261955: Field_varstring::cmp(unsigned char const*, unsigned char const*) (field.h:1669)
      ==18898== by 0x81E0E46: Field::cmp(unsigned char const*) (field.h:314)
      ==18898== by 0x81E0C37: Cached_item_field::cmp() (item_buff.cc:122)
      ==18898== by 0x8329D34: test_if_group_changed(List<Cached_item>&) (sql_select.cc:17230)
      ==18898== by 0x83228A8: end_send_group(JOIN*, st_join_table*, bool) (sql_select.cc:14324)
      ==18898== by 0x8320A19: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:13490)
      ==18898== by 0x832050E: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:13338)
      ==18898== by 0x8320A19: evaluate_join_record(JOIN*, st_join_table*, int) (sql_select.cc:13490)
      ==18898== by 0x83203C0: sub_select(JOIN*, st_join_table*, bool) (sql_select.cc:13298)
      ==18898== by 0x831F7E1: do_select(JOIN*, List<Item>, st_table, Procedure*) (sql_select.cc:12842)
      ==18898== by 0x83057B6: JOIN::exec() (sql_select.cc:2412)
      ==18898== by 0x8305EDF: 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:2613)
      ==18898== by 0x82FE59A: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:277)
      ==18898== by 0x829B753: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5081)
      ==18898==

      in maria-5.3-mwl128 and not in 5.3-main. The EXPLAIN plan does not show any join_cache involvement.

      Attachments

        Activity

          People

            Unassigned Unassigned
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.