1. 05 Jun, 2008 1 commit
    • Sergei Golubchik's avatar
      use "default" plugin configuration by default, not "none". · f6f88353
      Sergei Golubchik authored
      enable maria in the default plugin configuration
      
      config/ac-macros/plugins.m4:
        typo in comment fixed.
        change default plugin configuration to be "default" not "none".
        don't print default plugin configuration in the help text (as it's "default" anyway)
      configure.in:
        use "default" plugin configuration by default, not "none"
      storage/maria/plug.in:
        enable maria in the default plugin configuration
      f6f88353
  2. 04 Jun, 2008 3 commits
    • Michael Widenius's avatar
      Automatic merge · 06fd8990
      Michael Widenius authored
      06fd8990
    • Michael Widenius's avatar
      Fixed failing trnman-t unit test · 59294fb5
      Michael Widenius authored
      mysql-test/valgrind.supp:
        Fixed suppression rule
      storage/maria/unittest/trnman-t.c:
        Test failed becasue it accessed reused structures.
        I fixed this by creating a separate array to hold trids for the transactions
      59294fb5
    • Guilhem Bichot's avatar
      Making maria-recover.test work the same with debug and non-debug builds: one... · 11ea5a1b
      Guilhem Bichot authored
      Making maria-recover.test work the same with debug and non-debug builds: one error message was specific of
      debug builds and is now removed, left only in non-ha-maria programs.
      
      mysql-test/r/maria-recover.result:
        This warning is not thrown anymore when used in ha_maria
      mysql-test/t/maria-recover.test:
        In this patch, corruption warnings are unified between debug and non-debug builds, so test can run on both
      storage/maria/ha_maria.cc:
        declare that Maria is used from ha_maria
      storage/maria/ma_static.c:
        new variable to tell if Maria is used from ha_maria
      storage/maria/maria_def.h:
        Comment describing what maria_print_error() does. And change of this macro: it now does nothing when Maria
        is used from ha_maria.
      11ea5a1b
  3. 03 Jun, 2008 3 commits
    • Guilhem Bichot's avatar
      comments in tests · dee33675
      Guilhem Bichot authored
      mysql-test/t/maria-recover.test:
        comments
      dee33675
    • Guilhem Bichot's avatar
      Fix for BUG#36104 "INFORMATION_SCHEMA.TABLES shows TRANSACTIONAL=1 twice in CREATE_OPTIONS" · 2e595435
      Guilhem Bichot authored
      mysql-test/r/maria.result:
        result; before the bugfix it would be "TRANSACTIONAL=1 transactional=1"
      mysql-test/t/maria.test:
        test for BUG#36104 "INFORMATION_SCHEMA.TABLES shows TRANSACTIONAL=1 twice in CREATE_OPTIONS"
      sql-bench/example:
        doblewrite->doublewrite
      sql/mysqld.cc:
        fix of a wrong 5.1->maria merge of the past
      sql/sql_insert.cc:
        removing my old idea of disabling transactionality in CREATE SELECT:
        1) it caused bugs because re-enabling (ha_enable_transaction()) causes implicit commit, so in complex cases
        like "CREATE SELECT some_func())", where some_func() would want to insert two rows in another table, and fail on the second row, the implicit commit would commit the inserted row, while it should roll back.
        2) it's not needed anymore, because CREATE SELECT uses bulk insert, and Maria has transactionality disabled by
        bulk insert.
      sql/sql_show.cc:
        This was duplicate code, causing BUG#36104 "INFORMATION_SCHEMA.TABLES shows TRANSACTIONAL=1 twice in CREATE_OPTIONS"
      2e595435
    • Guilhem Bichot's avatar
      Limit maria-recover.test to debug builds and non-ps-protocol for now. Reason... · f94b5353
      Guilhem Bichot authored
      Limit maria-recover.test to debug builds and non-ps-protocol for now. Reason is that non-debug Maria outputs
      less corruption warnings (to be discussed), and mysqltest eats warnings when in ps-protocol (to be discussed).
      This is temporary until a better fix is decided.
      
      mysql-test/t/maria-recover.test:
        limit test to debug builds and non-ps-protocol for now
      f94b5353
  4. 02 Jun, 2008 4 commits
    • Guilhem Bichot's avatar
      send commit mails · d5893f3d
      Guilhem Bichot authored
      d5893f3d
    • Guilhem Bichot's avatar
      WL#4374 "Maria - force start if Recovery fails multiple times" · dc9d69c2
      Guilhem Bichot authored
      http://forge.mysql.com/worklog/task.php?id=4374
      new option --maria-force-start-after-recovery-failures=N; number of consecutive recovery failures (failures
      of log reading or recovery processing, anything in [translog_init(),maria_recovery_from_log()])
      is stored in the control file; if at a Maria start they are more than N, logs are removed. This is for automated
      systems which have to run whatever happens. As tables risk staying corrupted, --maria-recover should also
      be used on them: this revision makes maria-recover work (it was disabled).
      Fixed bug in translog_is_log_files(). translog_init() now prints message to error log if failed.
      Removed \0 in the output of SHOW ENGINE MARIA LOGS; removed hard-coded engine name there.
      
      KNOWN_BUGS.txt:
        As option --maria-force-start-after-recovery-failures is added, it corresponds to the wish "we should fix that if this happens etc".
        LOAD INDEX is not ignored since a few weeks. Listed concurrency bugs have been fixed some time ago.
        Recovery of fulltext and GIS indexes works since a few weeks.
      mysql-test/include/maria_make_snapshot.inc:
        configurable prefix in table's name (so far 't' or 't_corrupted')
      mysql-test/include/maria_make_snapshot_for_comparison.inc:
        configurable prefix in table's name (so far 't' or 't_corrupted')
      mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc:
        configurable prefix in table's name (so far 't' or 't_corrupted')
      mysql-test/include/maria_verify_recovery.inc:
        configurable prefix in table's name (so far 't' or 't_corrupted')
      mysql-test/lib/mtr_report.pl:
        new test maria-recover.test generates expected corruption warnings in the error log. maria-recovery.test's corrupted table is renamed to t_corrupted1 instead of t1.
      mysql-test/r/maria-preload.result:
        result update. maria_pagecache_read* values are similar to the previous version of this file, though a bit bigger
        because using the information_schema and the join leads to some internal maria temp table being used, and thus some
        blocks of it being read.
      mysql-test/r/maria-purge.result:
        engine's name in SHOW ENGINE MARIA LOGS changed.
      mysql-test/r/maria-recover.result:
        result for new test. We see corruption messages at first SELECT and then none at second SELECT, expected.
      mysql-test/r/maria-recovery.result:
        result update
      mysql-test/r/maria.result:
        new variables show up
      mysql-test/t/disabled.def:
        BUG#34911 is not fixed but the test had been made independent of the bug (workaround). A new bug (crash) has popped recently, so it has to stay
        disabled (BUG#35107).
      mysql-test/t/maria-preload.test:
        Work around BUG#34911 "FLUSH STATUS doesn't flush what it should":
        compute differences in status variables before and after relevant queries
      mysql-test/t/maria-recover-master.opt:
        test --maria-recover
      mysql-test/t/maria-recover.test:
        Test of the --maria-recover option (build a corrupted table and see if it is auto-repaired)
      mysql-test/t/maria-recovery-big.test:
        update for new API of include/maria*.inc
      mysql-test/t/maria-recovery-bitmap.test:
        update for new API of include/maria*.inc
      mysql-test/t/maria-recovery.test:
        update for new API of include/maria*.inc. Corrupted table t1 renamed to t_corrupted1, so that mtr_report.pl
        does not blindly remove all corruption messages for t1 which is
        a common name.
      storage/maria/ha_maria.cc:
        Enabling maria-recover.
        Adding option and global variable --maria_force_start_after_recovery_failures: ha_maria_init()
        calls mark_recovery_start() and mark_recovery_success() to keep track of failed consecutive recoveries
        and remove logs if needed.
        Removed \0 in the output of SHOW ENGINE MARIA LOGS; removed hard-coded engine name there.
      storage/maria/ma_checkpoint.c:
        new prototype
      storage/maria/ma_control_file.c:
        Storing in one byte in the control file, the number of consecutive recovery failures.
      storage/maria/ma_control_file.h:
        new prototype
      storage/maria/ma_init.c:
        new prototype
      storage/maria/ma_locking.c:
        Need to update open_count on disk at first write and close for transactional tables, like we already did for
        non-transactional tables, otherwise we cannot notice that the table is dubious.
      storage/maria/ma_loghandler.c:
        translog_is_log_files() is made more generic to serve either to search or to delete logs (the latter is
        for --maria-force-start-after-recovery-failures). It also had a bug (always returned FALSE).
      storage/maria/ma_loghandler.h:
        export function because ha_maria::mark_recovery_start() needs it
      storage/maria/ma_recovery.c:
        changing name of maria_recover() to distinguish from the maria-recover option.
      storage/maria/ma_recovery.h:
        changing name of maria_recover() to distinguish from the maria-recover option.
      storage/maria/ma_test_force_start.pl:
        Test of --maria-force-start-after-recovery-failures (and also, to be realistic, of --maria-recover).
        This is standalone because mysql-test-run does not support testing that multiple mysqld restarts expectedly failed.
        I'll have to run it on my machine and also on a Windows machine.
      storage/maria/unittest/ma_control_file-t.c:
        adding recovery_failures to the test
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        fix for compiler warning (unused variable in non-debug build)
      dc9d69c2
    • Michael Widenius's avatar
      Cleanup & Ignore · df8a56d0
      Michael Widenius authored
      .bzrignore:
        Removed duplicated entires
        Added missing files and directories
        Added ignoring of extensions of temporary files under windows
      df8a56d0
    • Michael Widenius's avatar
      Fixed build errors/warnings caused by my last push · 67d52349
      Michael Widenius authored
      mysql-test/valgrind.supp:
        Added suppression for not relevant warning for memory leak in dlclose
      storage/maria/ma_blockrec.c:
        Fixed build error on Windows
      storage/maria/ma_delete_all.c:
        Fixed call to wrong function
      storage/maria/ma_state.c:
        Added purcov suppression block
        Removed temporary debug printing
      67d52349
  5. 29 May, 2008 3 commits
    • unknown's avatar
      After merge fixes · cda763f7
      unknown authored
      
      mysys/my_handler_errors.h:
        Updated error messages
      storage/maria/ha_maria.cc:
        After merge fix
      storage/maria/ma_rt_key.c:
        Use share->state.state instead of info->state
      storage/maria/ma_rt_test.c:
        After merge fix
      cda763f7
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 1f0f6be5
      unknown authored
      into  mysql.com:/home/my/mysql-maria
      
      
      mysql-test/r/maria.result:
        Auto merged
      mysql-test/suite/ndb/r/ndb_auto_increment.result:
        Auto merged
      mysql-test/t/maria.test:
        Auto merged
      mysys/hash.c:
        Auto merged
      mysys/thr_lock.c:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/ha_ndbcluster.h:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      sql/ha_partition.h:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/log_event_old.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/protocol.cc:
        Auto merged
      sql/sql_load.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      storage/federated/ha_federated.cc:
        Auto merged
      storage/maria/Makefile.am:
        Auto merged
      storage/maria/ma_check.c:
        Auto merged
      storage/maria/ma_control_file.c:
        Auto merged
      storage/maria/ma_delete_all.c:
        Auto merged
      storage/maria/ma_dynrec.c:
        Auto merged
      storage/maria/ma_init.c:
        Auto merged
      storage/maria/ma_key_recover.c:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_page.c:
        Auto merged
      storage/maria/ma_range.c:
        Auto merged
      storage/maria/ma_recovery.c:
        Auto merged
      storage/maria/ma_test1.c:
        Auto merged
      storage/maria/maria_read_log.c:
        Auto merged
      storage/maria/unittest/ma_test_all-t:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Auto merged
      storage/maria/unittest/ma_test_recovery.pl:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      storage/myisam/myisamdef.h:
        Auto merged
      include/my_base.h:
        Manual merge where error code are kept same as in 5.1
      mysys/my_handler.c:
        No changes
      sql/item.cc:
        Manual merge
      sql/sql_class.cc:
        Manual merge
      sql/sql_insert.cc:
        Manual merge
      storage/maria/ha_maria.cc:
        Manual merge
      storage/maria/ma_blockrec.c:
        Manual merge
      storage/maria/ma_delete.c:
        Manual merge
      storage/maria/ma_write.c:
        Manual merge
      1f0f6be5
    • unknown's avatar
      WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" · a8ba9cb9
      unknown authored
      Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation
      Fixed wrong call to strmake
      Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert
      Allow storing year 2155 in year field
      When running with purify/valgrind avoid copying structures over themself
      Added hook 'trnnam_end_trans_hook' that is called when transaction ends
      Added trn->used_tables that is used to an entry for all tables used by transaction
      Fixed that ndb doesn't crash on duplicate key error when start_bulk_insert/end_bulk_insert are not called
      
      
      include/maria.h:
        Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation
      include/my_tree.h:
        Added macro 'reset_free_element()' to be able to ignore calls to the external free function.
        Is used to optimize end-bulk-insert in case of failures, in which case we don't want write the remaining keys in the tree
      mysql-test/install_test_db.sh:
        Upgrade to new mysql_install_db options
      mysql-test/r/maria-mvcc.result:
        New tests
      mysql-test/r/maria.result:
        New tests
      mysql-test/suite/ndb/r/ndb_auto_increment.result:
        Fixed error message now when bulk insert is not always called
      mysql-test/suite/ndb/t/ndb_auto_increment.test:
        Fixed error message now when bulk insert is not always called
      mysql-test/t/maria-mvcc.test:
        Added testing of versioning of count(*)
      mysql-test/t/maria-page-checksum.test:
        Added comment
      mysql-test/t/maria.test:
        More tests
      mysys/hash.c:
        Code style change
      sql/field.cc:
        Allow storing year 2155 in year field
      sql/ha_ndbcluster.cc:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/ha_ndbcluster.h:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/ha_partition.cc:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/ha_partition.h:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/handler.cc:
        Don't call get_dup_key() if there is no table object. This can happen if the handler generates a duplicate key error on commit
      sql/handler.h:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored (ie, the table will be deleted)
      sql/item.cc:
        Style fix
        Removed compiler warning
      sql/log_event.cc:
        Added new argument to ha_end_bulk_insert()
      sql/log_event_old.cc:
        Added new argument to ha_end_bulk_insert()
      sql/mysqld.cc:
        Removed compiler warning
      sql/protocol.cc:
        Added DBUG
      sql/sql_class.cc:
        Added DBUG
        Fixed wrong call to strmake
      sql/sql_insert.cc:
        Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert involves a lot of if's)
        Added new argument to ha_end_bulk_insert()
      sql/sql_load.cc:
        Added new argument to ha_end_bulk_insert()
      sql/sql_parse.cc:
        Style fixes
        Avoid goto in common senario
      sql/sql_select.cc:
        When running with purify/valgrind avoid copying structures over themself.  This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings
      sql/sql_select.h:
        Avoid copying structures over themself.  This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings
      sql/sql_table.cc:
        Call HA_EXTRA_PREPARE_FOR_DROP if table created by ALTER TABLE is going to be dropped
        Added new argument to ha_end_bulk_insert()
      storage/archive/ha_archive.cc:
        Added new argument to end_bulk_insert()
      storage/archive/ha_archive.h:
        Added new argument to end_bulk_insert()
      storage/federated/ha_federated.cc:
        Added new argument to end_bulk_insert()
      storage/federated/ha_federated.h:
        Added new argument to end_bulk_insert()
      storage/maria/Makefile.am:
        Added ma_state.c and ma_state.h
      storage/maria/ha_maria.cc:
        Versioning of count(*) and checksum
        - share->state.state is now assumed to be correct, not handler->state
        - Call _ma_setup_live_state() in external lock to get count(*)/checksum versioning. In case of
          not versioned and not concurrent insertable table, file->s->state.state contains the correct state information
        
        Other things:
        - file->s -> share
        - Added DBUG_ASSERT() for unlikely case
        - Optimized end_bulk_insert() to not write anything if table is going to be deleted (as in failed alter table)
        - Indentation changes in external_lock becasue of removed 'goto' caused a big conflict even if very little was changed
      storage/maria/ha_maria.h:
        New argument to end_bulk_insert()
      storage/maria/ma_blockrec.c:
        Update for versioning of count(*) and checksum
        Keep share->state.state.data_file_length up to date (not info->state->data_file_length)
        Moved _ma_block_xxxx_status() and maria_versioning() functions to ma_state.c
      storage/maria/ma_check.c:
        Update and use share->state.state instead of info->state
        info->s to share
        Update info->state at end of repair
        Call _ma_reset_state() to update share->state_history at end of repair
      storage/maria/ma_checkpoint.c:
        Call _ma_remove_not_visible_states() on checkpoint to clean up not visible state history from tables
      storage/maria/ma_close.c:
        Remember state history for running transaction even if table is closed
      storage/maria/ma_commit.c:
        Ensure we always call trnman_commit_trn() even if other calls fails. If we don't do that, the translog and state structures will not be freed
      storage/maria/ma_delete.c:
        Versioning of count(*) and checksum:
        - Always update info->state->checksum and info->state->records
      storage/maria/ma_delete_all.c:
        Versioning of count(*) and checksum:
        - Ensure that share->state.state is updated, as here is where we store the primary information
      storage/maria/ma_dynrec.c:
        Use lock_key_trees instead of concurrent_insert to check if trees should be locked.
        This allows us to lock trees both for concurrent_insert and for index versioning.
      storage/maria/ma_extra.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        - share->concurrent_insert -> share->non_transactional_concurrent_insert
        - Don't update share->state.state from info->state if transactional table
        
        Optimization:
        - Don't flush io_cache or bitmap if we are using FLUSH_IGNORE_CHANGED
      storage/maria/ma_info.c:
        Get most state information from current state
      storage/maria/ma_init.c:
        Add hash table and free function to store states for closed tables
        Install hook for transaction commit/rollback to update history state
      storage/maria/ma_key_recover.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
      storage/maria/ma_locking.c:
        Versioning of count(*) and checksum:
        - Call virtual functions (if exists) to restore/update status
        - Move _ma_xxx_status() functions to ma_state.c
        
        info->s -> share
      storage/maria/ma_open.c:
        Versioning of count(*) and checksum:
        - For not transactional tables, set info->state to point to new allocated state structure.
        - Initialize new info->state_start variable that points to state at start of transaction
        - Copy old history states from hash table (maria_stored_states) first time the table is opened
        - Split flag share->concurrent_insert to non_transactional_concurrent_insert & lock_key_tree
        - For now, only enable versioning of tables without keys (to be fixed in soon!)
        - Added new virtual function to restore status in maria_lock_database)
        
        More DBUG
      storage/maria/ma_page.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        - Modify share->state.state.key_file_length under share->intern_lock
      storage/maria/ma_range.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
        
        info->s -> share
      storage/maria/ma_recovery.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        - Update state information on close and when reenabling logging
      storage/maria/ma_rkey.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_rnext.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_rnext_same.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
        - Only skip rows based on file length if non_transactional_concurrent_insert is set
      storage/maria/ma_rprev.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_rsame.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_sort.c:
        Use share->state.state instead of info->state
        Fixed indentation
      storage/maria/ma_static.c:
        Added maria_stored_state
      storage/maria/ma_update.c:
        Versioning of count(*) and checksum:
        - Always update info->state->checksum and info->state->records
        - Remove optimization for index file update as it doesn't work for transactional tables
      storage/maria/ma_write.c:
        Versioning of count(*) and checksum:
        - Always update info->state->checksum and info->state->records
      storage/maria/maria_def.h:
        Move MARIA_STATUS_INFO to ma_state.h
        
        Changes to MARIA_SHARE:
        - Added state_history to store count(*)/checksum states
        - Added in_trans as counter if table is used by running transactions
        - Split concurrent_insert into lock_key_trees and on_transactional_concurrent_insert.
        - Added virtual function lock_restore_status
        
        Changes to MARIA_HA:
        - save_state -> state_save
        - Added state_start to store state at start of transaction
      storage/maria/maria_pack.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        
        Indentation fixes
      storage/maria/trnman.c:
        Added hook 'trnnam_end_trans_hook' that is called when transaction ends
        Added trn->used_tables that is used to an entry for all tables used by transaction
        More DBUG
        Changed return type of trnman_end_trn() to my_bool
        Added trnman_get_min_trid() to get minimum trid in use.
        Added trnman_exists_active_transactions() to check if there exist a running transaction started between two commit id
      storage/maria/trnman.h:
        Added 'used_tables'
        Moved all pointers into same groups to get better memory alignment
      storage/maria/trnman_public.h:
        Added prototypes for new functions and variables
        Chagned return type of trnman_end_trn() to my_bool
      storage/myisam/ha_myisam.cc:
        Added argument to end_bulk_insert() if operation should be aborted
      storage/myisam/ha_myisam.h:
        Added argument to end_bulk_insert() if operation should be aborted
      storage/maria/ma_state.c:
        Functions to handle state of count(*) and checksum
      storage/maria/ma_state.h:
        Structures and declarations to handle state of count(*) and checksum
      a8ba9cb9
  6. 26 May, 2008 1 commit
  7. 14 May, 2008 2 commits
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria · 20b6ddeb
      unknown authored
      into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.monty
      
      
      configure.in:
        Auto merged
      20b6ddeb
    • unknown's avatar
      Manual merge and some fixes. · 632edfc5
      unknown authored
      
      mysql-test/include/varchar.inc:
        Manual merge between 5.1 and maria.
        
        Added a comment.
      mysql-test/r/maria.result:
        Temporary fix.
      mysql-test/suite/binlog/r/binlog_unsafe.result:
        Manual merge.
      mysql-test/suite/binlog/t/binlog_unsafe.test:
        Manual merge.
      sql/handler.h:
        Manual merge + fix.
      sql/item.h:
        Manual merge + fix.
      sql/log.cc:
        Manual merge + fix.
      sql/sql_insert.cc:
        Manual merge + fix. A commit was done when using
        create table ... select from for transactional tables
        other than maria, when an error occurred and
        transaction should have been aborted.
      632edfc5
  8. 09 May, 2008 1 commit
  9. 07 May, 2008 1 commit
  10. 06 May, 2008 2 commits
  11. 29 Apr, 2008 1 commit
    • unknown's avatar
      After merge fixes. · 2bf2615f
      unknown authored
      
      BitKeeper/deleted/.del-my_bit.h:
        Delete: include/my_bit.h
      2bf2615f
  12. 28 Apr, 2008 1 commit
    • unknown's avatar
      Merge mysql.com:/home/my/mysql-5.1 · f601471e
      unknown authored
      into  mysql.com:/home/my/mysql-new
      
      
      BitKeeper/etc/ignore:
        auto-union
      BUILD/SETUP.sh:
        Auto merged
      CMakeLists.txt:
        Auto merged
      client/get_password.c:
        Auto merged
      client/mysqldump.c:
        Auto merged
      client/mysqltest.c:
        Auto merged
      cmd-line-utils/readline/bind.c:
        Auto merged
      cmd-line-utils/readline/display.c:
        Auto merged
      cmd-line-utils/readline/histexpand.c:
        Auto merged
      cmd-line-utils/readline/history.c:
        Auto merged
      cmd-line-utils/readline/readline.c:
        Auto merged
      cmd-line-utils/readline/text.c:
        Auto merged
      dbug/user.r:
        Auto merged
      extra/yassl/src/handshake.cpp:
        Auto merged
      include/config-win.h:
        Auto merged
      include/m_string.h:
        Auto merged
      include/my_global.h:
        Auto merged
      include/my_pthread.h:
        Auto merged
      include/mysql/plugin.h:
        Auto merged
      include/mysql_com.h:
        Auto merged
      include/thr_alarm.h:
        Auto merged
      libmysql/CMakeLists.txt:
        Auto merged
      libmysql/Makefile.shared:
        Auto merged
      libmysql/dll.c:
        Auto merged
      libmysql/get_password.c:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      libmysqld/Makefile.am:
        Auto merged
      mysql-test/lib/mtr_cases.pl:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/alter_table.result:
        Auto merged
      mysql-test/r/change_user.result:
        Auto merged
      mysql-test/r/create.result:
        Auto merged
      mysql-test/r/innodb.result:
        Auto merged
      mysql-test/r/merge.result:
        Auto merged
      mysql-test/r/mix2_myisam.result:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/r/query_cache.result:
        Auto merged
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/valgrind.supp:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/suite/rpl/r/rpl_events.result:
        Auto merged
      mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
        Auto merged
      mysql-test/t/create.test:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      mysql-test/t/subselect.test:
        Auto merged
      mysql-test/t/variables.test:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      mysys/mf_iocache.c:
        Auto merged
      mysys/mf_tempfile.c:
        Auto merged
      mysys/my_atomic.c:
        Auto merged
      mysys/my_bit.c:
        Auto merged
      mysys/my_bitmap.c:
        Auto merged
      mysys/my_compress.c:
        Auto merged
      mysys/my_create.c:
        Auto merged
      mysys/my_delete.c:
        Auto merged
      mysys/my_error.c:
        Auto merged
      mysys/my_init.c:
        Auto merged
      mysys/my_open.c:
        Auto merged
      mysys/my_realloc.c:
        Auto merged
      mysys/my_rename.c:
        Auto merged
      mysys/my_symlink.c:
        Auto merged
      mysys/my_sync.c:
        Auto merged
      mysys/my_thr_init.c:
        Auto merged
      mysys/thr_alarm.c:
        Auto merged
      mysys/thr_lock.c:
        Auto merged
      scripts/make_binary_distribution.sh:
        Auto merged
      server-tools/instance-manager/mysql_connection.cc:
        Auto merged
      sql/CMakeLists.txt:
        Auto merged
      sql/Makefile.am:
        Auto merged
      sql/events.cc:
        Auto merged
      sql/field.cc:
        Auto merged
      sql/field.h:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/gen_lex_hash.cc:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/ha_partition.h:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_strfunc.h:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/lock.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/log_event.cc:
        Auto merged
      sql/net_serv.cc:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/partition_info.cc:
        Auto merged
      sql/rpl_injector.cc:
        Auto merged
      sql/set_var.cc:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/slave.h:
        Auto merged
      sql/sp_head.cc:
        Auto merged
      sql/sql_acl.cc:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_cache.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_delete.cc:
        Auto merged
      sql/sql_load.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      sql/sql_prepare.cc:
        Auto merged
      sql/sql_repl.cc:
        Auto merged
      sql/sql_test.cc:
        Auto merged
      sql/sql_union.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      sql/unireg.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      storage/csv/ha_tina.h:
        Auto merged
      storage/myisam/CMakeLists.txt:
        Auto merged
      storage/myisam/ft_boolean_search.c:
        Auto merged
      storage/myisam/ft_eval.c:
        Auto merged
      storage/myisam/ft_nlq_search.c:
        Auto merged
      storage/myisam/ft_parser.c:
        Auto merged
      storage/myisam/ft_static.c:
        Auto merged
      storage/myisam/ft_stopwords.c:
        Auto merged
      storage/myisam/ft_test1.c:
        Auto merged
      storage/myisam/ft_update.c:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      storage/myisam/mi_check.c:
        Auto merged
      storage/myisam/mi_create.c:
        Auto merged
      storage/myisam/mi_delete.c:
        Auto merged
      storage/myisam/mi_delete_all.c:
        Auto merged
      storage/myisam/mi_dynrec.c:
        Auto merged
      storage/myisam/mi_key.c:
        Auto merged
      storage/myisam/mi_packrec.c:
        Auto merged
      storage/myisam/mi_range.c:
        Auto merged
      storage/myisam/mi_search.c:
        Auto merged
      storage/myisam/mi_test1.c:
        Auto merged
      storage/myisam/mi_test2.c:
        Auto merged
      storage/myisam/mi_test3.c:
        Auto merged
      storage/myisam/mi_unique.c:
        Auto merged
      storage/myisam/mi_write.c:
        Auto merged
      storage/myisam/myisamchk.c:
        Auto merged
      storage/myisam/myisamdef.h:
        Auto merged
      storage/myisam/myisampack.c:
        Auto merged
      storage/myisam/sort.c:
        Auto merged
      storage/myisam/sp_test.c:
        Auto merged
      support-files/mysql.spec.sh:
        Auto merged
      tests/mysql_client_test.c:
        Auto merged
      configure.in:
        Manual merge
      dbug/dbug.c:
        Restore to original state in Maria tree
        The big diff comes from a wrong pull from 5.0 -> 5.1 after backporting dbug to 5.0 from 5.1
      include/Makefile.am:
        Manual merge
      include/my_atomic.h:
        Ignore changes
      include/my_base.h:
        Manual merge
      include/my_dbug.h:
        Use orginal my_dbug.h from maria tree
      include/my_handler.h:
        Manual merge
      include/my_sys.h:
        Manual merge
      include/myisam.h:
        Manual merge
      mysql-test/lib/mtr_report.pl:
        Manual merge
      mysql-test/r/myisam.result:
        Manual merge
      mysql-test/suite/binlog/r/binlog_unsafe.result:
        Manual merge
      mysql-test/suite/binlog/t/binlog_unsafe.test:
        Manual merge
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
        Manual merge
      mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
        No changes
      mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
        Manual merge
      mysql-test/t/change_user.test:
        Manual merge
      mysql-test/t/disabled.def:
        Manual merge
      mysql-test/t/merge.test:
        No changes
      mysql-test/t/myisam.test:
        Manual merge
      mysys/Makefile.am:
        Manual merge
      mysys/array.c:
        Manual merge
      mysys/mf_keycache.c:
        Manual merge
      mysys/my_getsystime.c:
        Manual merge
      mysys/my_handler.c:
        Manual merge
      mysys/my_pread.c:
        Manual merge
      mysys/safemalloc.c:
        Manual merge
      sql/ha_partition.cc:
        Manual merge
      sql/handler.cc:
        Manual merge
      sql/lex.h:
        Manual merge
      sql/mysql_priv.h:
        Manual merge
      sql/mysqld.cc:
        Manual merge
      sql/set_var.h:
        Manual merge
      sql/sql_class.cc:
        Manual merge
      sql/sql_insert.cc:
        Manual merge
      sql/sql_parse.cc:
        Manual merge
      sql/sql_select.cc:
        Manual merge
      sql/sql_show.cc:
        Manual merge
      sql/sql_table.cc:
        Manual merge
      storage/myisam/mi_checksum.c:
        No changes
      storage/myisam/mi_extra.c:
        Manual merge
      storage/myisam/mi_open.c:
        Manual merge
      storage/myisammrg/ha_myisammrg.cc:
        Manual merge
      strings/strmake.c:
        No changes
      f601471e
  13. 24 Apr, 2008 5 commits
    • unknown's avatar
      compiler warning on non-debug build · f342b555
      unknown authored
      f342b555
    • unknown's avatar
      No more 'have_maria' variable, use information schema.engines. · 9cb2ebd6
      unknown authored
      Fix for some pushbuild failures.
      
      
      BitKeeper/deleted/.del-have_maria.require:
        Delete: mysql-test/r/have_maria.require
      mysql-test/include/have_maria.inc:
        no more 'have_maria' variable, use information schema.engines
      mysql-test/r/maria-recovery-rtree-ft.result:
        removed piece
      mysql-test/t/maria-recovery-rtree-ft.test:
        This portion seems to break on some pushbuild machine, let's disable
        it for now until BUG#36319 is fixed.
      sql/set_var.cc:
        no more 'have_maria' variable, use information schema.engines
      storage/maria/ma_rt_split.c:
        On non-debug builds, the logging was wrong
      9cb2ebd6
    • unknown's avatar
      compiler warning · b4a84e3a
      unknown authored
      b4a84e3a
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · eed37baf
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-monty
      
      eed37baf
    • unknown's avatar
      WL#3072 - Maria Recovery · 84b174df
      unknown authored
      Recovery of R-tree and fulltext indices.
      Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using
      repair-with-keycache method".
      Fix for bug (see ma_rt_index.c) where we could have a wrong
      page_link pointer causing wrong memory access during some R-tree
      index insert/delete.
      Making ma_rt_test work again (it had been neglected over time) and
      adding options (record type etc) to prepare it for integration into
      ma_test_all-t (but there is BUG#36321 about "ma_rt_test -M" crash)
      
      
      mysql-test/r/maria.result:
        correct result
      mysql-test/t/maria.test:
        now we get no error
      storage/maria/ma_blockrec.c:
        delete_dir_entry() and delete_head_or_tail() don't use info->keyread_buff.
        ma_get_length() does not change **packet, marking it with 'const' to
        remove some casts in callers of this function. The
        (const uchar**)&header casts will be removed when Monty changes 'header'
        to const uchar*.
        _ma_apply_redo_purge_row_head_or_tail() sets 'buff' from pagecache_read()
        so its initialization was superfluous.
      storage/maria/ma_check.c:
        Fix for BUG#35551 "Maria: crash in REPAIR TABLE/ENABLE KEYS if using repair-with-keycache method"
        (see comment in code)
      storage/maria/ma_create.c:
        FULLTEXT and SPATIAL indices have logging now, they are recoverable.
      storage/maria/ma_delete.c:
        Logging done by _ma_ck_delete() is moved to a function
        (_ma_write_undo_key_delete()), for reusal by R-tree logging.
        _ma_log_delete() is made non-static for same
        reason, and some of its parameters are made pointers to const.
        Removed wrong comment ("Note that for delete key" etc, contradicted by
        code and comment "Log also position to row" a few lines above)
      storage/maria/ma_ft_update.c:
        unneeded cast, comment for future
      storage/maria/ma_key_recover.c:
        Comment about possible deadlock.
        Write bad page to DBUG trace if KEY_OP_CHECK founds bad CRC.
        Support operation KEY_OP_MULTI_COPY.
        When we execute, in UNDO phase, UNDO_KEY_DELETE|INSERT, we must call
        the proper key insertion|deletion depending on if this is R-tree
        or B-tree.
        Explanation of of _ma_[un]lock_key_del() work, maybe useful for
        mortals like me.
      storage/maria/ma_key_recover.h:
        change of prototypes
      storage/maria/ma_loghandler.h:
        New operation which can be stored in REDO_INDEX log records: KEY_OP_MULTI_COPY
      storage/maria/ma_page.c:
        Comments
      storage/maria/ma_pagecache.c:
        typo
      storage/maria/ma_rt_index.c:
        Fix for bug: the page_link pointer in maria_rtree_insert_req()
        could be wrong when we set its 'changed' member; for the solution
        see ma_key_recover.h. It is needed only in cases when we manipulate
        several pages.
        Logging of changes done to pages by key insert/delete.
        maria_rtree_delete()'s main work is moved to a new function
        maria_rtree_real_delete(), which is used by maria_rtree_delete()
        and by applying of UNDO_KEY_INSERT.
      storage/maria/ma_rt_index.h:
        new prototypes and macros for ma_rt_index.c
      storage/maria/ma_rt_key.c:
        Logging of maria_rtree_add_key() and maria_rtree_delete_key().
        When inserting, split is necessary if there is not enough room for key:
        take checksum's occupied space in this calculation.
      storage/maria/ma_rt_key.h:
        new prototypes (those functions need to know the page's id
        because they do logging)
      storage/maria/ma_rt_mbr.c:
        Comments about what the functions change.
      storage/maria/ma_rt_split.c:
        maria_rtree_split_page() needs to know the page's id, because
        it does logging.
        Logging of what a split operation does to the split page (see
        comment of _ma_log_rt_split(): moves of keys inside the page,
        sometimes insertion of the new key, and shrinking of the page)
        and to the new page (receives some keys from split page, and
        sometimes the new key).
      storage/maria/ma_rt_test.c:
        ma_rt_test had been forgotten when maria_rkey() was changed some months ago
        (0->HA_WHOLE_KEY change), and when calls to maria_rnd(,,HA_OFFSET_ERROR)
        were rewritten to maria_scan() calls (which implies maria_scan_init()).
        The 'max_i' change is to adapt to the fact that maria_scan() does
        not return deleted records for BLOCK_RECORD but does so for other formats;
        the initial code assumed a certain number of deleted records would be
        returned, we change it to rather count only non-deleted ones.
        We also add more features to this test, like ma_test1 (the plan
        is to run ma_rt_test in ma_test_all-t):
        options to choose records' format, table checksum, transactions,
        checkpoints, end at specific stages, abort without committing,
        and debug trace.
      storage/maria/ma_test1.c:
        MY_INIT() does my_init().
      storage/maria/ma_write.c:
        Logging done by _ma_ck_write_btree_with_log() is moved to a function
        (_ma_write_undo_key_insert()), for reusal by R-tree logging.
        _ma_log_new() and _ma_log_change() are made non-static for same
        reason. Some parameters of logging functions are made pointers to const.
        If EXTRA_DEBUG_KEY_CHANGES, we now log CRC in _ma_log_change() too
        (better checks, bigger record).
      storage/maria/maria_read_log.c:
        Program takes no arguments, bail out if any, instead of silently discarding them
      storage/myisam/rt_test.c:
        rt_test had been forgotten when mi_rkey() was changed some months ago
        (0->HA_WHOLE_KEY change).
        The 'max_i' change is to make it symmetric with ma_rt_test.c
      mysql-test/r/maria-gis-rtree-dynamic.result:
        correct result
      mysql-test/r/maria-gis-rtree-trans.result:
        correct result
      mysql-test/r/maria-recovery-rtree-ft.result:
        almost correct result (hitting BUG# in the end)
      mysql-test/t/maria-gis-rtree-dynamic.test:
        test R-tree & dynamic row format
      mysql-test/t/maria-gis-rtree-trans.test:
        Test R-tree and page row format and transactional
      mysql-test/t/maria-recovery-rtree-ft-master.opt:
        usual options for recovery testing
      mysql-test/t/maria-recovery-rtree-ft.test:
        test of recovery of R-tree and fulltext indices.
      84b174df
  14. 22 Apr, 2008 1 commit
    • unknown's avatar
      Fixed bugs related to huge records where group list do not · af68a40d
      unknown authored
        fit in on one page (many chunks type 0 created) (BUG#34695).
      Maria log dump now can read unittest logs.
      
      
      storage/maria/CMakeLists.txt:
        Maria log dump now can read unittest logs.
      storage/maria/Makefile.am:
        Maria log dump now can read unittest logs.
      storage/maria/unittest/sequence_storage.c:
        New BitKeeper file ``storage/maria/unittest/sequence_storage.c''
      storage/maria/unittest/sequence_storage.h:
        New BitKeeper file ``storage/maria/unittest/sequence_storage.h''
      af68a40d
  15. 21 Apr, 2008 3 commits
  16. 16 Apr, 2008 2 commits
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 02b5b77a
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-clean
      
      02b5b77a
    • unknown's avatar
      Fix for ma_test_all-t failure and dbug/tests-t failure on Solaris: · 02b5d8eb
      unknown authored
      on that machine, "perl" calls /usr/local/bin/perl (so this is what
      runs unittest's unit.pl), while some test scripts (ma_test_recovery.pl
      etc) use /usr/bin/perl which seems to either conflict with /usr/local/bin/perl
      or have problems of its own (Perl errors when loading modules).
      Instead we use perl from the PATH. /usr/bin/env seems to be available
      on lots of Unix machines.
      
      
      dbug/tests-t.pl:
        look for perl in PATH
      storage/maria/unittest/ma_test_all-t:
        Look for perl in PATH
      storage/maria/unittest/ma_test_recovery.pl:
        Look for perl in PATH. Close MY_LOG to flush buffers to that diff sees
        the whole file
      02b5d8eb
  17. 15 Apr, 2008 2 commits
  18. 14 Apr, 2008 1 commit
  19. 11 Apr, 2008 1 commit
    • unknown's avatar
      Fix for BUG#35351 "Maria: R-tree index does not return all expected rows" · 6854f3fd
      unknown authored
      
      BitKeeper/triggers/post-commit:
        commits to Maria public list
      mysql-test/r/maria-gis-rtree.result:
        result is good now, similar to MyISAM's (gis-rtree.result)
      storage/maria/ma_rt_index.c:
        R-tree key-reading code used info->buff as a cache for the next key read,
        but between key read and next key read, there is record read, which
        uses info->buff too. In detail, during a SELECT:
        First key read: maria_rfirst() is called, which calls maria_rtree_find_first() which calls 
        maria_rtree_find_req() which comes here
                if (after_key < last)
                {
                  // ! the list of keys is copied to info->buff
                  // and info->buff is remembered in info->int_keypos
                  info->int_keypos= info->buff;
                  info->int_maxpos= info->buff + (last - after_key);
                  memcpy(info->buff, after_key, last - after_key);
                  info->keyread_buff_used= 0;
                }
        Then record read:
        _ma_read_block_record() (as well as some other functions of
        ma_blockrec.c) overwrites info->buff:
          if (!(buff= pagecache_read(share->pagecache,
                                     &info->dfile, ma_recordpos_to_page(record_pos), 0,
                                     info->buff, share->page_type,
                                     PAGECACHE_LOCK_LEFT_UNLOCKED, 0)))
        So, this has the effect that the keys saved by maria_rtree_find_req() are now lost:
        info->int_keypos now contains a copy of a data page!
        Then maria_rnext_same() runs (to find second row), calls maria_rtree_find_next() which
        does:
          if (!info->keyread_buff_used)
          {
            uchar *key= info->int_keypos;
            while (key < info->int_maxpos)
            {
              if (!maria_rtree_key_cmp(keyinfo->seg,
                                       info->first_mbr_key, key,
                                       info->last_rkey_length, search_flag))
        
        i.e. maria_rtree_key_cmp() is doing comparisons on values it reads from the data page.
        Naturally this is bad and no row is found.
        Origin of the bug: MARIA_HA::keyread_buff is new in Maria.
        Solution: use keyread_buff instead of buff (like _ma_search_next() does),
        in R-tree code. Note that ma_blockrec.c functions also use keyread_buff
        but they all are write-functions, which should not be running close
        to next-key-read. Also note that some ma_rt_index.c functions still
        use info->buff, but they are about writes too.
        Thanks Monty for the idea.
      6854f3fd
  20. 10 Apr, 2008 1 commit
    • unknown's avatar
      Added versioning of row data · 716a3493
      unknown authored
      Will in future changeset (soon) av versioning of status variables (number of rows) and index
      Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings
      Removed some not needed variables (as noticed by Guilhem)
      
      
      include/maria.h:
        Added prototypes for maria_chk_init_for_check(), maria_versioning() and maria_ignore_trids()
      include/my_base.h:
        Add new error HA_ERR_ROW_NOT_VISIBLE
      include/myisamchk.h:
        Added variables for checking visibility of rows during maria_chk
      include/thr_lock.h:
        Changed argument type from int to my_bool for get_status
        Added variable allow_multiple_concurrent_insert, to signal if table supports multiple concurrent inserts
      mysql-test/r/maria-page-checksum.result:
        Added missing drop table
      mysql-test/t/maria-page-checksum.test:
        Added missing drop table
      mysys/my_handler.c:
        Added new error messages
      mysys/thr_lock.c:
        Added support for multiple concurrent inserts, if table handler supports it
      sql/sql_yacc.yy:
        Added LOCK TABLE table_name WRITE CONCURRENT
        This was added (temporarly?) to be able to check versioning with Maria
      storage/csv/ha_tina.cc:
        Updated parameter for get_status
      storage/maria/ha_maria.cc:
        Added calls to maria_chk_init_status()
        Fixed call to ma_control_file_open()
      storage/maria/ma_blockrec.c:
        Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings
        Changed back some 'header' parameters to const char*
        Removed some casts
        
        Added support for versioning:
        - If info->row_flag & ROW_FLAG_TRANSID is set, store transaction id together with the row
        - When reading rows, check if rows are visible. Give error if not
        - When scanning table, ignore not visible rows
        - Added function parameters to some functions, to be able to call _ma_compact_block_page() with different parameters depending of if the page is a HEAD or TAIL page
        - _ma_compact_block_page() deletes transaction id's that are visible by all running transactions
        - Added functions for thr_lock() to enable multiple concurrent inserts
        - Added helper function 'mysql_versioning()' to enable/disable versioning
        - Added helper function maria_ignore_trids(), used by maria_chk and maria_pack to see all rows.
      storage/maria/ma_blockrec.h:
        Updated parameters for some functions.
        Added new functions to read/store state with thr_lock
      storage/maria/ma_check.c:
        Enable handling of transaction id's in rows
        Give a readable error if a table contains a transation id that makes rows not visible
      storage/maria/ma_control_file.c:
        Added option to not give warning if control file doesn't exists.
      storage/maria/ma_control_file.h:
        Updated parameter lists for ma_control_file_open()
      storage/maria/ma_delete.c:
        Removed not used variable (suggestion by Guilhem)
      storage/maria/ma_locking.c:
        Changed type of argument from int -> my_bool
      storage/maria/ma_open.c:
        Removed not used variables 'key_write_undo_lsn' and 'key_delete_undo_lsn'
        Added new thr_lock interface functions for BLOCK_RECORD to enable multiple concurrent insert
      storage/maria/ma_test1.c:
        Added option --versioning (-C) to check versioning
      storage/maria/ma_test2.c:
        Added option -C to check versioning
      storage/maria/ma_test_recovery:
        Forward argumetns to ma_test_recovery.pl
      storage/maria/ma_write.c:
        Removed not used variable key_write_undo_lsn
      storage/maria/maria_chk.c:
        Always read control file (if exist) at start
        Initialize checking of tables by calling maria_chk_init_for_check()
        In verbose mode and in case of error, print max found transaction id
      storage/maria/maria_def.h:
        Added Trid to MARIA_ROW to be able to check transaction id for found row
        Moved 'base_length' from MARIA_ROW to MARIA_HA to be able to handle different base length (with and without TRANSID) without if's
        Added default row_flag to MARIA_HA for the same reason
        Changed LEX_STRING -> LEX_CUSTRING to avoid casts in ma_blockrec.c
        Removed not needed variables key_write_undo_lsn and key_delete_undo_lsn
        Added prototypes for new functions and fixed those that had changed
      storage/maria/maria_pack.c:
        Ensure we can read all rows from the file, independent of the used transaction id
      storage/maria/maria_read_log.c:
        Updated arguments to ma_control_file_open()
      storage/maria/trnman.c:
        If we have only one transaction, fixed that min_read_from contains current transaction
        Fixed that trnman_can_read_from() returns that row is readable if it was written by current transaction
      storage/maria/unittest/ma_control_file-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_all-t:
        Added test of versioning
        Removed printing of one extra space
      storage/maria/unittest/ma_test_loghandler-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_nologs-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_recovery.expected:
        Updated file with result from new tests
      storage/maria/unittest/ma_test_recovery.pl:
        Added options --abort-on-error and --verbose
        In case of --verbose, print all excuted shell commands
        Added test of versioning
      storage/myisam/mi_locking.c:
        Updated type of parameter
      storage/myisam/myisamdef.h:
        Updated type of parameter
      mysql-test/r/maria-mvcc.result:
        New BitKeeper file ``mysql-test/r/maria-mvcc.result''
      mysql-test/t/maria-mvcc.test:
        New BitKeeper file ``mysql-test/t/maria-mvcc.test''
      716a3493
  21. 08 Apr, 2008 1 commit
    • unknown's avatar
      WL#3072 - Maria recovery · a36488ef
      unknown authored
      When applying a REDO_INDEX_[FREE|NEW]_PAGE, update state members only
      if record is newer than current state.
      Print a warning when an old Maria is zero-ing out portions of the
      control file which it does not know.
      
      
      storage/maria/ma_control_file.c:
        Print a warning when an old Maria is zero-ing out portions of the
        control file which it does not know; it may help us when helping
        troubleshoot customers' and users' problems.
      storage/maria/ma_key_recover.c:
        When applying a REDO_INDEX_[FREE|NEW]_PAGE, we should update the state
        members (key_root, key_del) only if this REDO is newer than the current
        state. We cannot just update it unconditionally, because that may
        change it to an old state, which may not be later corrected if all later
        REDOs are entirely skipped due to their page not being in the dirty pages
        list of the checkpoint record.
      a36488ef