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

select plugin_name into OUTFILE .. from information_schema.plugins -- assertion fail during bootstrap

    Details

      Description

      MDEV-7781

       $ ./mtr bootstrap     
      Logging: ./mtr  bootstrap
      vardir: /home/dan/software_projects/mariadb-server/mysql-test/var
      Checking leftover processes...
      Removing old var directory...
      Creating var directory '/home/dan/software_projects/mariadb-server/mysql-test/var'...
      Checking supported features...
      MariaDB Version 10.0.18-MariaDB-debug
       - SSL connections supported
       - binaries are debug compiled
      Collecting tests...
      Installing system database...
      
      ==============================================================================
      
      TEST                                      RESULT   TIME (ms) or COMMENT
      --------------------------------------------------------------------------
      
      worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019
      main.bootstrap                           [ fail ]
              Test ended at 2015-04-20 18:17:07
      
      CURRENT_TEST: main.bootstrap
      sh: line 1: 23458 Aborted                 (core dumped) /home/dan/software_projects/mariadb-server/sql/mysqld --no-defaults --bootstrap --basedir=/home/dan/software_projects/mariadb-server --datadir=/home/dan/software_projects/mariadb-server/mysql-test/var/install.db --default-storage-engine=myisam --skip-plugin-archive --skip-plugin-aria --skip-plugin-blackhole --skip-plugin-connect --skip-plugin-federated --skip-plugin-feedback --skip-plugin-innodb --skip-plugin-innodb-buffer-page --skip-plugin-innodb-buffer-page-lru --skip-plugin-innodb-buffer-pool-stats --skip-plugin-innodb-changed-pages --skip-plugin-innodb-cmp --skip-plugin-innodb-cmp-per-index --skip-plugin-innodb-cmp-per-index-reset --skip-plugin-innodb-cmp-reset --skip-plugin-innodb-cmpmem --skip-plugin-innodb-cmpmem-reset --skip-plugin-innodb-ft-being-deleted --skip-plugin-innodb-ft-config --skip-plugin-innodb-ft-default-stopword --skip-plugin-innodb-ft-deleted --skip-plugin-innodb-ft-index-cache --skip-plugin-innodb-ft-index-table --skip-plugin-innodb-lock-waits --skip-plugin-innodb-locks --skip-plugin-innodb-metrics --skip-plugin-innodb-sys-columns --skip-plugin-innodb-sys-datafiles --skip-plugin-innodb-sys-fields --skip-plugin-innodb-sys-foreign --skip-plugin-innodb-sys-foreign-cols --skip-plugin-innodb-sys-indexes --skip-plugin-innodb-sys-tables --skip-plugin-innodb-sys-tablespaces --skip-plugin-innodb-sys-tablestats --skip-plugin-innodb-trx --skip-plugin-locales --skip-plugin-metadata-lock-info --skip-plugin-partition --skip-plugin-query-cache-info --skip-plugin-query-response-time --skip-plugin-query-response-time-audit --skip-plugin-rpl-semi-sync-master --skip-plugin-rpl-semi-sync-slave --skip-plugin-sequence --skip-plugin-sphinx --skip-plugin-test-sql-discovery --skip-plugin-xtradb-internal-hash-tables --skip-plugin-xtradb-read-view --skip-plugin-xtradb-rseg --loose-innodb --loose-innodb-log-file-size=5M --disable-sync-frm --tmpdir=/home/dan/software_projects/mariadb-server/mysql-test/var/tmp/ --core-file --lc-messages-dir=/home/dan/software_projects/mariadb-server/sql/share/ --character-sets-dir=/home/dan/software_projects/mariadb-server/sql/share/charsets --datadir=/home/dan/software_projects/mariadb-server/mysql-test/var/mysqld.1/data/ --default-storage-engine=MyISAM --loose-skip-innodb --plugin-dir= < /home/dan/software_projects/mariadb-server/mysql-test/var/tmp/bootstrap_plugins.sql >> /home/dan/software_projects/mariadb-server/mysql-test/var/tmp/bootstrap.log 2>&1
      mysqltest: At line 67: exec of '/home/dan/software_projects/mariadb-server/sql/mysqld --no-defaults --bootstrap --basedir=/home/dan/software_projects/mariadb-server --datadir=/home/dan/software_projects/mariadb-server/mysql-test/var/install.db --default-storage-engine=myisam --skip-plugin-archive --skip-plugin-aria --skip-plugin-blackhole --skip-plugin-connect --skip-plugin-federated --skip-plugin-feedback --skip-plugin-innodb --skip-plugin-innodb-buffer-page --skip-plugin-innodb-buffer-page-lru --skip-plugin-innodb-buffer-pool-stats --skip-plugin-innodb-changed-pages --skip-plugin-innodb-cmp --skip-plugin-innodb-cmp-per-index --skip-plugin-innodb-cmp-per-index-reset --skip-plugin-innodb-cmp-reset --skip-plugin-innodb-cmpmem --skip-plugin-innodb-cmpmem-reset --skip-plugin-innodb-ft-being-deleted --skip-plugin-innodb-ft-config --skip-plugin-innodb-ft-default-stopword --skip-plugin-innodb-ft-deleted --skip-plugin-innodb-ft-index-cache --skip-plugin-innodb-ft-index-table --skip-plugin-innodb-lock-waits --skip-plugin-innodb-locks --skip-plugin-innodb-metrics --skip-plugin-innodb-sys-columns --skip-plugin-innodb-sys-datafiles --skip-plugin-innodb-sys-fields --skip-plugin-innodb-sys-foreign --skip-plugin-innodb-sys-foreign-cols --skip-plugin-innodb-sys-indexes --skip-plugin-innodb-sys-tables --skip-plugin-innodb-sys-tablespaces --skip-plugin-innodb-sys-tablestats --skip-plugin-innodb-trx --skip-plugin-locales --skip-plugin-metadata-lock-info --skip-plugin-partition --skip-plugin-query-cache-info --skip-plugin-query-response-time --skip-plugin-query-response-time-audit --skip-plugin-rpl-semi-sync-master --skip-plugin-rpl-semi-sync-slave --skip-plugin-sequence --skip-plugin-sphinx --skip-plugin-test-sql-discovery --skip-plugin-xtradb-internal-hash-tables --skip-plugin-xtradb-read-view --skip-plugin-xtradb-rseg --loose-innodb --loose-innodb-log-file-size=5M --disable-sync-frm --tmpdir=/home/dan/software_projects/mariadb-server/mysql-test/var/tmp/ --core-file --lc-messages-dir=/home/dan/software_projects/mariadb-server/sql/share/ --character-sets-dir=/home/dan/software_projects/mariadb-server/sql/share/charsets --datadir=/home/dan/software_projects/mariadb-server/mysql-test/var/mysqld.1/data/ --default-storage-engine=MyISAM --loose-skip-innodb --plugin-dir= < /home/dan/software_projects/mariadb-server/mysql-test/var/tmp/bootstrap_plugins.sql >> /home/dan/software_projects/mariadb-server/mysql-test/var/tmp/bootstrap.log 2>&1' failed, error: 34304, status: 134, errno: 2
      Output from before failure:
      End of 5.5 tests
      
      
      
      The result from queries just before the failure was:
      drop table if exists t1;
      drop table t1;
      drop table t1;
      ERROR 42S02: Unknown table 'test.t1'
      set @my_max_allowed_packet= @@max_allowed_packet;
      set global max_allowed_packet=100*@@max_allowed_packet;
      set global max_allowed_packet=@my_max_allowed_packet;
      drop table t1;
      End of 5.1 tests
      #
      # Bug #11766306: 59393: HAVE_INNODB=YES WHEN MYSQLD 
      #  STARTED WITH --SKIP-INNODB
      #
      SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
       and SUPPORT='YES';
      
      End of 5.5 tests
      
       - saving '/home/dan/software_projects/mariadb-server/mysql-test/var/log/main.bootstrap/' to '/home/dan/software_projects/mariadb-server/mysql-test/var/log/main.bootstrap/'
       - found 'core.23458' (0/5)
      
      Trying 'dbx' to get a backtrace
      
      Trying 'gdb' to get a backtrace
      Core generated by '/home/dan/software_projects/mariadb-server/sql/mysqld'
      Output from gdb follows. The first stack trace is from the failing thread.
      The following stack traces are from all threads (so the failing one is
      duplicated).
      --------------------------
      [New LWP 23460]
      [New LWP 23458]
      [New LWP 23459]
      
      warning: Can't read pathname for load map: Unknown error -1.
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib64/libthread_db.so.1".
      Core was generated by `/home/dan/software_projects/mariadb-server/sql/mysqld --no-defaults --bootstrap'.
      Program terminated with signal SIGABRT, Aborted.
      #0  0x00000035a0a0cd11 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      61        val = INTERNAL_SYSCALL (tgkill, err, 3, THREAD_GETMEM (THREAD_SELF, pid),
      #0  0x00000035a0a0cd11 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x0000000000f3b994 in my_write_core (sig=6) at /home/dan/software_projects/mariadb-server/mysys/stacktrace.c:457
      #2  0x000000000083b141 in handle_fatal_signal (sig=6) at /home/dan/software_projects/mariadb-server/sql/signal_handler.cc:262
      #3  <signal handler called>
      #4  0x00000035a0235877 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00000035a0236f68 in __GI_abort () at abort.c:89
      #6  0x00000035a022e7d6 in __assert_fail_base (fmt=0x35a037bce8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x11821f6 "maria_inited", file=file@entry=0x1182170 "/home/dan/software_projects/mariadb-server/storage/maria/ma_create.c", line=line@entry=79, function=function@entry=0x118258d <__PRETTY_FUNCTION__.15159> "maria_create") at assert.c:92
      #7  0x00000035a022e882 in __GI___assert_fail (assertion=0x11821f6 "maria_inited", file=0x1182170 "/home/dan/software_projects/mariadb-server/storage/maria/ma_create.c", line=79, function=0x118258d <__PRETTY_FUNCTION__.15159> "maria_create") at assert.c:101
      #8  0x0000000000cbd3f0 in maria_create (name=0x7f759583f8d8 "/home/dan/software_projects/mariadb-server/mysql-test/var/tmp/#sql_5ba2_0", datafile_type=BLOCK_RECORD, keys=0, keydefs=0x7f759eced4d0, columns=14, columndef=0x7f759583f248, uniques=0, uniquedefs=0x7f759eced590, ci=0x7f759eced480, flags=260) at /home/dan/software_projects/mariadb-server/storage/maria/ma_create.c:79
      #9  0x00000000006adab4 in create_internal_tmp_table (table=0x7f759583e088, keyinfo=0x7f759583f180, start_recinfo=0x7f759583f248, recinfo=0x7f7595819c10, options=2147752704) at /home/dan/software_projects/mariadb-server/sql/sql_select.cc:16926
      #10 0x00000000006acc8a in create_tmp_table (thd=0x7f759e4bf070, param=0x7f7595819ba8, fields=..., group=0x0, distinct=false, save_sum_fields=false, select_options=2147752704, rows_limit=18446744073709551615, table_alias=0x7f7595818800 "plugins", do_not_open=false, keep_row_order=false) at /home/dan/software_projects/mariadb-server/sql/sql_select.cc:16594
      #11 0x00000000006e1d5a in create_schema_table (thd=0x7f759e4bf070, table_list=0x7f7595818808) at /home/dan/software_projects/mariadb-server/sql/sql_show.cc:7736
      #12 0x00000000006e294d in mysql_schema_table (thd=0x7f759e4bf070, lex=0x7f759e4c2cc0, table_list=0x7f7595818808) at /home/dan/software_projects/mariadb-server/sql/sql_show.cc:7954
      #13 0x00000000005f23e5 in open_and_process_table (thd=0x7f759e4bf070, lex=0x7f759e4c2cc0, tables=0x7f7595818808, counter=0x7f759ecedf54, flags=0, prelocking_strategy=0x7f759ecedf90, has_prelocking_list=false, ot_ctx=0x7f759ecede10, new_frm_mem=0x7f759ecede50) at /home/dan/software_projects/mariadb-server/sql/sql_base.cc:3871
      #14 0x00000000005f3875 in open_tables (thd=0x7f759e4bf070, start=0x7f759ecedf10, counter=0x7f759ecedf54, flags=0, prelocking_strategy=0x7f759ecedf90) at /home/dan/software_projects/mariadb-server/sql/sql_base.cc:4519
      #15 0x00000000005f4860 in open_and_lock_tables (thd=0x7f759e4bf070, tables=0x7f7595818808, derived=true, flags=0, prelocking_strategy=0x7f759ecedf90) at /home/dan/software_projects/mariadb-server/sql/sql_base.cc:5162
      #16 0x00000000005e8d89 in open_and_lock_tables (thd=0x7f759e4bf070, tables=0x7f7595818808, derived=true, flags=0) at /home/dan/software_projects/mariadb-server/sql/sql_base.h:490
      #17 0x0000000000657967 in execute_sqlcom_select (thd=0x7f759e4bf070, all_tables=0x7f7595818808) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:5207
      #18 0x0000000000650093 in mysql_execute_command (thd=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:2550
      #19 0x000000000065a710 in mysql_parse (thd=0x7f759e4bf070, rawbuf=0x7f7595818088 "select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%';", length=150, parser_state=0x7f759eceee70) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:6517
      #20 0x000000000064c092 in handle_bootstrap_impl (thd=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:766
      #21 0x000000000064c218 in do_handle_bootstrap (thd=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:816
      #22 0x000000000064c1a2 in handle_bootstrap (arg=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:799
      #23 0x00000035a0a07ee5 in start_thread (arg=0x7f759ecf4700) at pthread_create.c:309
      #24 0x00000035a02f4d1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      
      Thread 3 (Thread 0x7f759ed3d700 (LWP 23459)):
      #0  0x00000035a0a0f461 in do_sigwait (sig=0x7f759ed3ce88, set=<optimized out>) at ../sysdeps/unix/sysv/linux/sigwait.c:60
      #1  __sigwait (set=0x7f759ed3cdf0, sig=0x7f759ed3ce88) at ../sysdeps/unix/sysv/linux/sigwait.c:97
      #2  0x000000000059569e in signal_hand (arg=0x0) at /home/dan/software_projects/mariadb-server/sql/mysqld.cc:3343
      #3  0x00000035a0a07ee5 in start_thread (arg=0x7f759ed3d700) at pthread_create.c:309
      #4  0x00000035a02f4d1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      
      Thread 2 (Thread 0x7f759ef4b7c0 (LWP 23458)):
      #0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
      #1  0x0000000000f40b88 in safe_cond_wait (cond=0x1954620 <COND_thread_count>, mp=0x19533e0 <LOCK_thread_count>, file=0xfc3b60 "/home/dan/software_projects/mariadb-server/include/mysql/psi/mysql_thread.h", line=1165) at /home/dan/software_projects/mariadb-server/mysys/thr_mutex.c:493
      #2  0x00000000005901cb in inline_mysql_cond_wait (that=0x1954620 <COND_thread_count>, mutex=0x19533e0 <LOCK_thread_count>, src_file=0xfc5750 "/home/dan/software_projects/mariadb-server/sql/mysqld.cc", src_line=5845) at /home/dan/software_projects/mariadb-server/include/mysql/psi/mysql_thread.h:1165
      #3  0x000000000059948a in bootstrap (file=0x21afa60 <instrumented_stdin>) at /home/dan/software_projects/mariadb-server/sql/mysqld.cc:5845
      #4  0x0000000000598fc7 in mysqld_main (argc=67, argv=0x7f759e4543c0) at /home/dan/software_projects/mariadb-server/sql/mysqld.cc:5489
      #5  0x000000000058fc80 in main (argc=67, argv=0x7fff8810d078) at /home/dan/software_projects/mariadb-server/sql/main.cc:25
      
      Thread 1 (Thread 0x7f759ecf4700 (LWP 23460)):
      #0  0x00000035a0a0cd11 in __pthread_kill (threadid=<optimized out>, signo=6) at ../nptl/sysdeps/unix/sysv/linux/pthread_kill.c:61
      #1  0x0000000000f3b994 in my_write_core (sig=6) at /home/dan/software_projects/mariadb-server/mysys/stacktrace.c:457
      #2  0x000000000083b141 in handle_fatal_signal (sig=6) at /home/dan/software_projects/mariadb-server/sql/signal_handler.cc:262
      #3  <signal handler called>
      #4  0x00000035a0235877 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
      #5  0x00000035a0236f68 in __GI_abort () at abort.c:89
      #6  0x00000035a022e7d6 in __assert_fail_base (fmt=0x35a037bce8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x11821f6 "maria_inited", file=file@entry=0x1182170 "/home/dan/software_projects/mariadb-server/storage/maria/ma_create.c", line=line@entry=79, function=function@entry=0x118258d <__PRETTY_FUNCTION__.15159> "maria_create") at assert.c:92
      #7  0x00000035a022e882 in __GI___assert_fail (assertion=0x11821f6 "maria_inited", file=0x1182170 "/home/dan/software_projects/mariadb-server/storage/maria/ma_create.c", line=79, function=0x118258d <__PRETTY_FUNCTION__.15159> "maria_create") at assert.c:101
      #8  0x0000000000cbd3f0 in maria_create (name=0x7f759583f8d8 "/home/dan/software_projects/mariadb-server/mysql-test/var/tmp/#sql_5ba2_0", datafile_type=BLOCK_RECORD, keys=0, keydefs=0x7f759eced4d0, columns=14, columndef=0x7f759583f248, uniques=0, uniquedefs=0x7f759eced590, ci=0x7f759eced480, flags=260) at /home/dan/software_projects/mariadb-server/storage/maria/ma_create.c:79
      #9  0x00000000006adab4 in create_internal_tmp_table (table=0x7f759583e088, keyinfo=0x7f759583f180, start_recinfo=0x7f759583f248, recinfo=0x7f7595819c10, options=2147752704) at /home/dan/software_projects/mariadb-server/sql/sql_select.cc:16926
      #10 0x00000000006acc8a in create_tmp_table (thd=0x7f759e4bf070, param=0x7f7595819ba8, fields=..., group=0x0, distinct=false, save_sum_fields=false, select_options=2147752704, rows_limit=18446744073709551615, table_alias=0x7f7595818800 "plugins", do_not_open=false, keep_row_order=false) at /home/dan/software_projects/mariadb-server/sql/sql_select.cc:16594
      #11 0x00000000006e1d5a in create_schema_table (thd=0x7f759e4bf070, table_list=0x7f7595818808) at /home/dan/software_projects/mariadb-server/sql/sql_show.cc:7736
      #12 0x00000000006e294d in mysql_schema_table (thd=0x7f759e4bf070, lex=0x7f759e4c2cc0, table_list=0x7f7595818808) at /home/dan/software_projects/mariadb-server/sql/sql_show.cc:7954
      #13 0x00000000005f23e5 in open_and_process_table (thd=0x7f759e4bf070, lex=0x7f759e4c2cc0, tables=0x7f7595818808, counter=0x7f759ecedf54, flags=0, prelocking_strategy=0x7f759ecedf90, has_prelocking_list=false, ot_ctx=0x7f759ecede10, new_frm_mem=0x7f759ecede50) at /home/dan/software_projects/mariadb-server/sql/sql_base.cc:3871
      #14 0x00000000005f3875 in open_tables (thd=0x7f759e4bf070, start=0x7f759ecedf10, counter=0x7f759ecedf54, flags=0, prelocking_strategy=0x7f759ecedf90) at /home/dan/software_projects/mariadb-server/sql/sql_base.cc:4519
      #15 0x00000000005f4860 in open_and_lock_tables (thd=0x7f759e4bf070, tables=0x7f7595818808, derived=true, flags=0, prelocking_strategy=0x7f759ecedf90) at /home/dan/software_projects/mariadb-server/sql/sql_base.cc:5162
      #16 0x00000000005e8d89 in open_and_lock_tables (thd=0x7f759e4bf070, tables=0x7f7595818808, derived=true, flags=0) at /home/dan/software_projects/mariadb-server/sql/sql_base.h:490
      #17 0x0000000000657967 in execute_sqlcom_select (thd=0x7f759e4bf070, all_tables=0x7f7595818808) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:5207
      #18 0x0000000000650093 in mysql_execute_command (thd=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:2550
      #19 0x000000000065a710 in mysql_parse (thd=0x7f759e4bf070, rawbuf=0x7f7595818088 "select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%';", length=150, parser_state=0x7f759eceee70) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:6517
      #20 0x000000000064c092 in handle_bootstrap_impl (thd=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:766
      #21 0x000000000064c218 in do_handle_bootstrap (thd=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:816
      #22 0x000000000064c1a2 in handle_bootstrap (arg=0x7f759e4bf070) at /home/dan/software_projects/mariadb-server/sql/sql_parse.cc:799
      #23 0x00000035a0a07ee5 in start_thread (arg=0x7f759ecf4700) at pthread_create.c:309
      #24 0x00000035a02f4d1d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
      
      --------------------------------------------------------------------------
      The servers were restarted 0 times
      Spent 0.000 of 28 seconds executing testcases
      
      Failure: Failed 1/1 tests, 0.00% were successful.
      
      Failing test(s): main.bootstrap
      
      The log files in var/log may give you some hint of what went wrong.
      
      If you want to report this error, please read first the documentation
      at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html
      
      mysql-test-run: *** ERROR: there were failing test cases
      dan@spaceman mysql-test $ git diff
      diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
      index 2c6040a..13dbed4 100644
      --- a/mysql-test/t/bootstrap.test
      +++ b/mysql-test/t/bootstrap.test
      @@ -60,3 +60,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
        and SUPPORT='YES';
       
       --echo End of 5.5 tests
      +
      +--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
      +select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%';
      +EOF
      +--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
      +remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql;
      +
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Addition to the main.bootstrap test (just re-quoting from the description, for better visibility):

            diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
            index 2c6040a..13dbed4 100644
            --- a/mysql-test/t/bootstrap.test
            +++ b/mysql-test/t/bootstrap.test
            @@ -60,3 +60,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
              and SUPPORT='YES';
             
             --echo End of 5.5 tests
            +
            +--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql
            +select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%';
            +EOF
            +--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
            +remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql;
            +
            
            Stack trace from 5.5 commit 1115a59d
            #6  0x00007f5f7cc14311 in *__GI___assert_fail (assertion=0xec3026 "maria_inited", file=<optimized out>, line=78, function=0xec33a9 "maria_create") at assert.c:81
            #7  0x0000000000b7fd7e in maria_create (name=0x7f5f72444648 "/data/repo/git/5.5/mysql-test/var/tmp/#sql_2f22_0", datafile_type=BLOCK_RECORD, keys=0, keydefs=0x7f5f7edd3510, columns=14, columndef=0x7f5f72443fb8, uniques=0, uniquedefs=0x7f5f7edd35d0, ci=0x7f5f7edd34c0, flags=4) at 5.5/storage/maria/ma_create.c:78
            #8  0x000000000068bcf8 in create_internal_tmp_table (table=0x7f5f72443078, keyinfo=0x7f5f72443f00, start_recinfo=0x7f5f72443fb8, recinfo=0x7f5f72419be0, options=2147752704) at 5.5/sql/sql_select.cc:16012
            #9  0x000000000068aeb5 in create_tmp_table (thd=0x7f5f7c165060, param=0x7f5f72419b78, fields=..., group=0x0, distinct=false, save_sum_fields=false, select_options=2147752704, rows_limit=18446744073709551615, table_alias=0x7f5f724187e0 "plugins", do_not_open=false, keep_row_order=false) at 5.5/sql/sql_select.cc:15684
            #10 0x00000000006be600 in create_schema_table (thd=0x7f5f7c165060, table_list=0x7f5f724187e8) at 5.5/sql/sql_show.cc:7364
            #11 0x00000000006bf205 in mysql_schema_table (thd=0x7f5f7c165060, lex=0x7f5f7c1682d0, table_list=0x7f5f724187e8) at 5.5/sql/sql_show.cc:7582
            #12 0x00000000005da855 in open_and_process_table (thd=0x7f5f7c165060, lex=0x7f5f7c1682d0, tables=0x7f5f724187e8, counter=0x7f5f7edd3fa4, flags=0, prelocking_strategy=0x7f5f7edd3fe0, has_prelocking_list=false, ot_ctx=0x7f5f7edd3e50, new_frm_mem=0x7f5f7edd3e90) at 5.5/sql/sql_base.cc:4496
            #13 0x00000000005dba6f in open_tables (thd=0x7f5f7c165060, start=0x7f5f7edd3f60, counter=0x7f5f7edd3fa4, flags=0, prelocking_strategy=0x7f5f7edd3fe0) at 5.5/sql/sql_base.cc:5056
            #14 0x00000000005dc8fe in open_and_lock_tables (thd=0x7f5f7c165060, tables=0x7f5f724187e8, derived=true, flags=0, prelocking_strategy=0x7f5f7edd3fe0) at 5.5/sql/sql_base.cc:5661
            #15 0x00000000005cfe29 in open_and_lock_tables (thd=0x7f5f7c165060, tables=0x7f5f724187e8, derived=true, flags=0) at 5.5/sql/sql_base.h:524
            #16 0x000000000063bfb5 in execute_sqlcom_select (thd=0x7f5f7c165060, all_tables=0x7f5f724187e8) at 5.5/sql/sql_parse.cc:4647
            #17 0x00000000006353ea in mysql_execute_command (thd=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:2234
            #18 0x000000000063ecee in mysql_parse (thd=0x7f5f7c165060, rawbuf=0x7f5f72418078 "select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%'", length=149, parser_state=0x7f5f7edd4cb0) at 5.5/sql/sql_parse.cc:5909
            #19 0x00000000006314bb in handle_bootstrap_impl (thd=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:576
            #20 0x0000000000631666 in do_handle_bootstrap (thd=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:625
            #21 0x00000000006315f0 in handle_bootstrap (arg=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:608
            #22 0x00007f5f7ea0eb50 in start_thread (arg=<optimized out>) at pthread_create.c:304
            #23 0x00007f5f7ccc495d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
            
            Show
            elenst Elena Stepanova added a comment - Addition to the main.bootstrap test (just re-quoting from the description, for better visibility): diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test index 2c6040a..13dbed4 100644 --- a/mysql-test/t/bootstrap.test +++ b/mysql-test/t/bootstrap.test @@ -60,3 +60,10 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb' and SUPPORT='YES'; --echo End of 5.5 tests + +--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql +select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%'; +EOF +--exec $MYSQLD_BOOTSTRAP_CMD --plugin-dir=$PLUGIN_DIR < $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 +remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_plugins.sql; + Stack trace from 5.5 commit 1115a59d #6 0x00007f5f7cc14311 in *__GI___assert_fail (assertion=0xec3026 "maria_inited", file=<optimized out>, line=78, function=0xec33a9 "maria_create") at assert.c:81 #7 0x0000000000b7fd7e in maria_create (name=0x7f5f72444648 "/data/repo/git/5.5/mysql-test/var/tmp/#sql_2f22_0", datafile_type=BLOCK_RECORD, keys=0, keydefs=0x7f5f7edd3510, columns=14, columndef=0x7f5f72443fb8, uniques=0, uniquedefs=0x7f5f7edd35d0, ci=0x7f5f7edd34c0, flags=4) at 5.5/storage/maria/ma_create.c:78 #8 0x000000000068bcf8 in create_internal_tmp_table (table=0x7f5f72443078, keyinfo=0x7f5f72443f00, start_recinfo=0x7f5f72443fb8, recinfo=0x7f5f72419be0, options=2147752704) at 5.5/sql/sql_select.cc:16012 #9 0x000000000068aeb5 in create_tmp_table (thd=0x7f5f7c165060, param=0x7f5f72419b78, fields=..., group=0x0, distinct=false, save_sum_fields=false, select_options=2147752704, rows_limit=18446744073709551615, table_alias=0x7f5f724187e0 "plugins", do_not_open=false, keep_row_order=false) at 5.5/sql/sql_select.cc:15684 #10 0x00000000006be600 in create_schema_table (thd=0x7f5f7c165060, table_list=0x7f5f724187e8) at 5.5/sql/sql_show.cc:7364 #11 0x00000000006bf205 in mysql_schema_table (thd=0x7f5f7c165060, lex=0x7f5f7c1682d0, table_list=0x7f5f724187e8) at 5.5/sql/sql_show.cc:7582 #12 0x00000000005da855 in open_and_process_table (thd=0x7f5f7c165060, lex=0x7f5f7c1682d0, tables=0x7f5f724187e8, counter=0x7f5f7edd3fa4, flags=0, prelocking_strategy=0x7f5f7edd3fe0, has_prelocking_list=false, ot_ctx=0x7f5f7edd3e50, new_frm_mem=0x7f5f7edd3e90) at 5.5/sql/sql_base.cc:4496 #13 0x00000000005dba6f in open_tables (thd=0x7f5f7c165060, start=0x7f5f7edd3f60, counter=0x7f5f7edd3fa4, flags=0, prelocking_strategy=0x7f5f7edd3fe0) at 5.5/sql/sql_base.cc:5056 #14 0x00000000005dc8fe in open_and_lock_tables (thd=0x7f5f7c165060, tables=0x7f5f724187e8, derived=true, flags=0, prelocking_strategy=0x7f5f7edd3fe0) at 5.5/sql/sql_base.cc:5661 #15 0x00000000005cfe29 in open_and_lock_tables (thd=0x7f5f7c165060, tables=0x7f5f724187e8, derived=true, flags=0) at 5.5/sql/sql_base.h:524 #16 0x000000000063bfb5 in execute_sqlcom_select (thd=0x7f5f7c165060, all_tables=0x7f5f724187e8) at 5.5/sql/sql_parse.cc:4647 #17 0x00000000006353ea in mysql_execute_command (thd=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:2234 #18 0x000000000063ecee in mysql_parse (thd=0x7f5f7c165060, rawbuf=0x7f5f72418078 "select plugin_name into OUTFILE '$MYSQLTEST_VARDIR/tmp/installed_plugins.sql' from information_schema.plugins where plugin_library like 'ha_example%'", length=149, parser_state=0x7f5f7edd4cb0) at 5.5/sql/sql_parse.cc:5909 #19 0x00000000006314bb in handle_bootstrap_impl (thd=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:576 #20 0x0000000000631666 in do_handle_bootstrap (thd=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:625 #21 0x00000000006315f0 in handle_bootstrap (arg=0x7f5f7c165060) at 5.5/sql/sql_parse.cc:608 #22 0x00007f5f7ea0eb50 in start_thread (arg=<optimized out>) at pthread_create.c:304 #23 0x00007f5f7ccc495d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
            Hide
            serg Sergei Golubchik added a comment - - edited

            It crashes because Aria engine is disabled but the query needs to create a temporary table. And MariaDB is compiled with USE_ARIA_FOR_TMP_TABLES.

            As a workaround add --aria to the bootstrap command line.

            I'm not quite sure how to fix this yet. Normally MariaDB doesn't allow one to start with Aria disabled, if Aria is used for temporary tables. But in bootstrap mode this check is disabled, precisely, to have a light-weight bootstrap without Aria. One option would be to give up on that and enable Aria in bootstrap, making it a bit less light-weight. Another option — run-time check whether Aria is enabled before creating a temporary table. I wouldn't want that, this would mean doing this check every time for every internal temporary table creation, even though it is practically never ever needed.

            Show
            serg Sergei Golubchik added a comment - - edited It crashes because Aria engine is disabled but the query needs to create a temporary table. And MariaDB is compiled with USE_ARIA_FOR_TMP_TABLES. As a workaround add --aria to the bootstrap command line. I'm not quite sure how to fix this yet. Normally MariaDB doesn't allow one to start with Aria disabled, if Aria is used for temporary tables. But in bootstrap mode this check is disabled, precisely, to have a light-weight bootstrap without Aria. One option would be to give up on that and enable Aria in bootstrap, making it a bit less light-weight. Another option — run-time check whether Aria is enabled before creating a temporary table. I wouldn't want that, this would mean doing this check every time for every internal temporary table creation, even though it is practically never ever needed.
            Hide
            danblack Daniel Black added a comment -

            I only can across this once trying to write a test case so adding --aria to the bootstrap command line sounds like a perfectly valid workaround.

            Show
            danblack Daniel Black added a comment - I only can across this once trying to write a test case so adding --aria to the bootstrap command line sounds like a perfectly valid workaround.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                danblack Daniel Black
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

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