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

Server crashes in Item_func_nextval::val_int after select from view

    XMLWordPrintable

    Details

      Description

      --source include/have_sequence.inc
       
      CREATE SEQUENCE s1;
      CREATE table t1 (a int default next value for s1, b int);
      INSERT into t1 values (1,1),(2,2),(3,3);
       
      create view v1 as select default(a) from t1;
      select * from v1;
      

      bb-10.3-release a0d4f0f306c6e478a1f45727e

      220523 12:54:31 [ERROR] mysqld got signal 11 ;
       
      Server version: 10.3.35-MariaDB-debug-log
       
      sql/signal_handler.cc:221(handle_fatal_signal)[0x555b935db197]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f2d37874730]
      sql/item_func.cc:6797(Item_func_nextval::val_int())[0x555b9376e033]
      sql/item.cc:7002(Item::save_int_in_field(Field*, bool))[0x555b9365e5f1]
      sql/sql_type.cc:2592(Type_handler_int_result::Item_save_in_field(Item*, Field*, bool) const)[0x555b9336a49e]
      sql/item.cc:7012(Item::save_in_field(Field*, bool))[0x555b9365e7cf]
      sql/field.cc:2425(Field::set_default())[0x555b9352cba6]
      sql/item.cc:9544(Item_default_value::calculate())[0x555b93677678]
      sql/item.cc:9580(Item_default_value::send(Protocol*, st_value*))[0x555b93677864]
      sql/item.cc:8389(Item_ref::send(Protocol*, st_value*))[0x555b9366a59b]
      sql/item.cc:9115(Item_direct_view_ref::send(Protocol*, st_value*))[0x555b93673d8d]
      sql/protocol.cc:1000(Protocol::send_result_set_row(List<Item>*))[0x555b92b74334]
      sql/sql_class.cc:3049(select_send::send_data(List<Item>&))[0x555b92d1fbed]
      sql/sql_select.cc:21071(end_send(JOIN*, st_join_table*, bool))[0x555b92f78ee8]
      sql/sql_select.cc:20112(evaluate_join_record(JOIN*, st_join_table*, int))[0x555b92f70686]
      sql/sql_select.cc:19885(sub_select(JOIN*, st_join_table*, bool))[0x555b92f6ee1d]
      sql/sql_select.cc:19423(do_select(JOIN*, Procedure*))[0x555b92f6c801]
      sql/sql_select.cc:4151(JOIN::exec_inner())[0x555b92efbfda]
      sql/sql_select.cc:3946(JOIN::exec())[0x555b92ef99b2]
      sql/sql_select.cc:4356(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*))[0x555b92efd2fe]
      sql/sql_select.cc:372(handle_select(THD*, LEX*, select_result*, unsigned long))[0x555b92ed3822]
      sql/sql_parse.cc:6339(execute_sqlcom_select(THD*, TABLE_LIST*))[0x555b92e3e7ea]
      sql/sql_parse.cc:3870(mysql_execute_command(THD*))[0x555b92e2c7ef]
      sql/sql_parse.cc:7870(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x555b92e488d9]
      sql/sql_parse.cc:1855(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x555b92e1f07c]
      sql/sql_parse.cc:1398(do_command(THD*))[0x555b92e1b7c3]
      sql/sql_connect.cc:1403(do_handle_one_connection(CONNECT*))[0x555b93215ac6]
      sql/sql_connect.cc:1309(handle_one_connection)[0x555b9321537e]
      perfschema/pfs.cc:1871(pfs_spawn_thread)[0x555b949902d5]
      nptl/pthread_create.c:487(start_thread)[0x7f2d37869fa3]
      x86_64/clone.S:97(clone)[0x7f2d3779aeff]
       
      Query (0x62b000000290): select * from v1
      

        Attachments

          Activity

            People

            Assignee:
            monty Michael Widenius
            Reporter:
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.