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

    XMLWordPrintable

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

            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.