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

Valgrind warnings in my_long10_to_str_8bit on INTERVAL and DATE_ADD with incorrect types

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 10.0.2, 5.5.31, 5.3.12
    • 10.0.4, 5.5.33, 5.3.13
    • None
    • None

    Description

      Test case:

      CREATE TABLE t1 (pk INT PRIMARY KEY);
      INSERT INTO t1 VALUES (10),(11);
       
      SELECT INTERVAL( 9, 1, DATE_ADD( pk, INTERVAL pk MINUTE_SECOND ), 9, 8, 3, 5, 2, 1 ) FROM t1;

      ==20934== Thread 4:
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0xC027E9: my_long10_to_str_8bit (ctype-simple.c:862)
      ==20934==    by 0x63BFA6: Field_long::val_str(String*, String*) (field.cc:3687)
      ==20934==    by 0x5969E8: Field::val_str(String*) (field.h:216)
      ==20934==    by 0x635924: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1762)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0xC028D4: my_long10_to_str_8bit (ctype-simple.c:876)
      ==20934==    by 0x63BFA6: Field_long::val_str(String*, String*) (field.cc:3687)
      ==20934==    by 0x5969E8: Field::val_str(String*) (field.h:216)
      ==20934==    by 0x635924: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1762)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934== Use of uninitialised value of size 8
      ==20934==    at 0x9155FB: str_to_datetime (my_time.c:191)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Use of uninitialised value of size 8
      ==20934==    at 0x915630: str_to_datetime (my_time.c:193)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Use of uninitialised value of size 8
      ==20934==    at 0x9156A8: str_to_datetime (my_time.c:209)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Use of uninitialised value of size 8
      ==20934==    at 0x915CE0: str_to_datetime (my_time.c:270)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Use of uninitialised value of size 8
      ==20934==    at 0x915992: str_to_datetime (my_time.c:286)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x9159D7: str_to_datetime (my_time.c:293)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x916015: str_to_datetime (my_time.c:422)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x91602C: str_to_datetime (my_time.c:423)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x9160AB: str_to_datetime (my_time.c:431)
      ==20934==    by 0x7D658A: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:234)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x7D6593: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:235)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934==    by 0x70BAA2: 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:666)
      ==20934==    by 0x7144C6: 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:2970)
      ==20934==    by 0x70AF26: handle_select(THD*, st_lex*, select_result*, unsigned long) (sql_select.cc:288)
      ==20934==    by 0x6963DE: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:5172)
      ==20934==    by 0x68D19D: mysql_execute_command(THD*) (sql_parse.cc:2305)
      ==20934==    by 0x698E58: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6173)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x4C2BF7E: __GI_strnlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==20934==    by 0xC1E5CC: process_str_arg (my_vsnprintf.c:196)
      ==20934==    by 0xC1FE2A: my_vsnprintf_ex (my_vsnprintf.c:568)
      ==20934==    by 0xC20158: my_vsnprintf (my_vsnprintf.c:625)
      ==20934==    by 0xC01E7B: my_snprintf_8bit (ctype-simple.c:298)
      ==20934==    by 0x7D768E: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, Lazy_string const*, enum_mysql_timestamp_type, char const*) (time.cc:796)
      ==20934==    by 0x7D5EB8: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, char const*, unsigned int, enum_mysql_timestamp_type, char const*) (mysql_priv.h:2540)
      ==20934==    by 0x7D65CE: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:238)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x4C2BF8C: __GI_strnlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==20934==    by 0xC1E5CC: process_str_arg (my_vsnprintf.c:196)
      ==20934==    by 0xC1FE2A: my_vsnprintf_ex (my_vsnprintf.c:568)
      ==20934==    by 0xC20158: my_vsnprintf (my_vsnprintf.c:625)
      ==20934==    by 0xC01E7B: my_snprintf_8bit (ctype-simple.c:298)
      ==20934==    by 0x7D768E: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, Lazy_string const*, enum_mysql_timestamp_type, char const*) (time.cc:796)
      ==20934==    by 0x7D5EB8: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, char const*, unsigned int, enum_mysql_timestamp_type, char const*) (mysql_priv.h:2540)
      ==20934==    by 0x7D65CE: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:238)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0xBFE8C1: strnmov (strnmov.c:41)
      ==20934==    by 0xC1E670: process_str_arg (my_vsnprintf.c:204)
      ==20934==    by 0xC1FE2A: my_vsnprintf_ex (my_vsnprintf.c:568)
      ==20934==    by 0xC20158: my_vsnprintf (my_vsnprintf.c:625)
      ==20934==    by 0xC01E7B: my_snprintf_8bit (ctype-simple.c:298)
      ==20934==    by 0x7D768E: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, Lazy_string const*, enum_mysql_timestamp_type, char const*) (time.cc:796)
      ==20934==    by 0x7D5EB8: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, char const*, unsigned int, enum_mysql_timestamp_type, char const*) (mysql_priv.h:2540)
      ==20934==    by 0x7D65CE: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:238)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0xBB2A39: strdup_root (my_alloc.c:415)
      ==20934==    by 0x76C617: MYSQL_ERROR::set_msg(THD*, char const*) (sql_error.cc:59)
      ==20934==    by 0x76D0D9: MYSQL_ERROR::MYSQL_ERROR(THD*, unsigned int, MYSQL_ERROR::enum_warning_level, char const*) (sql_error.h:31)
      ==20934==    by 0x76CA21: push_warning(THD*, MYSQL_ERROR::enum_warning_level, unsigned int, char const*) (sql_error.cc:160)
      ==20934==    by 0x7D76B2: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, Lazy_string const*, enum_mysql_timestamp_type, char const*) (time.cc:799)
      ==20934==    by 0x7D5EB8: make_truncated_value_warning(THD*, MYSQL_ERROR::enum_warning_level, char const*, unsigned int, enum_mysql_timestamp_type, char const*) (mysql_priv.h:2540)
      ==20934==    by 0x7D65CE: str_to_datetime_with_warn(char const*, unsigned int, st_mysql_time*, unsigned long) (time.cc:238)
      ==20934==    by 0x635961: Field::get_date(st_mysql_time*, unsigned int) (field.cc:1764)
      ==20934==    by 0x5822AF: Item_field::get_date(st_mysql_time*, unsigned int) (item.cc:2346)
      ==20934==    by 0x5F76ED: Item_date_add_interval::get_date(st_mysql_time*, unsigned int) (item_timefunc.cc:1927)
      ==20934==    by 0x5F5F81: Item_temporal_func::val_int() (item_timefunc.cc:1358)
      ==20934==    by 0x5986A2: Item::update_null_value() (item.h:949)
      ==20934==    by 0x5C495C: Item_func::is_null() (item_func.h:163)
      ==20934==    by 0x5CED8A: Item_func_interval::fix_length_and_dec() (item_cmpfunc.cc:1963)
      ==20934==    by 0x5AF826: Item_func::fix_fields(THD*, Item**) (item_func.cc:208)
      ==20934==    by 0x6F2B88: setup_fields(THD*, Item**, List<Item>&, enum_mark_columns, List<Item>*, bool) (sql_base.cc:7858)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x4C2BFD8: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==20934==    by 0x76CFA4: mysqld_show_warnings(THD*, unsigned long) (sql_error.cc:259)
      ==20934==    by 0x68D49D: mysql_execute_command(THD*) (sql_parse.cc:2373)
      ==20934==    by 0x698E58: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6173)
      ==20934==    by 0x68A941: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1243)
      ==20934==    by 0x689BDF: do_command(THD*) (sql_parse.cc:923)
      ==20934==    by 0x68663A: handle_one_connection (sql_connect.cc:1231)
      ==20934==    by 0x548DE99: start_thread (pthread_create.c:308)
      ==20934==    by 0x5F9ACBC: clone (clone.S:112)
      ==20934== Conditional jump or move depends on uninitialised value(s)
      ==20934==    at 0x673BCD: copy_and_convert(char*, unsigned int, charset_info_st const*, char const*, unsigned int, charset_info_st const*, unsigned int*) (sql_string.cc:988)
      ==20934==    by 0x66A004: Protocol::net_store_data(unsigned char const*, unsigned long, charset_info_st const*, charset_info_st const*) (protocol.cc:113)
      ==20934==    by 0x66BFE6: Protocol::store_string_aux(char const*, unsigned long, charset_info_st const*, charset_info_st const*) (protocol.cc:932)
      ==20934==    by 0x66C2EB: Protocol_text::store(char const*, unsigned long, charset_info_st const*) (protocol.cc:972)
      ==20934==    by 0x76CFBB: mysqld_show_warnings(THD*, unsigned long) (sql_error.cc:259)
      ==20934==    by 0x68D49D: mysql_execute_command(THD*) (sql_parse.cc:2373)
      ==20934==    by 0x698E58: mysql_parse(THD*, char*, unsigned int, char const**) (sql_parse.cc:6173)
      ==20934==    by 0x68A941: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1243)
      ==20934==    by 0x689BDF: do_command(THD*) (sql_parse.cc:923)
      ==20934==    by 0x68663A: handle_one_connection (sql_connect.cc:1231)
      ==20934==    by 0x548DE99: start_thread (pthread_create.c:308)
      ==20934==    by 0x5F9ACBC: clone (clone.S:112)
      ==20934== Syscall param write(buf) points to uninitialised byte(s)
      ==20934==    at 0x5494CCD: ??? (syscall-template.S:82)
      ==20934==    by 0xBA08BF: vio_write (viosocket.c:121)
      ==20934==    by 0x6686AA: net_real_write (net_serv.cc:620)
      ==20934==    by 0x667D11: net_flush (net_serv.cc:346)
      ==20934==    by 0x66A611: net_send_eof(THD*, unsigned int, unsigned int) (protocol.cc:291)
      ==20934==    by 0x66AB6B: net_end_statement(THD*) (protocol.cc:495)
      ==20934==    by 0x68BC68: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1635)
      ==20934==    by 0x689BDF: do_command(THD*) (sql_parse.cc:923)
      ==20934==    by 0x68663A: handle_one_connection (sql_connect.cc:1231)
      ==20934==    by 0x548DE99: start_thread (pthread_create.c:308)
      ==20934==    by 0x5F9ACBC: clone (clone.S:112)
      ==20934==  Address 0xf8130c9 is 153 bytes inside a block of size 16,392 alloc'd
      ==20934==    at 0x4C2B6CD: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==20934==    by 0xBB0BDD: my_malloc (my_malloc.c:42)
      ==20934==    by 0x667801: my_net_init (net_serv.cc:120)
      ==20934==    by 0x67CA2A: handle_connections_sockets (mysqld.cc:5432)
      ==20934==    by 0x67B94B: main (mysqld.cc:4753)

      bzr version-info

      revision-id: psergey@askmonty.org-20130505013255-oyp1f1cscm7z8bx8
      revno: 3656
      branch-nick: 5.3
      BUILD/compile-pentium-valgrind-max-no-ndb

      848:size_t my_long10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)),
      849:                             char *dst, size_t len, int radix, long int val)
      850:{
      851:  char buffer[66];
      852:  register char *p, *e;
      853:  long int new_val;
      854:  uint sign=0;
      855:  unsigned long int uval = (unsigned long int) val;
      856:
      857:  e = p = &buffer[sizeof(buffer)-1];
      858:  *p= 0;
      859:  
      860:  if (radix < 0)
      861:  {
      862:    if (val < 0)
      863:    {
      864:      /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */
      865:      uval= (unsigned long int)0 - uval;
      866:      *dst++= '-';
      867:      len--;
      868:      sign= 1;
      869:    }
      870:  }
      871:  
      872:  new_val = (long) (uval / 10);
      873:  *--p    = '0'+ (char) (uval - (unsigned long) new_val * 10);
      874:  val     = new_val;
      875:  
      876:  while (val != 0)
      877:  {
      878:    new_val=val/10;
      879:    *--p = '0' + (char) (val-new_val*10);
      880:    val= new_val;
      881:  }
      882:  
      883:  len= min(len, (size_t) (e-p));
      884:  memcpy(dst, p, len);
      885:  return len+sign;
      886:}

      Setting to Minor because the query is artificial

      Attachments

        Activity

          People

            bar Alexander Barkov
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.