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

Assertion marked_for_write_or_computed fails on slave upon replicating ALTER

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.4, 10.5, 10.6, 10.9, 10.10, 10.11, 11.0, 11.1
    • 10.4, 10.5, 10.6, 10.11, 11.1
    • Replication
    • None

    Description

      The CHECK which is being added has a wrong parameter for CONVERT_TZ ('0'), although the original ALTER doesn't recognize that. However, apparently it upsets replication.

      --source include/master-slave.inc
       
      CREATE TABLE t (d INT);
      INSERT INTO t VALUES (1),(2);
       
      ALTER TABLE t ADD CONSTRAINT CHECK(CONVERT_TZ('2012-12-12 00:00:00', '0', '+00:00'));
       
      --sync_slave_with_master
       
      # Cleanup
      --connection master
      DROP TABLE t;
      --source include/rpl_end.inc
      

      10.4 9856bb42

      mysqld: /data/src/10.4/sql/field.cc:4261: virtual int Field_long::store(longlong, bool): Assertion `marked_for_write_or_computed()' failed.
      230712 11:34:22 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f9254853df2 in __GI___assert_fail (assertion=0x55c7dfb949e0 "marked_for_write_or_computed()", file=0x55c7dfb93960 "/data/src/10.4/sql/field.cc", line=4261, function=0x55c7dfb96a60 "virtual int Field_long::store(longlong, bool)") at ./assert/assert.c:101
      #10 0x000055c7ddee9cad in Field_long::store (this=0x619000115de8, nr=2, unsigned_val=false) at /data/src/10.4/sql/field.cc:4261
      #11 0x000055c7ddf494a1 in Field::do_field_int (copy=0x62b000104aa8) at /data/src/10.4/sql/field_conv.cc:403
      #12 0x000055c7ddf47a61 in do_copy_null (copy=0x62b000104aa8) at /data/src/10.4/sql/field_conv.cc:246
      #13 0x000055c7dda4f7b5 in copy_data_between_tables (thd=0x62b0000fc208, from=0x620000041088, to=0x620000042088, create=..., ignore=false, order_num=0, order=0x0, copied=0x7f923f7eaf90, deleted=0x7f923f7eafb0, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x7f923f7ec4e0) at /data/src/10.4/sql/sql_table.cc:11096
      #14 0x000055c7dda4aeb1 in mysql_alter_table (thd=0x62b0000fc208, new_db=0x62b000100a10, new_name=0x62b000100e68, create_info=0x7f923f7ee0d0, table_list=0x62b0001032f0, recreate_info=0x7f923f7edf30, alter_info=0x7f923f7edfd0, order_num=0, order=0x0, ignore=false) at /data/src/10.4/sql/sql_table.cc:10551
      #15 0x000055c7ddbd0e3a in Sql_cmd_alter_table::execute (this=0x62b000103eb8, thd=0x62b0000fc208) at /data/src/10.4/sql/sql_alter.cc:531
      #16 0x000055c7dd7dad15 in mysql_execute_command (thd=0x62b0000fc208) at /data/src/10.4/sql/sql_parse.cc:6216
      #17 0x000055c7dd7e6517 in mysql_parse (thd=0x62b0000fc208, rawbuf=0x611000091cd3 "ALTER TABLE t ADD CONSTRAINT CHECK(CONVERT_TZ('2012-12-12 00:00:00', '0', '+00:00'))", length=84, parser_state=0x7f923f7f0520, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:8008
      #18 0x000055c7de2ad1af in Query_log_event::do_apply_event (this=0x6120000a0e48, rgi=0x61d0002af880, query_arg=0x611000091cd3 "ALTER TABLE t ADD CONSTRAINT CHECK(CONVERT_TZ('2012-12-12 00:00:00', '0', '+00:00'))", q_len_arg=84) at /data/src/10.4/sql/log_event.cc:5744
      #19 0x000055c7de2aa38d in Query_log_event::do_apply_event (this=0x6120000a0e48, rgi=0x61d0002af880) at /data/src/10.4/sql/log_event.cc:5422
      #20 0x000055c7dd56e808 in Log_event::apply_event (this=0x6120000a0e48, rgi=0x61d0002af880) at /data/src/10.4/sql/log_event.h:1492
      #21 0x000055c7dd54eb1f in apply_event_and_update_pos_apply (ev=0x6120000a0e48, thd=0x62b0000fc208, rgi=0x61d0002af880, reason=0) at /data/src/10.4/sql/slave.cc:3809
      #22 0x000055c7dd54f65d in apply_event_and_update_pos (ev=0x6120000a0e48, thd=0x62b0000fc208, rgi=0x61d0002af880) at /data/src/10.4/sql/slave.cc:3971
      #23 0x000055c7dd550ff6 in exec_relay_log_event (thd=0x62b0000fc208, rli=0x62a000055ec8, serial_rgi=0x61d0002af880) at /data/src/10.4/sql/slave.cc:4317
      #24 0x000055c7dd558ce9 in handle_slave_sql (arg=0x62a000054200) at /data/src/10.4/sql/slave.cc:5503
      #25 0x000055c7de825f28 in pfs_spawn_thread (arg=0x615000041088) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #26 0x00007f92548a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #27 0x00007f92549285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Reproducible on all existing versions, also on earlier releases.

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.