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

Galera: 10.4 node crashed with Assertion `client_state.transaction().active()` after altering SEQUENCE table's engine to myisam and back to innodb

    XMLWordPrintable

Details

    Description

      Did Rolling Upgrade with 5 nodes upgraded 10.3 -> 104.
      Then run following SQLs to get crash:

      CREATE SEQUENCE Seq1_1     START WITH 1     INCREMENT BY 1;
      select NEXT VALUE FOR Seq1_1;
      alter table Seq1_1 engine=myisam;
      select NEXT VALUE FOR Seq1_1;
      alter table Seq1_1 engine=innodb;
      select NEXT VALUE FOR Seq1_1;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      

      Failed with:

      mysqld: /home/shako/Galera_Tests/MariaDB/sql/service_wsrep.cc:249: int wsrep_thd_append_key(THD*, const wsrep_key*, int, Wsrep_service_key_type): Assertion `client_state.transaction().
      active()' failed.
      sql/service_wsrep.cc:250(wsrep_thd_append_key)[0x562720e54d0e]
      handler/ha_innodb.cc:10456(wsrep_append_key(THD*, trx_t*, TABLE_SHARE*, char const*, unsigned short, Wsrep_service_key_type))[0x562721161a28]
      handler/ha_innodb.cc:10659(ha_innobase::wsrep_append_keys(THD*, Wsrep_service_key_type, unsigned char const*, unsigned char const*))[0x5627211625f7]
      handler/ha_innodb.cc:8975(ha_innobase::update_row(unsigned char const*, unsigned char const*))[0x56272115e213]
      sql/handler.cc:6782(handler::update_first_row(unsigned char*))[0x562720f3e312]
      sql/ha_sequence.cc:258(ha_sequence::write_row(unsigned char*))[0x5627216c4cef]
      sql/handler.cc:6702(handler::ha_write_row(unsigned char*))[0x562720f3dc78]
      sql/sql_sequence.cc:641(sequence_definition::write(TABLE*, bool))[0x562720e17c21]
      sql/sql_sequence.cc:748(SEQUENCE::next_value(TABLE*, bool, int*))[0x562720e17f8e]
      sql/item_func.cc:6676(Item_func_nextval::val_int())[0x562720fc5394]
      sql/sql_type.cc:6684(Type_handler::Item_send_longlong(Item*, Protocol*, st_value*) const)[0x562720df6dcb]
      sql/sql_type.h:4839(Type_handler_longlong::Item_send(Item*, Protocol*, st_value*) const)[0x562720e02592]
      /home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(+0x66abb4)[0x562720acfbb4]
      /home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(_ZN8Protocol19send_result_set_rowEP4ListI4ItemE+0xcb)[0x562720aca1e9]
      /home/shako/Galera_Tests/dbs/maria_10.4/bin/mysqld(_ZN11select_send9send_dataER4ListI4ItemE+0xe2)[0x562720b78c04]
      sql/item.h:1034(Item::send(Protocol*, st_value*))[0x562720c3897e]
      sql/protocol.cc:1021(Protocol::send_result_set_row(List<Item>*))[0x562720c38296]
      sql/sql_class.cc:2999(select_send::send_data(List<Item>&))[0x562720c3993d]
      sql/sql_select.cc:4231(JOIN::exec_inner())[0x562720c29f67]
      sql/sql_select.cc:4147(JOIN::exec())[0x562720bf3347]
      sql/sql_select.cc:4580(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_se:
      sql/sql_select.cc:412(handle_select(THD*, LEX*, select_result*, unsigned long))[0x562720bf726a]
      sql/sql_parse.cc:6646(execute_sqlcom_select(THD*, TABLE_LIST*))[0x562720bf68e0]
      sql/sql_parse.cc:3883(mysql_execute_command(THD*))[0x562720be2414]
      sql/sql_parse.cc:8199(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x562720be0d2d]
      sql/sql_parse.cc:8022(wsrep_mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x562720d596b1]
      sql/sql_parse.cc:1813(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x562720d59415]
      nptl/pthread_create.c:463(start_thread)[0x7f558b93e6db]
      x86_64/clone.S:97(clone)[0x7f558ab2488f]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f54c001c748): select NEXT VALUE FOR Seq1_1
      

      Attachments

        1. mdev_18848.cnf
          0.5 kB
          Shahriyar Rzayev
        2. mdev_18848.test
          0.7 kB
          Shahriyar Rzayev

        Activity

          People

            jplindst Jan Lindström (Inactive)
            shako Shahriyar Rzayev (Inactive)
            Votes:
            1 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.