1. 24 Oct, 2009 1 commit
    • Sergey Petrunya's avatar
      MWL#36: Add a mysqlbinlog option to change the used database · e1e10417
      Sergey Petrunya authored
      - Review fixes
      
      client/Makefile.am:
        - Make it build on Linux
      client/mysqlbinlog.cc:
        - Coding style fixes
        - Better/more comments
        - Use client/sql_string.*, not server's sql/sql_string.*.
        - Don't declare a dummy TABLE_LIST structure in the client.
      client/sql_string.h:
        - Use client/sql_string.*, not server's sql/sql_string.*.
      sql/log_event.cc:
        = Fix coding style
        = Introduce Log_event::event_owns_temp_buf which tells whether Log_event::temp_buf is 'owned' by the Log_event object and should be my_free'd on return. 
        This is needed because rewrite_db() needs to dispose of the buffer, and 
        - when mysqlbinlog is reading directly from binlog file, the buffer 
          should be freed
        - when mysqlbinlog is reading from a server, the buffer is a part of network
          buffer and shouldn't be freed.
      sql/log_event.h:
        Introduce Log_event::event_owns_temp_buf which tells whether Log_event::temp_buf is 'owned' by the Log_event object and should be my_free'd on return. 
        This is needed because rewrite_db() needs to dispose of the buffer, and 
        - when mysqlbinlog is reading directly from binlog file, the buffer 
          should be freed
        - when mysqlbinlog is reading from a server, the buffer is a part of network
          buffer and shouldn't be freed.
      sql/mysqld.cc:
        - Better/more comments
      sql/rpl_filter.cc:
        - #ifdef-out Rpl_filter::tables_ok from the client. This allows not 
          to define dummy TABLE_LIST on the client
      sql/rpl_filter.h:
        - #ifdef-out Rpl_filter::tables_ok from the client. This allows not 
          to define dummy TABLE_LIST on the client
      sql/sql_string.cc:
        - Use client/sql_string.*, not server's sql/sql_string.*.
      sql/sql_string.h:
        - Use client/sql_string.*, not server's sql/sql_string.*.
      e1e10417
  2. 17 Oct, 2009 1 commit
  3. 16 Oct, 2009 6 commits
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · 5f06080c
      Alexander Ivanov authored
      Merge from trunk.
      5f06080c
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · b35f620e
      Alexander Ivanov authored
      Add test-suite.
      b35f620e
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · 8e160e2f
      Alexander Ivanov authored
      Add --rewrite-db option to mysqlbinlog.
      8e160e2f
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · ab2fdf78
      Alexander Ivanov authored
      Add Rpl_filter to mysqlbinlog.cc
      Note. Though within MWL#36 we are going to use only two Rpl_filter's
            methods (add_db_rewrite and get_rewrite_db), we look forward for
            MWL#40 where Rpl_filter is likely to be used to its more extent.
      Note. Within MWL#36 we will not use Rpl_filter for supporting --database
            option: this option allows to specify only one database what
            doesn't correlate with Rpl_filter::add_do_db() (using this method
            will either appear "artificial" or require changing --database
            semantics). To be discussed within MWL#40.
      To add Rpl_filter we need:
      1. include sql_string.h
         There are two instances of sql_string.* files - in sql and in client
         directories. We need to use the ones from the sql dir.
      2. include sql_list.h
         This requires to define a client version of sql_alloc() function.
      3. include rpl_filter.h
         This requires a definition of system_charset_info variable.
         Besides, Rpl_filter::tables_ok() refers to a TABLE_LIST structure which
         encounts deep non-client dependencies and can't be used here as is. On
         the other hand, tables_ok() make use only few TABLE_LIST's members and
         none of them depends on specific server context. This allows to redefine
         TABLE_LIST in a client context so that tables_ok() becomes admissible
         (surely it's a kind of hack but (at least currently) it's better than
         #ifndef'ing this method in Rpl_filter definition).
      Also add Rpl_filter::rewrite_db_is_empty() method. This is needed to be
      able to check that --rewrite-db is not used jointly with --base64-output=
      always (this is not supported - at least currently).
      ab2fdf78
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · f79aed87
      Alexander Ivanov authored
      Add rewrite_db() member to the Table_map_log_event class.
      Each RBR-event in binary log is preceded by a Table_map event
      containing a (db_id, db_name) pair. The rewrite_db(new_name)
      function replaces db_name by new_name in a buffer containing
      Table_map event read from the binary log.
      f79aed87
    • Alexander Ivanov's avatar
      MWL#36: Add a mysqlbinlog option to change the used database. · 324abd68
      Alexander Ivanov authored
      Make sql_alloc() declaration "public" for a client context.
      The reason is that sql_alloc() is used in definition of some common
      purpose stuff (e.g. sql_list.*). To make this stuff available for a
      client context we declare sql_alloc() as a "virtual function", i.e.
      as a function that is already declared but must be defined in this
      context (note that definition of sql_alloc() in thr_malloc.cc is
      #ifndef'ed for MYSQL_CLIENT).
      Also make sql_string.h repeatedly includable.
      
      324abd68
  4. 14 Oct, 2009 1 commit
  5. 13 Oct, 2009 2 commits
  6. 12 Oct, 2009 5 commits
  7. 11 Oct, 2009 6 commits
  8. 10 Oct, 2009 1 commit
    • unknown's avatar
      Fix failures in the funcs_1 test suite. · 5ea75e5f
      unknown authored
      Some result updates necessary due to extra tables and columns added in
      information_schema in MariaDB (XtraDB, PBXT, microsec_process).
      
      Also fix bad merge of two result files; apparently the test case was merged,
      but the result file was not.
      
      mysql-test/suite/funcs_1/datadict/processlist_priv.inc:
        Handle the new TIME_MS column in information_schema.processlist.
      mysql-test/suite/funcs_1/datadict/processlist_val.inc:
        Handle the new TIME_MS column in information_schema.processlist.
      mysql-test/suite/funcs_1/r/is_columns_is.result:
        Handle new tables in information_schema.
      mysql-test/suite/funcs_1/r/is_tables_is.result:
        Handle new tables in information_schema.
      mysql-test/suite/funcs_1/r/is_tables_myisam.result:
        Fix previous bad merge; apparently this file was not merged along with test changes.
      mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result:
        Handle the new TIME_MS column in information_schema.processlist.
      mysql-test/suite/funcs_1/r/processlist_val_no_prot.result:
        Fix previous bad merge; apparently this file was not merged along with test changes.
        Also handle the new TIME_MS column in INFORMATION_SCHEMA.PROCESSLIST.
      mysql-test/suite/funcs_1/t/is_columns_is.test:
        Since result file includes PBXT information_schema tables, we need PBXT to run this test.
      5ea75e5f
  9. 09 Oct, 2009 3 commits
    • unknown's avatar
      Fix many test failures in parts test suite with --embedded-server. · c9fca7e4
      unknown authored
      Fix some connect options to work with embedded.
      
      Disable in --embedded tests that rely on connecting to mysqld externally by
      spawning mysqltest.
      
      Disable in --embedded tests that rely on the mysqltest --list_files command,
      which does not seem to work properly in --embedded.
      
      mysql-test/suite/parts/t/partition_alter1_1_2_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter1_1_2_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter1_1_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter1_1_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter1_2_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter1_2_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter2_1_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter2_1_maria.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter2_1_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter2_2_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter2_2_maria.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter2_2_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter3_innodb.test:
        Disable in --embedded tests that rely on the mysqltest --list_files command,
        which does not seem to work properly in --embedded.
      mysql-test/suite/parts/t/partition_alter3_myisam.test:
        Disable in --embedded tests that rely on the mysqltest --list_files command,
        which does not seem to work properly in --embedded.
      mysql-test/suite/parts/t/partition_alter4_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_alter4_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_basic_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_basic_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_basic_symlink_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_engine_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_engine_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_special_innodb.test:
        Fix some connect options to work with embedded.
      mysql-test/suite/parts/t/partition_syntax_innodb.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      mysql-test/suite/parts/t/partition_syntax_myisam.test:
        Disable in --embedded tests that rely on connecting to mysqld externally by
        spawning mysqltest.
      c9fca7e4
    • unknown's avatar
    • unknown's avatar
      Implement mysqltest --enable_prepare_warnings to properly fix some test failures. · 1689356f
      unknown authored
      The --enable_prepare_warnings allows to not discard warnings from autorepair
      of crashed table in --ps-protocol mode.
      
      Use this to properly fix the parts.partition_recover_myisam and
      maria.maria-recover tests.
      
      Add a test case for the new feature. This also adds missing test coverage
      for the case where the same warning is thrown in both prepare and execute
      phase.
      
      
      client/mysqltest.cc:
        Implement new commands --enable-prepare_warnings and --disable_prepare_warnings.
      mysql-test/r/mysqltest_ps.result:
        Add test case for new --enable_prepare_warning mysqltest command.
      mysql-test/suite/maria/t/maria-recover.test:
        Better fix of test case using new --enable_prepare_warnings command.
      mysql-test/suite/parts/t/partition_recover_myisam.test:
        Fix test failure in --ps-protocol mode.
      mysql-test/t/mysqltest_ps.test:
        Add test case for new --enable_prepare_warning mysqltest command.
      1689356f
  10. 08 Oct, 2009 4 commits
  11. 07 Oct, 2009 10 commits