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

Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning

Details

    Description

      set optimizer_use_condition_selectivity=3;
      create table t1 (it time not null);
      INSERT INTO t1 VALUES ('07:25:13'),('05:15:55'),('09:58:01'),('04:23:57'),('19:37:28'),('01:38:05'),('20:50:52');
       
      SELECT 1 FROM t1 WHERE it < -7487797330456870912;
      

       
      Thread 1 (Thread 0x7f845821d700 (LWP 11636)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x000055e1bf3f1d18 in my_write_core (sig=6) at /10.4/mysys/stacktrace.c:481
      #2  0x000055e1bec4b147 in handle_fatal_signal (sig=6) at /10.4/sql/signal_handler.cc:305
      #3  <signal handler called>
      #4  0x00007f845f4ce428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007f845f4d002a in __GI_abort () at abort.c:89
      #6  0x00007f845f4c6bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55e1bf618118 "!t->fraction_remainder(decimals())", file=file@entry=0x55e1bf6179e8 "/10.4/sql/field.cc", line=line@entry=5700, function=function@entry=0x55e1bf61b000 <Field_time::store_TIME_with_warning(Time const*, ErrConv const*, int)::__PRETTY_FUNCTION__> "int Field_time::store_TIME_with_warning(const Time*, const ErrConv*, int)") at assert.c:92
      #7  0x00007f845f4c6c82 in __GI___assert_fail (assertion=0x55e1bf618118 "!t->fraction_remainder(decimals())", file=0x55e1bf6179e8 "/10.4/sql/field.cc", line=5700, function=0x55e1bf61b000 <Field_time::store_TIME_with_warning(Time const*, ErrConv const*, int)::__PRETTY_FUNCTION__> "int Field_time::store_TIME_with_warning(const Time*, const ErrConv*, int)") at assert.c:101
      #8  0x000055e1bec253fe in Field_time::store_TIME_with_warning (this=0x7f840c042298, t=0x7f845821a340, str=0x7f845821a370, warn=2) at /10.4/sql/field.cc:5700
      #9  0x000055e1bec2598e in Field_time::store (this=0x7f840c042298, nr=-7487797330456870912, unsigned_val=false) at /10.4/sql/field.cc:5750
      #10 0x000055e1bec76a57 in save_int_value_in_field (field=0x7f840c042298, nr=-7487797330456870912, null_value=false, unsigned_flag=false) at /10.4/sql/item.cc:6671
      #11 0x000055e1bec76ab6 in Item_int::save_in_field (this=0x7f840c015c00, field=0x7f840c042298, no_conversions=true) at /10.4/sql/item.cc:6677
      #12 0x000055e1bec672f2 in Item::save_in_field_no_warnings (this=0x7f840c015c00, field=0x7f840c042298, no_conversions=true) at /10.4/sql/item.cc:1381
      #13 0x000055e1bedba555 in Field_temporal::get_mm_leaf (this=0x7f840c042298, prm=0x7f845821abb0, key_part=0x7f840c134118, cond=0x7f840c015c90, op=SCALAR_CMP_LT, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:8211
      #14 0x000055e1bedb9feb in Item_bool_func::get_mm_leaf (this=0x7f840c015c90, param=0x7f845821abb0, field=0x7f840c042298, key_part=0x7f840c134118, functype=Item_func::LT_FUNC, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:8135
      #15 0x000055e1bedb94bc in Item_bool_func::get_mm_parts (this=0x7f840c015c90, param=0x7f845821abb0, field=0x7f840c042298, type=Item_func::LT_FUNC, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:7969
      #16 0x000055e1be8d574f in Item_bool_func2_with_rev::get_func_mm_tree (this=0x7f840c015c90, param=0x7f845821abb0, field=0x7f840c042298, value=0x7f840c015c00) at /10.4/sql/item_cmpfunc.h:461
      #17 0x000055e1bedb838f in Item_bool_func::get_full_func_mm_tree (this=0x7f840c015c90, param=0x7f845821abb0, field_item=0x7f840c015ad8, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:7648
      #18 0x000055e1be8d5458 in Item_bool_func::get_full_func_mm_tree_for_args (this=0x7f840c015c90, param=0x7f845821abb0, item=0x7f840c015ad8, value=0x7f840c015c00) at /10.4/sql/item_cmpfunc.h:202
      #19 0x000055e1be8d5888 in Item_bool_func2_with_rev::get_mm_tree (this=0x7f840c015c90, param=0x7f845821abb0, cond_ptr=0x7f840c016a90) at /10.4/sql/item_cmpfunc.h:489
      #20 0x000055e1bedadd45 in calculate_cond_selectivity_for_table (thd=0x7f840c000b00, table=0x7f840c12d430, cond=0x7f840c016a90) at /10.4/sql/opt_range.cc:3168
      #21 0x000055e1be9a6585 in make_join_statistics (join=0x7f840c016688, tables_list=..., keyuse_array=0x7f840c016978) at /10.4/sql/sql_select.cc:4972
      #22 0x000055e1be99b90d in JOIN::optimize_inner (this=0x7f840c016688) at /10.4/sql/sql_select.cc:1939
      #23 0x000055e1be999be9 in JOIN::optimize (this=0x7f840c016688) at /10.4/sql/sql_select.cc:1448
      #24 0x000055e1be9a3c89 in mysql_select (thd=0x7f840c000b00, tables=0x7f840c015470, wild_num=0, fields=..., conds=0x7f840c015c90, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f840c016660, unit=0x7f840c0049b0, select_lex=0x7f840c014f60) at /10.4/sql/sql_select.cc:4274
      #25 0x000055e1be99568c in handle_select (thd=0x7f840c000b00, lex=0x7f840c0048e8, result=0x7f840c016660, setup_tables_done_option=0) at /10.4/sql/sql_select.cc:382
      #26 0x000055e1be96009d in execute_sqlcom_select (thd=0x7f840c000b00, all_tables=0x7f840c015470) at /10.4/sql/sql_parse.cc:6550
      #27 0x000055e1be9564f4 in mysql_execute_command (thd=0x7f840c000b00) at /10.4/sql/sql_parse.cc:3772
      #28 0x000055e1be963e85 in mysql_parse (thd=0x7f840c000b00, rawbuf=0x7f840c014e98 "SELECT 1 FROM t1 WHERE it < -7487797330456870912", length=48, parser_state=0x7f845821c470, is_com_multi=false, is_next_command=false) at /10.4/sql/sql_parse.cc:8085
      #29 0x000055e1be950f50 in dispatch_command (command=COM_QUERY, thd=0x7f840c000b00, packet=0x7f840c179421 "SELECT 1 FROM t1 WHERE it < -7487797330456870912", packet_length=48, is_com_multi=false, is_next_command=false) at /10.4/sql/sql_parse.cc:1850
      #30 0x000055e1be94f96d in do_command (thd=0x7f840c000b00) at /10.4/sql/sql_parse.cc:1395
      #31 0x000055e1beab667f in do_handle_one_connection (connect=0x55e1c28daec0) at /10.4/sql/sql_connect.cc:1402
      #32 0x000055e1beab63d0 in handle_one_connection (arg=0x55e1c28daec0) at /10.4/sql/sql_connect.cc:1308
      #33 0x000055e1bf38222a in pfs_spawn_thread (arg=0x55e1c28e1ea0) at /10.4/storage/perfschema/pfs.cc:1862
      #34 0x00007f846010b6ba in start_thread (arg=0x7f845821d700) at pthread_create.c:333
      #35 0x00007f845f5a041d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            Assignee Alice Sherepa [ alice ]
            alice Alice Sherepa made changes -
            Description {noformat} 10.4 4437b5bffbfcb71c7e39
            mysqld: /10.4/sql/field.cc:5700: int Field_time::store_TIME_with_warning(const Time*, const ErrConv*, int): Assertion `!t->fraction_remainder(decimals())' failed.

            180917 17:28:33 [ERROR] mysqld got signal 6 ;

            mysys/stacktrace.c:269(my_print_stacktrace)[0x55b5f2791c26]
            sql/signal_handler.cc:168(handle_fatal_signal)[0x55b5f1fead1c]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f81eceef390]
            linux/raise.c:54(__GI_raise)[0x7f81ec2a8428]
            stdlib/abort.c:91(__GI_abort)[0x7f81ec2aa02a]
            assert/assert.c:92(__assert_fail_base)[0x7f81ec2a0bd7]
            /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f81ec2a0c82]
            sql/field.cc:5701(Field_time::store_TIME_with_warning(Time const*, ErrConv const*, int))[0x55b5f1fc53fe]
            sql/field.cc:5750(Field_time::store(long long, bool))[0x55b5f1fc598e]
            sql/item.cc:6672(save_int_value_in_field(Field*, long long, bool, bool))[0x55b5f2016a57]
            sql/item.cc:6678(Item_int::save_in_field(Field*, bool))[0x55b5f2016ab6]
            sql/item.cc:1381(Item::save_in_field_no_warnings(Field*, bool))[0x55b5f20072f2]
            sql/opt_range.cc:8211(Field_temporal::get_mm_leaf(RANGE_OPT_PARAM*, KEY_PART*, Item_bool_func const*, scalar_comparison_op, Item*))[0x55b5f215a555]
            sql/opt_range.cc:8135(Item_bool_func::get_mm_leaf(RANGE_OPT_PARAM*, Field*, KEY_PART*, Item_func::Functype, Item*))[0x55b5f2159feb]
            sql/opt_range.cc:7969(Item_bool_func::get_mm_parts(RANGE_OPT_PARAM*, Field*, Item_func::Functype, Item*))[0x55b5f21594bc]
            sql/opt_range.cc:7114(Item_bool_func::get_ne_mm_tree(RANGE_OPT_PARAM*, Field*, Item*, Item*))[0x55b5f2156cf8]
            sql/item_cmpfunc.h:828(Item_func_ne::get_func_mm_tree(RANGE_OPT_PARAM*, Field*, Item*))[0x55b5f2042f64]
            sql/opt_range.cc:7648(Item_bool_func::get_full_func_mm_tree(RANGE_OPT_PARAM*, Item_field*, Item*))[0x55b5f215838f]
            sql/item_cmpfunc.h:202(Item_bool_func::get_full_func_mm_tree_for_args(RANGE_OPT_PARAM*, Item*, Item*))[0x55b5f1c75458]
            sql/item_cmpfunc.h:489(Item_bool_func2_with_rev::get_mm_tree(RANGE_OPT_PARAM*, Item**))[0x55b5f1c758c3]
            sql/opt_range.cc:2656(SQL_SELECT::test_quick_select(THD*, Bitmap<64u>, unsigned long long, unsigned long long, bool, bool, bool))[0x55b5f214c8e4]
            sql/sql_select.cc:4325(get_quick_record_count(THD*, SQL_SELECT*, TABLE*, Bitmap<64u> const*, unsigned long long))[0x55b5f1d43f5b]
            sql/sql_select.cc:4955(make_join_statistics(JOIN*, List<TABLE_LIST>&, st_dynamic_array*))[0x55b5f1d4644a]
            sql/sql_select.cc:1939(JOIN::optimize_inner())[0x55b5f1d3b90d]
            sql/sql_select.cc:1448(JOIN::optimize())[0x55b5f1d39be9]
            sql/sql_select.cc:4274(mysql_select(THD*, 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*))[0x55b5f1d43c89]
            sql/sql_select.cc:382(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55b5f1d3568c]
            sql/sql_parse.cc:4244(mysql_execute_command(THD*))[0x55b5f1cf77db]
            sql/sql_prepare.cc:4766(Prepared_statement::execute(String*, bool))[0x55b5f1d21cbf]
            sql/sql_prepare.cc:4194(Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*))[0x55b5f1d2009c]
            sql/sql_prepare.cc:3303(mysql_sql_stmt_execute(THD*))[0x55b5f1d1dccb]
            sql/sql_parse.cc:3789(mysql_execute_command(THD*))[0x55b5f1cf6539]
            sql/sql_parse.cc:8085(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55b5f1d03e85]
            sql/sql_parse.cc:1852(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55b5f1cf0f50]
            sql/sql_parse.cc:1395(do_command(THD*))[0x55b5f1cef96d]
            sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x55b5f1e5667f]
            sql/sql_connect.cc:1309(handle_one_connection)[0x55b5f1e563d0]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f81ecee56ba]
            x86_64/clone.S:111(clone)[0x7f81ec37a41d]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f8180015d00): CREATE TEMPORARY TABLE `ps` AS SELECT STDDEV( `col_datetime_nokey` ) AS field1 FROM `view_CC` WHERE -2595762235225669632 != `col_time_key`
            Connection ID (thread ID): 15
            Status: NOT_KILLED
            {noformat}
            {code:sql}
            set optimizer_use_condition_selectivity=3;
            create table t1 (it time not null);
            INSERT INTO t1 VALUES ('07:25:13'),('05:15:55'),('09:58:01'),('04:23:57'),('19:37:28'),('01:38:05'),('20:50:52');

            SELECT 1 FROM t1 WHERE it < -7487797330456870912;
            {code}

            {noformat}
            Thread 1 (Thread 0x7f845821d700 (LWP 11636)):
            #0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
            #1 0x000055e1bf3f1d18 in my_write_core (sig=6) at /10.4/mysys/stacktrace.c:481
            #2 0x000055e1bec4b147 in handle_fatal_signal (sig=6) at /10.4/sql/signal_handler.cc:305
            #3 <signal handler called>
            #4 0x00007f845f4ce428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
            #5 0x00007f845f4d002a in __GI_abort () at abort.c:89
            #6 0x00007f845f4c6bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55e1bf618118 "!t->fraction_remainder(decimals())", file=file@entry=0x55e1bf6179e8 "/10.4/sql/field.cc", line=line@entry=5700, function=function@entry=0x55e1bf61b000 <Field_time::store_TIME_with_warning(Time const*, ErrConv const*, int)::__PRETTY_FUNCTION__> "int Field_time::store_TIME_with_warning(const Time*, const ErrConv*, int)") at assert.c:92
            #7 0x00007f845f4c6c82 in __GI___assert_fail (assertion=0x55e1bf618118 "!t->fraction_remainder(decimals())", file=0x55e1bf6179e8 "/10.4/sql/field.cc", line=5700, function=0x55e1bf61b000 <Field_time::store_TIME_with_warning(Time const*, ErrConv const*, int)::__PRETTY_FUNCTION__> "int Field_time::store_TIME_with_warning(const Time*, const ErrConv*, int)") at assert.c:101
            #8 0x000055e1bec253fe in Field_time::store_TIME_with_warning (this=0x7f840c042298, t=0x7f845821a340, str=0x7f845821a370, warn=2) at /10.4/sql/field.cc:5700
            #9 0x000055e1bec2598e in Field_time::store (this=0x7f840c042298, nr=-7487797330456870912, unsigned_val=false) at /10.4/sql/field.cc:5750
            #10 0x000055e1bec76a57 in save_int_value_in_field (field=0x7f840c042298, nr=-7487797330456870912, null_value=false, unsigned_flag=false) at /10.4/sql/item.cc:6671
            #11 0x000055e1bec76ab6 in Item_int::save_in_field (this=0x7f840c015c00, field=0x7f840c042298, no_conversions=true) at /10.4/sql/item.cc:6677
            #12 0x000055e1bec672f2 in Item::save_in_field_no_warnings (this=0x7f840c015c00, field=0x7f840c042298, no_conversions=true) at /10.4/sql/item.cc:1381
            #13 0x000055e1bedba555 in Field_temporal::get_mm_leaf (this=0x7f840c042298, prm=0x7f845821abb0, key_part=0x7f840c134118, cond=0x7f840c015c90, op=SCALAR_CMP_LT, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:8211
            #14 0x000055e1bedb9feb in Item_bool_func::get_mm_leaf (this=0x7f840c015c90, param=0x7f845821abb0, field=0x7f840c042298, key_part=0x7f840c134118, functype=Item_func::LT_FUNC, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:8135
            #15 0x000055e1bedb94bc in Item_bool_func::get_mm_parts (this=0x7f840c015c90, param=0x7f845821abb0, field=0x7f840c042298, type=Item_func::LT_FUNC, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:7969
            #16 0x000055e1be8d574f in Item_bool_func2_with_rev::get_func_mm_tree (this=0x7f840c015c90, param=0x7f845821abb0, field=0x7f840c042298, value=0x7f840c015c00) at /10.4/sql/item_cmpfunc.h:461
            #17 0x000055e1bedb838f in Item_bool_func::get_full_func_mm_tree (this=0x7f840c015c90, param=0x7f845821abb0, field_item=0x7f840c015ad8, value=0x7f840c015c00) at /10.4/sql/opt_range.cc:7648
            #18 0x000055e1be8d5458 in Item_bool_func::get_full_func_mm_tree_for_args (this=0x7f840c015c90, param=0x7f845821abb0, item=0x7f840c015ad8, value=0x7f840c015c00) at /10.4/sql/item_cmpfunc.h:202
            #19 0x000055e1be8d5888 in Item_bool_func2_with_rev::get_mm_tree (this=0x7f840c015c90, param=0x7f845821abb0, cond_ptr=0x7f840c016a90) at /10.4/sql/item_cmpfunc.h:489
            #20 0x000055e1bedadd45 in calculate_cond_selectivity_for_table (thd=0x7f840c000b00, table=0x7f840c12d430, cond=0x7f840c016a90) at /10.4/sql/opt_range.cc:3168
            #21 0x000055e1be9a6585 in make_join_statistics (join=0x7f840c016688, tables_list=..., keyuse_array=0x7f840c016978) at /10.4/sql/sql_select.cc:4972
            #22 0x000055e1be99b90d in JOIN::optimize_inner (this=0x7f840c016688) at /10.4/sql/sql_select.cc:1939
            #23 0x000055e1be999be9 in JOIN::optimize (this=0x7f840c016688) at /10.4/sql/sql_select.cc:1448
            #24 0x000055e1be9a3c89 in mysql_select (thd=0x7f840c000b00, tables=0x7f840c015470, wild_num=0, fields=..., conds=0x7f840c015c90, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f840c016660, unit=0x7f840c0049b0, select_lex=0x7f840c014f60) at /10.4/sql/sql_select.cc:4274
            #25 0x000055e1be99568c in handle_select (thd=0x7f840c000b00, lex=0x7f840c0048e8, result=0x7f840c016660, setup_tables_done_option=0) at /10.4/sql/sql_select.cc:382
            #26 0x000055e1be96009d in execute_sqlcom_select (thd=0x7f840c000b00, all_tables=0x7f840c015470) at /10.4/sql/sql_parse.cc:6550
            #27 0x000055e1be9564f4 in mysql_execute_command (thd=0x7f840c000b00) at /10.4/sql/sql_parse.cc:3772
            #28 0x000055e1be963e85 in mysql_parse (thd=0x7f840c000b00, rawbuf=0x7f840c014e98 "SELECT 1 FROM t1 WHERE it < -7487797330456870912", length=48, parser_state=0x7f845821c470, is_com_multi=false, is_next_command=false) at /10.4/sql/sql_parse.cc:8085
            #29 0x000055e1be950f50 in dispatch_command (command=COM_QUERY, thd=0x7f840c000b00, packet=0x7f840c179421 "SELECT 1 FROM t1 WHERE it < -7487797330456870912", packet_length=48, is_com_multi=false, is_next_command=false) at /10.4/sql/sql_parse.cc:1850
            #30 0x000055e1be94f96d in do_command (thd=0x7f840c000b00) at /10.4/sql/sql_parse.cc:1395
            #31 0x000055e1beab667f in do_handle_one_connection (connect=0x55e1c28daec0) at /10.4/sql/sql_connect.cc:1402
            #32 0x000055e1beab63d0 in handle_one_connection (arg=0x55e1c28daec0) at /10.4/sql/sql_connect.cc:1308
            #33 0x000055e1bf38222a in pfs_spawn_thread (arg=0x55e1c28e1ea0) at /10.4/storage/perfschema/pfs.cc:1862
            #34 0x00007f846010b6ba in start_thread (arg=0x7f845821d700) at pthread_create.c:333
            #35 0x00007f845f5a041d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
            {noformat}
            alice Alice Sherepa made changes -
            Fix Version/s 10.4 [ 22408 ]
            alice Alice Sherepa made changes -
            Summary [draft] Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning Assertion `!t->fraction_remainder(decimals())' failed in Field_time::store_TIME_with_warning
            alice Alice Sherepa made changes -
            Assignee Alice Sherepa [ alice ] Alexander Barkov [ bar ]
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            bar Alexander Barkov made changes -
            Status Confirmed [ 10101 ] In Progress [ 3 ]
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2018-09-26 16:15:58.0 2018-09-26 16:15:58.371
            bar Alexander Barkov made changes -
            Component/s Data types [ 13906 ]
            Component/s Temporal Types [ 11000 ]
            Fix Version/s 10.4.0 [ 23115 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 89636 ] MariaDB v4 [ 154945 ]

            People

              bar Alexander Barkov
              alice Alice Sherepa
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.