Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-4989

Debug build doesn't complain about changing the read-only innodb_track_changed_pages variable

    Details

      Description

      This leads to a crash if we try to create a table afterwords:

      sql:

      CREATE DATABASE test;
      USE test;
      SET @@GLOBAL.innodb_track_changed_pages=FALSE;
      CREATE TABLE t1(c1 INT,c2 CHAR,c3 INT,c4 CHAR KEY,c5 INT UNIQUE KEY,c6 FIXED(0,0)DEFAULT 3.141592);
      

      gdb:

      gdb) bt
      +bt
      #0  0x00007ff6295c5a01 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x000000000189e77f in my_write_core (sig=6) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/mysys/stacktrace.c:249
      #2  0x0000000001618601 in handle_fatal_signal (sig=6) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/signal_handler.cc:223
      #3  <signal handler called>
      #4  0x00007ff6276c9277 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00007ff6276ca968 in __GI_abort () at abort.c:90
      #6  0x0000000001c2e24e in ut_dbg_assertion_failed (expr=0x228d2bf "tracked_lsn > 0", file=0x228d050 "/home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/log/log0log.cc", line=574) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/ut/ut0dbg.cc:67
      #7  0x0000000001a8030f in log_close () at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/log/log0log.cc:574
      #8  0x0000000001aa7dc3 in mtr_t::Command::finish_write (this=0x7ff629bb6b60, len=26) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/mtr/mtr0mtr.cc:912
      #9  0x0000000001aa7f28 in mtr_t::Command::execute (this=0x7ff629bb6b60) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/mtr/mtr0mtr.cc:959
      #10 0x0000000001aa6a96 in mtr_t::commit (this=0x7ff629bb6bf0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/mtr/mtr0mtr.cc:576
      #11 0x0000000001d417c3 in fsp_fill_free_list (init_space=true, space=0x7ff5e94ea618, header=0x7ff610cac026 "", mtr=0x7ff629bb72e0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/fsp/fsp0fsp.cc:1843
      #12 0x0000000001d40105 in fsp_header_init (space_id=23, size=4, mtr=0x7ff629bb72e0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/fsp/fsp0fsp.cc:1235
      #13 0x0000000001cd0b3b in dict_build_tablespace_for_table (table=0x7ff5e94ea320, node=0x7ff5e94929a0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/dict/dict0crea.cc:565
      #14 0x0000000001cd0235 in dict_build_table_def_step (thr=0x7ff5e94db318, node=0x7ff5e94929a0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/dict/dict0crea.cc:373
      #15 0x0000000001cd2e87 in dict_create_table_step (thr=0x7ff5e94db318) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/dict/dict0crea.cc:1475
      #16 0x0000000001af3413 in que_thr_step (thr=0x7ff5e94db318) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/que/que0que.cc:1063
      #17 0x0000000001af35a8 in que_run_threads_low (thr=0x7ff5e94db318) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/que/que0que.cc:1117
      #18 0x0000000001af375e in que_run_threads (thr=0x7ff5e94db318) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/que/que0que.cc:1157
      #19 0x0000000001b4d573 in row_create_table_for_mysql (table=0x7ff5e94ea320, compression=0x0, trx=0x7ff618800fb0, commit=false, mode=FIL_ENCRYPTION_DEFAULT, create_info_encryption_key_id=...) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/row/row0mysql.cc:3595
      #20 0x00000000019f83f1 in create_table_info_t::create_table_def (this=0x7ff629bb83b0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/handler/ha_innodb.cc:11545
      #21 0x00000000019e364d in create_table_info_t::create_table (this=0x7ff629bb83b0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/handler/ha_innodb.cc:13268
      #22 0x00000000019e43a9 in ha_innobase::create (this=0x7ff5e94daa30, name=0x7ff629bbaf20 "./test/t1", form=0x7ff629bb9190, create_info=0x7ff629bbb850) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/innobase/handler/ha_innodb.cc:13631
      #23 0x0000000000ebbba2 in handler::ha_create (this=0x7ff5e94daa30, name=0x7ff629bbaf20 "./test/t1", form=0x7ff629bb9190, info=0x7ff629bbb850) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/handler.cc:5273
      #24 0x0000000000ebc7c3 in ha_create_table (thd=0x7ff5e9419000, path=0x7ff629bbaf20 "./test/t1", db=0x7ff5e9427ff0 "test", table_name=0x7ff5e9427a30 "t1", create_info=0x7ff629bbb850, create_fields=0x7ff629bbb320, update_create_info=false, is_temp_table=false) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/handler.cc:5556
      #25 0x00000000015e17cc in rea_create_table (thd=0x7ff5e9419000, path=0x7ff629bbaf20 "./test/t1", db=0x7ff5e9427ff0 "test", table_name=0x7ff5e9427a30 "t1", create_info=0x7ff629bbb850, create_fields=..., keys=2, key_info=0x7ff5e9428ed0, file=0x7ff5e948d1e8, no_ha_table=false) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/unireg.cc:573
      #26 0x0000000001559fc4 in create_table_impl (thd=0x7ff5e9419000, db=0x7ff5e9427ff0 "test", table_name=0x7ff5e9427a30 "t1", error_table_name=0x7ff5e9427a30 "t1", path=0x7ff629bbaf20 "./test/t1", create_info=0x7ff629bbb850, alter_info=0x7ff629bbb2c0, internal_tmp_table=false, select_field_count=0, no_ha_table=false, is_trans=0x7ff629bbb1ae, key_info=0x7ff629bbb130, key_count=0x7ff629bbb12c) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_table.cc:5614
      #27 0x000000000155a552 in mysql_create_table_no_lock (thd=0x7ff5e9419000, db=0x7ff5e9427ff0 "test", table_name=0x7ff5e9427a30 "t1", create_info=0x7ff629bbb850, alter_info=0x7ff629bbb2c0, select_field_count=0, is_trans=0x7ff629bbb1ae) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_table.cc:5742
      #28 0x000000000155a67a in mysql_create_table (thd=0x7ff5e9419000, create_table=0x7ff5e9427a68, create_info=0x7ff629bbb850, alter_info=0x7ff629bbb2c0) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_table.cc:5790
      #29 0x00000000014c7041 in mysql_execute_command (thd=0x7ff5e9419000, first_level=true) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_parse.cc:3451
      #30 0x00000000014cdaad in mysql_parse (thd=0x7ff5e9419000, parser_state=0x7ff629bbc470) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_parse.cc:5873
      #31 0x00000000014c2921 in dispatch_command (thd=0x7ff5e9419000, com_data=0x7ff629bbcc50, command=COM_QUERY) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_parse.cc:1516
      #32 0x00000000014c17a9 in do_command (thd=0x7ff5e9419000) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/sql_parse.cc:1047
      #33 0x00000000015f5468 in handle_connection (arg=0x7ff60d344640) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/sql/conn_handler/connection_handler_per_thread.cc:312
      #34 0x00000000018c2220 in pfs_spawn_thread (arg=0x7ff625818f20) at /home/hrvoje/worktable/PS-5.7.23-24_dbg/storage/perfschema/pfs.cc:2190
      #35 0x00007ff6295c0e25 in start_thread (arg=0x7ff629bbd700) at pthread_create.c:308
      #36 0x00007ff627791bad in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
      

      Reproduced on debug build of: RM-390 (57a9574def950d8dfc8ae5ba6f1367a7bad39622)

      Can't reproduce this on the release build:

      mysql> USE test;
      Database changed
      mysql> SET @@GLOBAL.innodb_track_changed_pages=FALSE;
      ERROR 1238 (HY000): Variable 'innodb_track_changed_pages' is a read only variable
      mysql> CREATE TABLE t1(c1 INT,c2 CHAR,c3 INT,c4 CHAR KEY,c5 INT UNIQUE KEY,c6 FIXED(0,0)DEFAULT 3.141592);
      Query OK, 0 rows affected, 1 warning (0.02 sec)
      

      On a debug build this query doesn't result in error:

      mysql> SET @@GLOBAL.innodb_track_changed_pages=FALSE;
      Query OK, 0 rows affected (0.00 sec)
      

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                zsolt.parragi Zsolt Parragi
                Reporter:
                hrvoje.matijakovic Hrvoje Matijakovic
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m