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

Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed upon SELECT with GROUP BY

    XMLWordPrintable

Details

    Description

      CREATE TABLE t1 (i INT, d DATETIME);
      INSERT INTO t1 VALUES (3,NULL),(3,'1976-12-14 13:21:07'),(NULL,'1981-09-24 01:04:47');
      SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i;
       
      # Cleanup
      DROP TABLE t1;
      

      10.1 328d7779bc

      mysqld: /data/src/10.1/sql/compat56.cc:256: void TIME_from_longlong_datetime_packed(MYSQL_TIME*, longlong): Assertion `tmp != ((long long) 0x8000000000000000LL)' failed.
      181128  0:53:06 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f1120b9fee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000559284da17b6 in TIME_from_longlong_datetime_packed (ltime=0x7f1122a06fc0, tmp=-9223372036854775808) at /data/src/10.1/sql/compat56.cc:256
      #9  0x0000559284db7fe8 in Field_datetimef::get_TIME (this=0x7f1117ca0240, ltime=0x7f1122a06fc0, pos=0x7f1117ca0311 "", fuzzydate=0) at /data/src/10.1/sql/field.cc:6818
      #10 0x0000559284dc8936 in Field_datetimef::get_date (this=0x7f1117ca0240, ltime=0x7f1122a06fc0, fuzzydate=0) at /data/src/10.1/sql/field.h:2751
      #11 0x0000559284db7c47 in Field_datetime_with_dec::val_str (this=0x7f1117ca0240, str=0x7f1117c44d58, unused=0x7f1117c44d58) at /data/src/10.1/sql/field.cc:6758
      #12 0x0000559284adf8fd in Field::val_str (this=0x7f1117ca0240, str=0x7f1117c44d58) at /data/src/10.1/sql/field.h:754
      #13 0x0000559284e92fa6 in Item_sum_hybrid::min_max_update_str_field (this=0x7f1117c436c8) at /data/src/10.1/sql/item_sum.cc:2539
      #14 0x0000559284e92eb2 in Item_sum_hybrid::update_field (this=0x7f1117c436c8) at /data/src/10.1/sql/item_sum.cc:2517
      #15 0x0000559284c0bda3 in update_tmptable_sum_func (func_ptr=0x7f1117c44d80, tmp_table=0x7f1117da7088) at /data/src/10.1/sql/sql_select.cc:23492
      #16 0x0000559284c033aa in end_update (join=0x7f1117c440b8, join_tab=0x7f1117c45a70, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:19929
      #17 0x0000559284c00206 in evaluate_join_record (join=0x7f1117c440b8, join_tab=0x7f1117c45728, error=0) at /data/src/10.1/sql/sql_select.cc:18702
      #18 0x0000559284bffcac in sub_select (join=0x7f1117c440b8, join_tab=0x7f1117c45728, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:18518
      #19 0x0000559284bff37b in do_select (join=0x7f1117c440b8, fields=0x0, table=0x7f1117da7088, procedure=0x0) at /data/src/10.1/sql/sql_select.cc:18134
      #20 0x0000559284bd7de0 in JOIN::exec_inner (this=0x7f1117c440b8) at /data/src/10.1/sql/sql_select.cc:2816
      #21 0x0000559284bd6e53 in JOIN::exec (this=0x7f1117c440b8) at /data/src/10.1/sql/sql_select.cc:2562
      #22 0x0000559284bda3e9 in mysql_select (thd=0x7f11198d5070, rref_pointer_array=0x7f11198d9550, tables=0x7f1117c43878, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f1117c43f80, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f1117c44098, unit=0x7f11198d8ba8, select_lex=0x7f11198d92a8) at /data/src/10.1/sql/sql_select.cc:3499
      #23 0x0000559284bcfaa2 in handle_select (thd=0x7f11198d5070, lex=0x7f11198d8ae0, result=0x7f1117c44098, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:388
      #24 0x0000559284b9f432 in execute_sqlcom_select (thd=0x7f11198d5070, all_tables=0x7f1117c43878) at /data/src/10.1/sql/sql_parse.cc:5949
      #25 0x0000559284b95806 in mysql_execute_command (thd=0x7f11198d5070) at /data/src/10.1/sql/sql_parse.cc:2994
      #26 0x0000559284ba3075 in mysql_parse (thd=0x7f11198d5070, rawbuf=0x7f1117c43088 "SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i", length=62, parser_state=0x7f1122a085e0) at /data/src/10.1/sql/sql_parse.cc:7467
      #27 0x0000559284b918c6 in dispatch_command (command=COM_QUERY, thd=0x7f11198d5070, packet=0x7f111c3f9071 "SELECT ExtractValue('foo','bar'), i, MIN(d) FROM t1 GROUP BY i", packet_length=62) at /data/src/10.1/sql/sql_parse.cc:1495
      #28 0x0000559284b9064b in do_command (thd=0x7f11198d5070) at /data/src/10.1/sql/sql_parse.cc:1124
      #29 0x0000559284ccb1aa in do_handle_one_connection (thd_arg=0x7f11198d5070) at /data/src/10.1/sql/sql_connect.cc:1330
      #30 0x0000559284ccaf0e in handle_one_connection (arg=0x7f11198d5070) at /data/src/10.1/sql/sql_connect.cc:1242
      #31 0x0000559285089238 in pfs_spawn_thread (arg=0x7f1120039ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1861
      #32 0x00007f1122688494 in start_thread (arg=0x7f1122a09b00) at pthread_create.c:333
      #33 0x00007f1120c5c93f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      The failure appeared on 10.1 tree with this commit:

      commit 0140bfac5e216bd7ba8ad324bd914d596bf59a1f
      Author: Sergei Golubchik
      Date:   Tue Oct 2 22:50:28 2018 +0200
       
          MDEV-16127 mroonga/storage.* tests fail with GCC 8
      

      Attachments

        Issue Links

          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.