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

Server fails to set ADD_PK_INDEX, DROP_PK_INDEX if unique index nominated as PK

    XMLWordPrintable

Details

    Description

      GIT: HEAD -> 10.3, origin/HEAD, origin/10.3 fbee31418cf08c62d91195b04a9ed6a42c31bcec
              2018-10-04T11:26:42-04:00
      Version: '10.3.11-MariaDB-debug-log'  
      (/work_m/RQG_new/storage/1538676565/867.*)
       
      mysqld: storage/innobase/row/row0log.cc:681: void row_log_table_delete(const rec_t*, dict_index_t*, const ulint*, const byte*): Assertion `new_index->n_uniq == index->n_uniq' failed.
      Query (0x7f4af8012af0): ROLLBACK  /* E_R Thread10 QNO 1965 CON_ID 703 */
      Status: NOT_KILLED
       
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6)
          at ../sysdeps/unix/sysv/linux/raise.c:58
      #5  0x00007f4b8fa4637a in __GI_abort () 
          at abort.c:89
      #6  0x00007f4b8fa3cb47 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x5596740bc508 "new_index->n_uniq == index->n_uniq", file=file@entry=0x5596740bc088 "storage/innobase/row/row0log.cc", line=line@entry=681, function=function@entry=0x5596740be4c0 <row_log_table_delete(unsigned char const*, dict_index_t*, unsigned long const*, unsigned char const*)::__PRETTY_FUNCTION__> "void row_log_table_delete(const rec_t*, dict_index_t*, const ulint*, const byte*)") 
          at assert.c:92
      #7  0x00007f4b8fa3cbf2 in __GI___assert_fail (assertion=0x5596740bc508 "new_index->n_uniq == index->n_uniq", file=0x5596740bc088 "storage/innobase/row/row0log.cc", line=681, function=0x5596740be4c0 <row_log_table_delete(unsigned char const*, dict_index_t*, unsigned long const*, unsigned char const*)::__PRETTY_FUNCTION__> "void row_log_table_delete(const rec_t*, dict_index_t*, const ulint*, const byte*)") 
          at assert.c:101
      #8  0x0000559673947150 in row_log_table_delete (rec=0x7f4b750c4189 "\200", index=0x7f4aa00c3ca8, offsets=0x7f4af80b30e8, sys=0x0) 
          at storage/innobase/row/row0log.cc:681
      #9  0x0000559673b8986b in row_undo_ins_remove_clust_rec (node=0x7f4af80ab0e8) 
          at storage/innobase/row/row0uins.cc:120
      #10 0x0000559673b8afd8 in row_undo_ins (node=0x7f4af80ab0e8, thr=0x7f4af80aaf18) 
          at storage/innobase/row/row0uins.cc:612
      #11 0x0000559673989447 in row_undo (node=0x7f4af80ab0e8, thr=0x7f4af80aaf18) 
          at storage/innobase/row/row0undo.cc:303
      #12 0x00005596739896a8 in row_undo_step (thr=0x7f4af80aaf18) 
          at storage/innobase/row/row0undo.cc:362
      #13 0x00005596738ddbf1 in que_thr_step (thr=0x7f4af80aaf18) 
          at storage/innobase/que/que0que.cc:1044
      #14 0x00005596738dde45 in que_run_threads_low (thr=0x7f4af80aaf18) 
          at storage/innobase/que/que0que.cc:1108
      #15 0x00005596738de039 in que_run_threads (thr=0x7f4af80aaf18) 
          at storage/innobase/que/que0que.cc:1148
      #16 0x00005596739ea98a in trx_rollback_to_savepoint_low (trx=0x7f4b7e3afb10, savept=0x0) 
          at storage/innobase/trx/trx0roll.cc:145
      #17 0x00005596739ead7a in trx_rollback_for_mysql_low (trx=0x7f4b7e3afb10) 
          at storage/innobase/trx/trx0roll.cc:214
      #18 0x00005596739eb0cd in trx_rollback_for_mysql (trx=0x7f4b7e3afb10) 
          at storage/innobase/trx/trx0roll.cc:240
      #19 0x00005596737d2c0b in innobase_rollback (hton=0x5596757c49b8, thd=0x7f4af8000a98, rollback_trx=true) 
          at storage/innobase/handler/ha_innodb.cc:4713
      #20 0x00005596735ca522 in ha_rollback_trans (thd=0x7f4af8000a98, all=true) 
          at sql/handler.cc:1722
      #21 0x000055967344db6f in trans_rollback (thd=0x7f4af8000a98) 
          at sql/transaction.cc:423
      #22 0x00005596732e0e11 in mysql_execute_command (thd=0x7f4af8000a98) 
          at sql/sql_parse.cc:5832
      #23 0x00005596732e7a92 in mysql_parse (thd=0x7f4af8000a98, rawbuf=0x7f4af8012af0 "ROLLBACK  /* E_R Thread10 QNO 1965 CON_ID 703 */", length=48, parser_state=0x7f4b7c2c2640, is_com_multi=false, is_next_command=false) 
          at sql/sql_parse.cc:8091
      #24 0x00005596732d49e0 in dispatch_command (command=COM_QUERY, thd=0x7f4af8000a98, packet=0x7f4af800a7f9 " ROLLBACK  /* E_R Thread10 QNO 1965 CON_ID 703 */ ", packet_length=50, is_com_multi=false, is_next_command=false) 
          at sql/sql_parse.cc:1850
      #25 0x00005596732d343f in do_command (thd=0x7f4af8000a98) 
          at sql/sql_parse.cc:1394
      #26 0x000055967343999f in do_handle_one_connection (connect=0x559676378e78) 
          at sql/sql_connect.cc:1402
      #27 0x0000559673439716 in handle_one_connection (arg=0x559676378e78) 
          at sql/sql_connect.cc:1308
      #28 0x00007f4b906856da in start_thread (arg=0x7f4b7c2c3700) 
          at pthread_create.c:456
      #29 0x00007f4b8fb17d7f in clone () 
          at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105
      

      RQG setup (some of the settings are RQG run specific)
      /mnt/r0/mleich/RQG_new/rqg.pl \ 
      --mysqld=--innodb_lock_schedule_algorithm=fcfs \ 
      --grammar=conf/mariadb/table_stress.yy \ 
      --gendata=conf/mariadb/table_stress.zz \ 
      --gendata_sql=conf/mariadb/table_stress.sql \ 
      --engine=Innodb \ 
      --reporters=Deadlock,ErrorLog,Backtrace \ 
      --mysqld=--loose_innodb_use_native_aio=0 \ 
      --mysqld=--connect_timeout=60 \ 
      --mysqld=--net_read_timeout=30 \ 
      --mysqld=--net_write_timeout=60 \ 
      --mysqld=--loose-idle_readonly_transaction_timeout=0 \ 
      --mysqld=--loose-idle_transaction_timeout=0 \ 
      --mysqld=--loose-idle_write_transaction_timeout=0 \ 
      --mysqld=--interactive_timeout=28800 \ 
      --mysqld=--lock_wait_timeout=86400 \ 
      --mysqld=--innodb-lock-wait-timeout=50 \ 
      --mysqld=--loose-table_lock_wait_timeout=50 \ 
      --mysqld=--wait_timeout=28800 \ 
      --mysqld=--slave_net_timeout=60 \ 
      --mysqld=--log-output=none \ 
      --duration=300 \ 
      --seed=random \ 
      --sqltrace=MarkErrors \ 
      --threads=32 \ 
      --mysqld=--innodb-flush-log-at-trx-commit=0 \ 
      --mysqld=--transaction-isolation=READ-COMMITTED \ 
      ... (some RQG run specific settings like workdir etc.)
      --no-mask
       
      The RQG testing "campaign" consisted of 1120 RQG runs.
      There was some variation of the parameters
      - "--mysqld=--transaction-isolation"
      - "--threads"
      - "--mysqld=--innodb-flush-log-at-trx-commit=0".
      56 RQG runs hit an assert and 27 of them the assert reported here.
       
      I will try to simplify the RQG grammar.
      

      Same problem occurs on

      • 10.2.19-MariaDB-debug-log
        10.2, origin/10.2 e9d9ca8c44c96e5943c0175177b3377a65b2d76f 2018-10-08T21:40:18+05:30
      • 10.1.35-MariaDB-debug
        10.1, origin/10.1 e08ddccc35f1c199f503861bb63c6f7bcef2a9f6 2018-07-16T12:22:36+03:00

      Attachments

        Issue Links

          Activity

            People

              thiru Thirunarayanan Balathandayuthapani
              mleich Matthias Leich
              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.