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

Server crashes in check_view_single_update or Assertion `derived->table' failed in mysql_derived_merge_for_insert

    XMLWordPrintable

Details

    Description

      CREATE TABLE t (a INT);
      CREATE ALGORITHM = MERGE VIEW v1 AS SELECT t2.a FROM t AS t1, t AS t2;
      CREATE ALGORITHM = MERGE VIEW v2 AS SELECT * FROM v1;
      PREPARE stmt FROM 'REPLACE INTO v2 SELECT a FROM t';
      EXECUTE stmt;
      

      5.5 e0f48e5ce9

      #3  <signal handler called>
      #4  0x00000000005e4c50 in check_view_single_update (fields=..., values=0x0, view=0x7f800f576480, map=0x7f801691e0f8, insert=true) at /data/src/5.5/sql/sql_insert.cc:155
      #5  0x00000000005e50f5 in check_insert_fields (thd=0x7f8010674060, table_list=0x7f800f576480, fields=..., values=..., check_unique=false, fields_and_values_from_different_maps=true, map=0x7f801691e0f8) at /data/src/5.5/sql/sql_insert.cc:276
      #6  0x00000000005ec71f in select_insert::prepare (this=0x7f800f5488c8, values=..., u=0x7f800f575130) at /data/src/5.5/sql/sql_insert.cc:3374
      #7  0x000000000063228d in JOIN::prepare (this=0x7f800f548960, rref_pointer_array=0x7f800f575a80, tables_init=0x7f800f572078, wild_num=0, conds_init=0x0, og_num=0, order_init=0x0, skip_order_by=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x7f800f575810, unit_arg=0x7f800f575130) at /data/src/5.5/sql/sql_select.cc:904
      #8  0x0000000000639cd0 in mysql_select (thd=0x7f8010674060, rref_pointer_array=0x7f800f575a80, tables=0x7f800f572078, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=3489925888, result=0x7f800f5488c8, unit=0x7f800f575130, select_lex=0x7f800f575810) at /data/src/5.5/sql/sql_select.cc:3074
      #9  0x0000000000630670 in handle_select (thd=0x7f8010674060, lex=0x7f800f575080, result=0x7f800f5488c8, setup_tables_done_option=1073741824) at /data/src/5.5/sql/sql_select.cc:319
      #10 0x0000000000604ec0 in mysql_execute_command (thd=0x7f8010674060) at /data/src/5.5/sql/sql_parse.cc:3060
      #11 0x0000000000623d73 in Prepared_statement::execute (this=0x7f800f588460, expanded_query=0x7f801691eda0, open_cursor=false) at /data/src/5.5/sql/sql_prepare.cc:3930
      #12 0x0000000000622e87 in Prepared_statement::execute_loop (this=0x7f800f588460, expanded_query=0x7f801691eda0, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/5.5/sql/sql_prepare.cc:3589
      #13 0x0000000000620fa5 in mysql_sql_stmt_execute (thd=0x7f8010674060) at /data/src/5.5/sql/sql_prepare.cc:2738
      #14 0x0000000000602f56 in mysql_execute_command (thd=0x7f8010674060) at /data/src/5.5/sql/sql_parse.cc:2244
      #15 0x000000000060c7a2 in mysql_parse (thd=0x7f8010674060, rawbuf=0x7f800f548078 "EXECUTE stmt", length=12, parser_state=0x7f801691f650) at /data/src/5.5/sql/sql_parse.cc:5934
      #16 0x00000000006004b7 in dispatch_command (command=COM_QUERY, thd=0x7f8010674060, packet=0x7f801134e061 "EXECUTE stmt", packet_length=12) at /data/src/5.5/sql/sql_parse.cc:1079
      #17 0x00000000005ff671 in do_command (thd=0x7f8010674060) at /data/src/5.5/sql/sql_parse.cc:793
      #18 0x0000000000701879 in do_handle_one_connection (thd_arg=0x7f8010674060) at /data/src/5.5/sql/sql_connect.cc:1270
      #19 0x0000000000701606 in handle_one_connection (arg=0x7f8010674060) at /data/src/5.5/sql/sql_connect.cc:1186
      #20 0x0000000000943ad5 in pfs_spawn_thread (arg=0x7f801137a300) at /data/src/5.5/storage/perfschema/pfs.cc:1015
      #21 0x00007f801655c0a4 in start_thread (arg=0x7f8016920700) at pthread_create.c:309
      #22 0x00007f801498287d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      10.0 9741e0ea72

      mysqld: /data/src/10.0/sql/sql_derived.cc:534: bool mysql_derived_merge_for_insert(THD*, LEX*, TABLE_LIST*): Assertion `derived->table' failed.
      161105  0:04:29 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fd2f4a6d312 in __GI___assert_fail (assertion=0xe92fd5 "derived->table", file=0xe92e80 "/data/src/10.0/sql/sql_derived.cc", line=534, function=0xe931e0 <mysql_derived_merge_for_insert(THD*, LEX*, TABLE_LIST*)::__PRETTY_FUNCTION__> "bool mysql_derived_merge_for_insert(THD*, LEX*, TABLE_LIST*)") at assert.c:101
      #8  0x0000000000620e6a in mysql_derived_merge_for_insert (thd=0x7fd2effdd070, lex=0x7fd2ed359090, derived=0x7fd2ed35a558) at /data/src/10.0/sql/sql_derived.cc:534
      #9  0x0000000000620521 in mysql_handle_single_derived (lex=0x7fd2ed359090, derived=0x7fd2ed35a558, phases=16) at /data/src/10.0/sql/sql_derived.cc:195
      #10 0x000000000072e659 in TABLE_LIST::handle_derived (this=0x7fd2ed35a558, lex=0x7fd2ed359090, phases=16) at /data/src/10.0/sql/table.cc:6909
      #11 0x000000000062aebd in mysql_prepare_insert (thd=0x7fd2effdd070, table_list=0x7fd2ed35a558, table=0x0, fields=..., values=0x0, update_fields=..., update_values=..., duplic=DUP_REPLACE, where=0x7fd2ed3598f0, select_insert=true, check_fields=false, abort_on_warning=false) at /data/src/10.0/sql/sql_insert.cc:1384
      #12 0x000000000062fc98 in mysql_insert_select_prepare (thd=0x7fd2effdd070) at /data/src/10.0/sql/sql_insert.cc:3334
      #13 0x0000000000665f1e in mysql_insert_select_prepare_tester (thd=0x7fd2effdd070) at /data/src/10.0/sql/sql_prepare.cc:1948
      #14 0x00000000006658c9 in select_like_stmt_test (stmt=0x7fd2ed106470, specific_prepare=0x665eaa <mysql_insert_select_prepare_tester(THD*)>, setup_tables_done_option=1073741824) at /data/src/10.0/sql/sql_prepare.cc:1703
      #15 0x00000000006659e8 in select_like_stmt_test_with_open (stmt=0x7fd2ed106470, tables=0x7fd2ed35a558, specific_prepare=0x665eaa <mysql_insert_select_prepare_tester(THD*)>, setup_tables_done_option=1073741824) at /data/src/10.0/sql/sql_prepare.cc:1747
      #16 0x0000000000665fd8 in mysql_test_insert_select (stmt=0x7fd2ed106470, tables=0x7fd2ed35a558) at /data/src/10.0/sql/sql_prepare.cc:1987
      #17 0x00000000006665f9 in check_prepared_statement (stmt=0x7fd2ed106470) at /data/src/10.0/sql/sql_prepare.cc:2171
      #18 0x00000000006690af in Prepared_statement::prepare (this=0x7fd2ed106470, packet=0x7fd2ed1a4190 "REPLACE INTO v2 SELECT a FROM t", packet_len=31) at /data/src/10.0/sql/sql_prepare.cc:3428
      #19 0x0000000000666e98 in mysql_sql_stmt_prepare (thd=0x7fd2effdd070) at /data/src/10.0/sql/sql_prepare.cc:2497
      #20 0x00000000006479fc in mysql_execute_command (thd=0x7fd2effdd070) at /data/src/10.0/sql/sql_parse.cc:2568
      #21 0x0000000000652122 in mysql_parse (thd=0x7fd2effdd070, rawbuf=0x7fd2ed1a4088 "PREPARE stmt FROM 'REPLACE INTO v2 SELECT a FROM t'", length=51, parser_state=0x7fd2f6d32650) at /data/src/10.0/sql/sql_parse.cc:6570
      #22 0x0000000000644c38 in dispatch_command (command=COM_QUERY, thd=0x7fd2effdd070, packet=0x7fd2effd3071 "PREPARE stmt FROM 'REPLACE INTO v2 SELECT a FROM t'", packet_length=51) at /data/src/10.0/sql/sql_parse.cc:1309
      #23 0x0000000000643efb in do_command (thd=0x7fd2effdd070) at /data/src/10.0/sql/sql_parse.cc:999
      #24 0x00000000007622e6 in do_handle_one_connection (thd_arg=0x7fd2effdd070) at /data/src/10.0/sql/sql_connect.cc:1378
      #25 0x0000000000762058 in handle_one_connection (arg=0x7fd2effdd070) at /data/src/10.0/sql/sql_connect.cc:1293
      #26 0x00000000009fb360 in pfs_spawn_thread (arg=0x7fd2ee991370) at /data/src/10.0/storage/perfschema/pfs.cc:1860
      #27 0x00007fd2f696f0a4 in start_thread (arg=0x7fd2f6d33700) at pthread_create.c:309
      #28 0x00007fd2f4b2787d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.