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

Assertion `item1->type() == Item::FIELD_ITEM && item2->type() == Item::FIELD_ITEM' failed in compare_order_elements function

    Details

      Description

      --source include/have_innodb.inc
      CREATE TABLE t (a1 int) engine=innodb ;
       
      SELECT  BIT_OR(`a1`) OVER (ORDER BY 1), ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4))) FROM t;
      

      mysqld: /home/alice/git/10.3/sql/sql_window.cc:421: int compare_order_elements(ORDER*, ORDER*): Assertion `item1->type() == Item::FIELD_ITEM && item2->type() == Item::FIELD_ITEM' failed.
      180410 13:50:38 [ERROR] mysqld got signal 6 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
       
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
       
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed, 
      something is definitely wrong and this may fail.
       
      Server version: 10.3.6-MariaDB-debug-log
      key_buffer_size=1048576
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=7
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63321 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x62a000090208
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f60d2cdbdf0 thread_stack 0x49000
      /usr/lib/x86_64-linux-gnu/libasan.so.2(+0x4a077)[0x7f60e9e4c077]
      mysys/stacktrace.c:269(my_print_stacktrace)[0x5584dac89dc0]
      sql/signal_handler.cc:168(handle_fatal_signal)[0x5584d9bcc88b]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f60e939e390]
      linux/raise.c:54(__GI_raise)[0x7f60e8757428]
      stdlib/abort.c:91(__GI_abort)[0x7f60e875902a]
      assert/assert.c:92(__assert_fail_base)[0x7f60e874fbd7]
      /lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7f60e874fc82]
      sql/sql_window.cc:422(compare_order_elements(st_order*, st_order*))[0x5584d998fcc9]
      sql/sql_window.cc:445(compare_order_lists(SQL_I_List<st_order>*, SQL_I_List<st_order>*))[0x5584d998ffb8]
      sql/sql_window.cc:571(compare_window_funcs_by_window_specs(Item_window_func*, Item_window_func*, void*))[0x5584d9990973]
      sql/sql_list.h:581(void bubble_sort<Item_window_func>(List<Item_window_func>*, int (*)(Item_window_func*, Item_window_func*, void*), void*))[0x5584d999dd42]
      sql/sql_window.cc:645(order_window_funcs_by_window_specs(List<Item_window_func>*))[0x5584d9990f0e]
      sql/sql_window.cc:3028(Window_funcs_computation::setup(THD*, List<Item_window_func>*, st_join_table*))[0x5584d9995794]
      sql/sql_select.cc:3252(JOIN::make_aggr_tables_info())[0x5584d95bc72d]
      sql/sql_select.cc:2577(JOIN::optimize_stage2())[0x5584d95b596e]
      sql/sql_select.cc:1895(JOIN::optimize_inner())[0x5584d95aefda]
      sql/sql_select.cc:1467(JOIN::optimize())[0x5584d95ab172]
      sql/sql_select.cc:4174(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*))[0x5584d95c4bdb]
      sql/sql_select.cc:382(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5584d95a04be]
      sql/sql_parse.cc:6556(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5584d9526e28]
      sql/sql_parse.cc:3770(mysql_execute_command(THD*))[0x5584d95152fe]
      sql/sql_parse.cc:8013(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5584d952eed8]
      sql/sql_parse.cc:1844(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5584d9509e1a]
      sql/sql_parse.cc:1387(do_command(THD*))[0x5584d9506fc1]
      sql/sql_connect.cc:1402(do_handle_one_connection(CONNECT*))[0x5584d9854cc8]
      sql/sql_connect.cc:1309(handle_one_connection)[0x5584d98546d0]
      perfschema/pfs.cc:1864(pfs_spawn_thread)[0x5584da1169a9]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f60e93946ba]
      x86_64/clone.S:111(clone)[0x7f60e882941d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x61100007d2e0): SELECT  BIT_OR(`a1`) OVER (ORDER BY 1), ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4))) FROM t
      Connection ID (thread ID): 9
      Status: NOT_KILLED
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                varun Varun Gupta
                Reporter:
                alice Alice Sherepa
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: