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

main.mysqldump is not re-executable

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.0.27
    • N/A
    • Tests
    • None

    Description

      $ ./mtr main.mysqldump main.mysqldump
      Logging: /home/svoj/devel/maria/mariadb/mysql-test/mysql-test-run.pl  main.mysqldump main.mysqldump
      vardir: /home/svoj/devel/maria/debug/mysql-test/var
      Checking leftover processes...
      Removing old var directory...
      Creating var directory '/home/svoj/devel/maria/debug/mysql-test/var'...
      Checking supported features...
      MariaDB Version 10.0.28-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.mysqldump 'innodb_plugin'           [ pass ]   7859
      main.mysqldump 'innodb_plugin'           [ fail ]
              Test ended at 2016-10-21 16:39:30
       
      CURRENT_TEST: main.mysqldump
      mysqldump: Couldn't find table: "non_existing"
      mysqldump: Got error: 1356: "View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
      mysqldump: Couldn't execute 'SHOW FIELDS FROM `v1`': View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: user2 has insufficent privileges to SHOW CREATE PROCEDURE `sp1`!
      mysqldump: Got error: 1146: "Table 'test.???????????????????????' doesn't exist" when using LOCK TABLES
      /home/svoj/devel/maria/debug/client/mysqlimport: Error: 1146, Table 'test.words' doesn't exist, when using table: words
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: user1 has insufficent privileges to SHOW CREATE FUNCTION `hello1`!
      mysqltest: At line 2428: query 'DROP DATABASE mysql' failed: 1146: Table 'mysql.proc' doesn't exist
       
      The result from queries just before the failure was:
      < snip >
       
      #### Dump ends here ####
      DROP TABLE b12809202_db.t1;
      DROP TABLE b12809202_db.t2;
      DROP DATABASE b12809202_db;
      #
      # Delete all existing binary logs.
      #
      RESET MASTER;
      #
      # Bug#45740 MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERY CAUSES RESTORE PROBLEM
      #
      SET @old_log_output_state=       @@global.log_output;
      SET @old_general_log_state=      @@global.general_log;
      SET @old_slow_query_log_state=   @@global.slow_query_log;
      call mtr.add_suppression("Failed to write to mysql.general_log");
      SET @@global.log_output="TABLE";
      SET @@global.general_log='OFF';
      SET @@global.slow_query_log='OFF';
      DROP DATABASE mysql;
      

      I'm not sure if this is a server bug or a test bug: this is the only test I found that does "DROP DATABASE mysql".

      Another way to reproduce this failure is just to add DROP DATABASE immediately after it was restored:

      diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
      index fd50896..f1386e0 100644
      --- a/mysql-test/t/mysqldump.test
      +++ b/mysql-test/t/mysqldump.test
      @@ -2427,6 +2427,7 @@ SET @@global.general_log='OFF';
       SET @@global.slow_query_log='OFF';
       DROP DATABASE mysql;
       --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug45740.sql
      +DROP DATABASE mysql;
       SHOW CREATE TABLE mysql.general_log;
       SHOW CREATE TABLE mysql.slow_log;
       --remove_file $MYSQLTEST_VARDIR/tmp/bug45740.sql
      

      DROP DATABASE now fails:

      $ ./mtr main.mysqldump
      Logging: /home/svoj/devel/maria/mariadb/mysql-test/mysql-test-run.pl  main.mysqldump
      vardir: /home/svoj/devel/maria/debug/mysql-test/var
      Checking leftover processes...
      Removing old var directory...
      Creating var directory '/home/svoj/devel/maria/debug/mysql-test/var'...
      Checking supported features...
      MariaDB Version 10.0.28-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.mysqldump 'innodb_plugin'           [ fail ]
              Test ended at 2016-10-21 16:42:50
       
      CURRENT_TEST: main.mysqldump
      mysqldump: Couldn't find table: "non_existing"
      mysqldump: Got error: 1356: "View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" when using LOCK TABLES
      mysqldump: Couldn't execute 'SHOW FIELDS FROM `v1`': View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: user2 has insufficent privileges to SHOW CREATE PROCEDURE `sp1`!
      mysqldump: Got error: 1146: "Table 'test.???????????????????????' doesn't exist" when using LOCK TABLES
      /home/svoj/devel/maria/debug/client/mysqlimport: Error: 1146, Table 'test.words' doesn't exist, when using table: words
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: Got error: 1083: "Field separator argument is not what is expected; check the manual" when executing 'SELECT INTO OUTFILE'
      mysqldump: user1 has insufficent privileges to SHOW CREATE FUNCTION `hello1`!
      mysqltest: At line 2430: query 'DROP DATABASE mysql' failed: 1146: Table 'mysql.proc' doesn't exist
       
      The result from queries just before the failure was:
      < snip >
      DROP DATABASE b12809202_db;
      #
      # Delete all existing binary logs.
      #
      RESET MASTER;
      #
      # Bug#45740 MYSQLDUMP DOESN'T DUMP GENERAL_LOG AND SLOW_QUERY CAUSES RESTORE PROBLEM
      #
      SET @old_log_output_state=       @@global.log_output;
      SET @old_general_log_state=      @@global.general_log;
      SET @old_slow_query_log_state=   @@global.slow_query_log;
      call mtr.add_suppression("Failed to write to mysql.general_log");
      SET @@global.log_output="TABLE";
      SET @@global.general_log='OFF';
      SET @@global.slow_query_log='OFF';
      DROP DATABASE mysql;
      Warnings:
      Error	1146	Table 'mysql.proc' doesn't exist
      Error	1146	Table 'mysql.event' doesn't exist
      DROP DATABASE mysql;
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.