1. 16 Nov, 2007 1 commit
  2. 14 Nov, 2007 1 commit
    • unknown's avatar
      WL#3072 - Maria recovery · 1bc5e3b9
      unknown authored
      maria_read_log used to always print a warning message at startup
      to say it is unsafe if ALTER TABLE was used. Now it prints it only
      if the log does show the problem (=ALTER TABLE or CREATE SELECT, which
      both disable logging of REDO_INSERT*).
      For that, when ha_maria::external_lock() disables transactionality
      it writes a LOGREC_INCOMPLETE_LOG to the log, which "maria_read_log -a"
      picks up to write a warning.
      REPAIR TABLE also disables those REDO_INSERT* but as maria_read_log
      executes LOGREC_REDO_REPAIR no warning is needed.
      
      
      storage/maria/ha_maria.cc:
        as we now log a record when disabling transactionility, we need the
        TRN to be set up first
      storage/maria/ma_blockrec.c:
        comment
      storage/maria/ma_loghandler.c:
        new type of log record
      storage/maria/ma_loghandler.h:
        new type of log record
      storage/maria/ma_recovery.c:
        * maria_apply_log() now returns a count of warnings. What currently
        produces warnings is:
        - skipping applying UNDOs though there are some (=> inconsistent table)
        - replaying log (in maria_read_log) though the log contains some
        ALTER TABLE or CREATE SELECT (log misses REDO_INSERT* for those
        and is so incomplete).
        Count of warnings affects the final message of maria_read_log and
        recovery (though in recovery none of the two conditions above should
        happen).
        * maria_read_log used to always print a warning message at startup
        to say it is unsafe if ALTER TABLE was used. Now it prints it only
        if the log does show the problem, i.e. ALTER TABLE or CREATE SELECT
        was used (both disable logging of REDO_INSERT* as those records are
        not needed for recovery; those missing records in turn make
        recreation-from-scratch, via maria_read_log, impossible). For that,
        when ha_maria::external_lock() disables transactionality,
        _ma_tmp_disable_logging_for_table() writes a LOGREC_INCOMPLETE_LOG to
        the log, which maria_apply_log() picks up to write a warning.
      storage/maria/ma_recovery.h:
        maria_apply_log() returns a count of warnings
      storage/maria/maria_def.h:
        _ma_tmp_disable_logging_for_table() grows so becomes a function
      storage/maria/maria_read_log.c:
        maria_apply_log can now return a count of warnings, to temper the
        "SUCCESS" message printed in the end by maria_read_log.
        Advise users to make a backup first.
      1bc5e3b9
  3. 13 Nov, 2007 2 commits
    • unknown's avatar
      Addendum to WL#4137 "Maria- Framework for testing recovery in mysql-test-run": · ac590d9c
      unknown authored
      possibility, if requested in the test, to do byte-for-byte comparison
      of data files after recovery. This makes sense only when testing
      REDOs, as UNDO phase generates new log records thus data pages get
      new LSNs. First test of maria-recovery.test is changed to test only
      REDOs and do byte-for-byte comparison.
      
      
      mysql-test/include/maria_make_snapshot.inc:
        possibility to compare physically the data files (makes sense
        only if testing REDO phase).
      mysql-test/include/maria_verify_recovery.inc:
        allow physical comparison of data files after recovery if requested
      mysql-test/r/maria-recovery.result:
        result update (first test tests REDO only now)
      mysql-test/t/maria-recovery.test:
        first test tests REDO only now, and thus can do byte-for-byte
        comparison of data files.
      ac590d9c
    • unknown's avatar
      * WL#4137 Maria- Framework for testing recovery in mysql-test-run · 5fbd5daf
      unknown authored
      See test maria-recovery.test for a model; all include scripts have
      an "API" section at start if they do take parameters from outside.
      * Fixing bug reported by Jani and Monty (when two REDOs about the same
      page in one group, see ma_blockrec.c). 
      * Fixing small bugs in recovery
      
      
      mysql-test/include/wait_until_connected_again.inc:
        be sure to enter the loop (the previous query by the caller may not have
        failed: it could be
        query;
        mysqladmin shutdown;
        call this script).
      mysql-test/lib/mtr_process.pl:
        * Through the "expect" file a test can tell mtr that a server crash
        is expected. What the file contains is irrelevant. Now if its last
        line starts with "wait", mtr will wait before restarting (it will
        wait for the last line to not start with "wait"). This is for
        tests which need to mangle files under the feet of a dead mysqld.
        * Remove "expect" file before restarting; otherwise there could be a
        race condition: tests sees server restarted, does something, writes
        an "expect" file, and then mtr removes that file, then
        test kills mysqld, and then mtr will never restart it.
      storage/maria/ma_blockrec.c:
        - when applying a REDO in recovery, we don't anymore put UNDO's LSN on the page
        at once; indeed if in this REDO's group there comes another REDO
        for the same page it would be wrongly skipped. Instead, we keep
        pages pinned, don't change their LSN. When done with all REDOs
        of the group we unpin them and stamp them with UNDO's LSN.
        - fixing bug in applying of REDO_PURGE_BLOCKS in recovery: page_range
        sometimes has TAIL_BIT set, need to turn it down to know the real page
        range.
        - Both bugs are covered in maria-recovery.test
      storage/maria/ma_checkpoint.c:
        Capability to, in debug builds only, do some special operations
        (flush all bitmap and data pages, flush state, flush log)
        and crash mysqld, to later test recovery.
         Driven by some --debug=d, symbols.
      storage/maria/ma_open.c:
        debugging info
      storage/maria/ma_pagecache.c:
        Now that we can _ma_unpin_all_pages() during the REDO phase
        to set page's LSN, the assertion needs to be relaxed.
      storage/maria/ma_recovery.c:
        - open trace file in append mode (useful when a test triggers several
        recoveries, we see them all).
        - fixing wrong error detection, it's possible that during recovery
        we want to open an already open table.
        - when applying a REDO in recovery, we don't anymore put UNDO's LSN on the page
        at once; indeed if in this REDO's group there comes another REDO
        for the same page it would be wrongly skipped. Instead, we keep
        pages pinned, don't change their LSN. When done with all REDOs
        of the group we unpin them and stamp them with UNDO's LSN.
        - we verify that all log records of a group are about the same table,
        for debugging.
      mysql-test/r/maria-recovery.result:
        result
      mysql-test/t/maria-recovery-master.opt:
        crash is expected, core file would take room, stack trace would
        wake pushbuild up.
      mysql-test/t/maria-recovery.test:
        Test of recovery from mysql-test (it is already tested as unit tests
        in ma_test_recovery) (WL#4137)
        - test that, if recovery is made to start on an empty table it can
        replay the effects of committed and uncommitted statements (having only
        the committed ones in the end result). This should be the first test
        for someone writing code of new REDOs.
        - test that, if mysqld is crashed and recovery runs we have only
        committed statements in the end result. Crashes are done in different
        ways: flush nothing (so, uncommitted statement is often missing
        from the log => no rollback to do); flush pagecache (implicitely flushes
        log (WAL)) and flush log, both causes rollbacks; flush log can also
        flush state (state.records etc) to test recovery of the state
        (not tested well now as we repair the index anyway).
        - test of bug found by Jani and Monty in recovery (two REDO about
        the same page in one group).
      mysql-test/include/maria_empty_logs.inc:
        removes logs, to have a clean sheet for testing recovery.
      mysql-test/include/maria_make_snapshot.inc:
        copies a table to another directory, or back, or compares both
        (comparison is not implemented as physical comparison is impossible
        if an UNDO phase happened).
      mysql-test/include/maria_make_snapshot_for_comparison.inc:
        copies tables to another directory so that they can later
        serve as a comparison reference (they are the good tables,
        recovery should produce similar ones).
      mysql-test/include/maria_make_snapshot_for_feeding_recovery.inc:
        When we want to force recovery to start on old tables, we prepare
        old tables with this script: we put them in a spare directory.
        They are later copied back over mysqltest tables while mysqld is dead.
        We also need to copy back the control file, otherwise mysqld,
        in recovery, would start from the latest checkpoint: latest
        checkpoint plus old tables is not a recovery-possible scenario of course.
      mysql-test/include/maria_verify_recovery.inc:
        causes mysqld to crash, restores old tables if requested,
        lets recovery run, compares resulting tables with reference tables
        by using CHECKSUM TABLE.
        We don't do any sanity checks on page's LSN in resulting tables, yet.
      5fbd5daf
  4. 11 Nov, 2007 2 commits
    • unknown's avatar
      comments · 5e2aaf69
      unknown authored
      5e2aaf69
    • unknown's avatar
      WL#3071 Maria checkpoint · 086b34c9
      unknown authored
      Fixing bad comments (I remember my maths' teacher "one late night you'll
      obey to the simplifications made by your tired neurons"; exactly
      what happened here). In Checkpoint, when we flush a table's state
      we must flush all log records (WAL), not only those before checkpoint
      started.
      
      
      storage/maria/ma_bitmap.c:
        there was a flaw in reasoning, bug does exist.
      storage/maria/ma_blockrec.c:
        moving piece of comment to ma_checkpoint.c
      storage/maria/ma_checkpoint.c:
        Comments.
        When checkpoint flushes a state, WAL imposes that all records up
        to this state have been flushed, not only up to checkpoint_start_log_horizon.
      storage/maria/ma_recovery.c:
        finishing comment.
      086b34c9
  5. 09 Nov, 2007 2 commits
    • unknown's avatar
      WL#3071 - Maria checkpoint · c2084d2a
      unknown authored
      Observe WAL for the table's state: all log records needed for undoing
      uncommitted state must be in the log before we flush state.
      
      
      storage/maria/ha_maria.cc:
        comments
      storage/maria/ma_bitmap.c:
        Comment for why there is no bug
      storage/maria/ma_blockrec.c:
        comment for why there is no bug
      storage/maria/ma_checkpoint.c:
        Observe WAL for the table's state: all log records needed for undoing
        uncommitted state must be in the log before we flush state. I tested
        by hand that the bug existed (create table, insert one row into it
        but let that insert pause after increasing data_file_length, let
        checkpoint start but kill it after it has flushed state).
        Log contains nothing, table is not recovered though it has
        a too big data_file_length. With this bugfix, the log contains
        REDO so table is opened so data_file_length is corrected.
      storage/maria/ma_close.c:
        If table is read-only we must never write to it.
        Should be a no-change in fact, as if read-only, share->changed is
        normally always false.
      storage/maria/ma_recovery.c:
        documenting bug found by Monty. Print when fixing data_file_length.
      c2084d2a
    • unknown's avatar
      Infinite loop in case of given address more then last LSN fixed. · 81e84a75
      unknown authored
      
      storage/maria/ma_loghandler.c:
        Infinite loop in case of given address more then last LSN fixed
        (now it means just flush all log).
        Removed unneeded ASSERT.
      storage/maria/unittest/ma_test_loghandler-t.c:
        The test case of flushing all log added.
      81e84a75
  6. 05 Nov, 2007 1 commit
  7. 19 Oct, 2007 3 commits
    • unknown's avatar
      WL#3071 - Maria checkpoint · 1cede432
      unknown authored
      don't take a checkpoint at end of REDO phase because blocks' rec_lsn
      are not set. Fixes some assertion failures during tests of killing
      the UNDO phase (recovery then started from the end-of-REDO-phase
      checkpoint, wrongly ignoring REDOs before that record).
      
      
      storage/maria/ma_blockrec.c:
        note for a bug (mail sent to colleagues, put on todo)
      storage/maria/ma_recovery.c:
        this checkpoint at end of REDO phase is incorrect, disabling it.
        The one at end of UNDO phase remains.
      1cede432
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 155365f0
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-for-undo-phase
      
      
      155365f0
    • unknown's avatar
      WL#3071 - Maria checkpoint · 77017191
      unknown authored
      - serializing calls to flush_pagecache_blocks_int() on the same file
      to avoid known concurrency bugs
      - having that, we can now enable the background thread, as the
      flushes it does are now supposedly safe in concurrent situations.
      - new type of flush FLUSH_KEEP_LAZY: when the background checkpoint
      thread is flushing a packet of dirty pages between two checkpoints,
      it uses this flush type, indeed if a file is already being flushed
      by another thread it's smarter to move on to the next file than wait.
      - maria_checkpoint_frequency renamed to maria_checkpoint_interval.
      
      
      include/my_sys.h:
        new type of flushing for the page cache: FLUSH_KEEP_LAZY
      mysql-test/r/maria.result:
        result update
      mysys/mf_keycache.c:
        indentation. No FLUSH_KEEP_LAZY support in key cache.
      storage/maria/ha_maria.cc:
        maria_checkpoint_frequency was somehow a hidden part of the
        Checkpoint API and that was not good. Now we have checkpoint_interval,
        local to ha_maria.cc, which serves as container for the user-visible
        maria_checkpoint_interval global variable; setting it calls
        update_checkpoint_interval which passes the new value to
        ma_checkpoint_init(). There is no hiding anymore.
        By default, enable background thread which does checkpoints
        every 30 seconds, and dirty page flush in between. That thread takes
        a checkpoint when it ends, so no need for maria_hton_panic to take one.
        The | is | and not ||, because maria_panic() must always be called.
        frequency->interval.
      storage/maria/ma_checkpoint.c:
        Use FLUSH_KEEP_LAZY for background thread when it flushes packets of
        dirty pages between two checkpoints: it is smarter to move on to
        the next file than wait for it to have been completely flushed, which
        may take long.
        Comments about flush concurrency bugs moved from ma_pagecache.c.
        Removing out-of-date comment.
        frequency->interval.
        create_background_thread -> (interval>0).
        In ma_checkpoint_background(), some variables need to be preserved
        between iterations.
      storage/maria/ma_checkpoint.h:
        new prototype
      storage/maria/ma_pagecache.c:
        - concurrent calls of flush_pagecache_blocks_int() on the same file
        cause bugs (see @note in that function); we fix them by serializing
        in this situation. For that we use a global hash of (file, wqueue).
        When flush_pagecache_blocks_int() starts it looks into the hash,
        using the file as key. If not found, it inserts (file,wqueue) into the
        hash, flushes the file, and finally removes itself from the hash and
        wakes up any waiter in the queue. If found, it adds itself to the
        wqueue and waits.
        - As a by-product, we can remove changed_blocks_is_incomplete
        and replace it by scanning the hash, replace the sleep() by a queue wait.
        - new type of flush FLUSH_KEEP_LAZY: when flushing a file, if it's
        already being flushed by another thread (even partially), return
        immediately.
      storage/maria/ma_pagecache.h:
        In pagecache, a hash of files currently being flushed (i.e. there
        is a call to flush_pagecache_blocks_int() for them).
      storage/maria/ma_recovery.c:
        new prototype
      storage/maria/ma_test1.c:
        new prototype
      storage/maria/ma_test2.c:
        new prototype
      77017191
  8. 18 Oct, 2007 2 commits
    • unknown's avatar
      mysys/my_getopt.c · fd4ca26d
      unknown authored
          always process uint/ulong using ulonglong (unsigned) code
          dbug printout for adjusted option values
      strings/llstr.c
          ullstr() - the unsigned brother of llstr()
      
      
      include/m_string.h:
        ullstr() - the unsigned brother of llstr()
      mysql-test/t/variables.test:
        test adjusted for 32bit
      mysys/my_getopt.c:
        always process uint/ulong using ulonglong (unsigned) code
        dbug printout for adjusted option values
      strings/llstr.c:
        ullstr() - the unsigned brother of llstr()
      fd4ca26d
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 9bcbf851
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-tmp
      
      
      9bcbf851
  9. 17 Oct, 2007 5 commits
    • unknown's avatar
      Bugfix from Sanja (when truncating log at restart) · 9d6b8f1e
      unknown authored
      
      storage/maria/ma_loghandler.c:
        applying patch for bugfix, by Sanja.
      9d6b8f1e
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 59b0303e
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-for-undo-phase
      
      
      storage/maria/ma_recovery.c:
        Auto merged
      59b0303e
    • unknown's avatar
      WL#3071 Maria checkpoint · 0f1feefa
      unknown authored
      Ability for flush_pagecache_blocks() to flush only certain pages of
      a file, as instructed by an option "filter" pointer-to-function argument;
      Checkpoint and background dirty page flushing use that to flush only
      pages which have been dirty for long enough and bitmap pages.
      Fix for a bug in flush_cached_blocks() (no idea if it could produce
      a bug in real life, but theoretically it is).
      Testing checkpoint in ma_test_recovery via ma_test1 and ma_test2.
      Background checkpoint & dirty pages flush thread is still disabled
      by default in ha_maria.
      
      
      mysql-test/r/maria.result:
        result update
      storage/maria/ha_maria.cc:
        blank after function comment
      storage/maria/ma_checkpoint.c:
        Using an enum instead of 0/1/2 (applying Sanja's review comments).
        The comment about "this is an horizon" can be removed as Sanja
        created translog_next_LSN() which parse_checkpoint_record() uses.
        Variables in ma_checkpoint_background() cannot be declared in the
        for() as their value must not be reset at each iteration!
      storage/maria/ma_pagecache.c:
        adding to flush_pagecache_blocks() optional arguments 'filter'
        (pointer to function) and 'filter_arg'; if filter!=NULL this function
        will be called for each block of the file and will reply if this
        block and following ones should be flushed or not (3 possible
        replies).
        Fixing a bug when flush_cached_blocks() skips a pinned page: it has
        to unset PCBLOCK_IN_FLUSH set by flush_pagecache_blocks_int().
      storage/maria/ma_pagecache.h:
        flush_pagecache_blocks() is changed to take "filter" and "filter_arg"
        arguments. "filter", if it is not NULL, may return one value
        among enum pagecache_flush_filter_result.
      storage/maria/ma_recovery.c:
        open_count=0 when closing tables at the end of recovery.
      storage/maria/ma_test1.c:
        Optional checkpoints (-H#) at various stages (stages similar
        to --testflag), for testing of checkpoints.
      storage/maria/ma_test2.c:
        Optional checkpoints (-H#) at various stages (stages similar
        to -t), for testing of checkpoints.
      storage/maria/ma_test_recovery.expected:
        Result update: the results of the additional test run with -H#
        (checkpoints) are added here. They are exactly identical to without
        checkpoints except that the index's Root (printed by maria_chk)
        is more correct when using checkpoints. This is because checkpoint
        flushed the state, so it happens to be correct, while no-checkpoint
        does not flush the state, and recovery does not recover indexes
        so Root is never fixed. When we recover indices, this will go away.
      storage/maria/ma_test_recovery:
        We duplicate the loop of tests to add an additional run with
        checkpoints at various stages, to see if maria_read_log
        uses them fine.
      0f1feefa
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · 5c6922e3
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-bug
      
      
      storage/maria/ma_recovery.c:
        Auto merged
      5c6922e3
    • unknown's avatar
      Checking that the very last record is fully written · de3178fd
      unknown authored
        on the loghandler start.
      Variable definition moved because it is C programm.
      
      
      storage/maria/ma_loghandler.c:
        Checking that the very last record is fully written
          on the loghandler start.
      storage/maria/ma_recovery.c:
        Variable definition moved because it is C programm.
      de3178fd
  10. 16 Oct, 2007 3 commits
    • unknown's avatar
      WL#3072 Maria recovery, cleanups, removing some out-of-date @todos · f2a675b3
      unknown authored
      
      storage/maria/ma_delete_all.c:
        comment (@todo gone, nothing we can do)
      storage/maria/ma_recovery.c:
        - fail if LOGREC_CREATE_TABLE contains some symlink info (that
        will be handled in a future version)
        - don't do buffer overrun when parsing a REDO record
        - out-of-date @todo
      f2a675b3
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 694c722b
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-tmp
      
      
      694c722b
    • unknown's avatar
      WL#3072 Maria recovery · 08b71528
      unknown authored
      - fixes (in recovery, checkpoint, log handler) of bugs found
      during testing.
      - new option --check for maria_read_log: with --only-display (which only
      reads the header) it reads the full record, for debugging.
      
      
      storage/maria/ma_loghandler.c:
        importing patch from Sanja for bug of translog_next_LSN() found
        during recovery
      storage/maria/ma_loghandler_lsn.h:
        better types (0L is 4 bytes on some platforms, it causes problems
        when used into lsn_store(): right shift >= width of type.
      storage/maria/ma_pagecache.c:
        work around infamous "PAGECACHE_PLAIN_PAGE used for transactional
        tables in specialm case"; REDO phase disables logging and this causes
        pages to be PAGECACHE_PLAIN_PAGE, thus ignored wrongly by the
        checkpoint taken at the end of the REDO phase.
      storage/maria/ma_recovery.c:
        - a #ifdef which broke maria_read_log in non-debug builds (no output!)
        - support for maria_read_log --check
        - detect record corruption before opening the table
        - updating is_of_horizon requires writing the state
        - fix for wrong parsing of checkpoint record by recovery
      storage/maria/ma_recovery.h:
        support for maria_read_log --check
      storage/maria/maria_read_log.c:
        Option --check: --only-display only looks at the header;
        adding --check tries a translog_read_record() to see if record can
        be fully read (this is to find bugs).
      08b71528
  11. 15 Oct, 2007 1 commit
  12. 13 Oct, 2007 2 commits
  13. 12 Oct, 2007 6 commits
    • unknown's avatar
      different fix for strict-aliasing problem · 85a920dd
      unknown authored
      85a920dd
    • unknown's avatar
      bugs/warnings fixed in lf_alloc-pin.c: · c780abfe
      unknown authored
      1. available_stack_size() was getting the direction wrong,
         so alloca() was never used
      2. (char*) casts added to kill "break strict-aliasing rules" warnings
      3. s/node/node=0/ to kill "pointer casted to integer" warning
      4. added volatiles as appropriate to prevent gcc from moving
         assignment out of the loop
      
      
      mysys/lf_alloc-pin.c:
        bugs/warnings fixed:
        1. available_stack_size() was getting the direction wrong,
           so alloca() was never used
        2. (char*) casts added to kill "break strict-aliasing rules" warnings
        3. s/node/node=0/ to kill "pointer casted to integer" warning
        4. added volatiles as appropriate to prevent gcc from moving
           assignment out of the loop
      c780abfe
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 58cd4a52
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria
      
      
      58cd4a52
    • unknown's avatar
      make maria more pluggable · 47d48415
      unknown authored
      
      mysql-test/r/maria.result:
        test for maria variables
      mysql-test/t/maria.test:
        test for maria variables
      BitKeeper/etc/ignore:
        Added sql/link_sources ylwrap libmysql_r/link_sources to the ignore list
      sql/sql_delete.cc:
        fix incorrect check
      storage/maria/ha_maria.cc:
        maria status and pagecache variables
      47d48415
    • unknown's avatar
      int->my_bool transformation fixed (thanks Guilhem) · 928d7c23
      unknown authored
      Mutex owner checks added.
      
      
      928d7c23
    • unknown's avatar
      translog_next_LSN() changed to support pointer to the page end · 5eb78c51
      unknown authored
        which can happen when you save address of horizon
      
      
      5eb78c51
  14. 11 Oct, 2007 3 commits
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · 212c7dfe
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-filler
      
      
      212c7dfe
    • unknown's avatar
      Compiler warnings removed. · b47628f1
      unknown authored
      Added ability top change empty space filler of the loghandler.
      Fixed end of log reaction.
      Fixed memory corruprion bug caused by reading non-filled hage header.
      Added debug output.
      
      
      storage/maria/ma_bitmap.c:
        Compiler warnings removed.
      storage/maria/ma_blockrec.c:
        Compiler warnings removed.
      storage/maria/ma_loghandler.c:
        Added ability top change empty space filler of the loghandler.
        Fixed end of log reaction.
        Fixed memory corruprion bug caused by reading non-filled hage header.
        Added debug output.
      storage/maria/ma_loghandler_lsn.h:
        Compiler warnings removed.
      b47628f1
    • unknown's avatar
      WL#3072 Maria recovery. Bugfix (segfault of maria_read_log) · ea388ba2
      unknown authored
      
      storage/maria/ma_recovery.c:
        bugfix ("count" is meaningul only if printing messages)
      ea388ba2
  15. 10 Oct, 2007 1 commit
    • unknown's avatar
      WL#3072 Maria recovery. Improving the progress message (small fixes · 9a57cc3f
      unknown authored
      plus printing a downcount of tables to flush).
      
      
      storage/maria/ma_recovery.c:
        improving the progress message of recovery; it used to assume that
        if there is a non-zero UNDO phase then there was a non-REDO phase,
        and if there are tables to flush there was an UNDO phase,
        which is not always true. We now print a downcount of tables to flush
        (4 3 2 1 0).
      9a57cc3f
  16. 09 Oct, 2007 2 commits
    • unknown's avatar
      WL#3071 - Maria checkpoint · 791b0aa0
      unknown authored
      * Preparation for having a background checkpoint thread:
      frequency of checkpoint taken by that thread is now configurable
      by the user: global variable maria_checkpoint_frequency, in seconds,
      default 30 (checkpoint every 30th second); 0 means no checkpoints
      (and thus no background thread, thus no background flushing, that
      will probably only be used for testing).
      * Don't take checkpoints in Recovery if it didn't do anything
      significant; thus no checkpoint after a clean shutdown/restart. The
      only checkpoint which is never skipped is the one at shutdown.
      * fix for a test failure (after-merge fix)
      
      
      include/maria.h:
        new variable
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
        result update
      mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
        position update (=after merge fix, as this position was already changed
        into 5.1 and not merged here, causing test to fail)
      storage/maria/ha_maria.cc:
        Checkpoint's frequency is now configurable by the user:
        global variable maria_checkpoint_frequency. Changing it on the fly
        requires us to shutdown/restart the background checkpoint thread,
        as the loop done in that thread assumes a constant checkpoint
        interval. Default value is 30: a checkpoint every 30 seconds (yes, I
        know, physicists will remind that it should be named "period" then).
        ha_maria now asks for a background checkpoint thread when it starts,
        but this is still overruled (disabled) in ma_checkpoint_init().
      storage/maria/ma_checkpoint.c:
        Checkpoint's frequency is now configurable by the user: background thread
        takes a checkpoint every maria_checkpoint_interval-th second.
        If that variable is 0, no checkpoints are taken.
        Note, I will enable the background thread only in a later changeset.
      storage/maria/ma_recovery.c:
        Don't take checkpoints at the end of the REDO phase and at the end of
        Recovery if Recovery didn't make anything significant (didn't open
        any tables, didn't rollback any transactions).
        With this, after a clean shutdown, Recovery shouldn't take any
        checkpoint, which makes starting faster (we save a few fsync()s of
        the log and control file).
      791b0aa0
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 568e32c8
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-tmp
      
      
      storage/maria/ma_loghandler.c:
        Auto merged
      568e32c8
  17. 08 Oct, 2007 3 commits
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · 494409bd
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-bug
      
      
      494409bd
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 5cd55487
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria1
      
      
      5cd55487
    • unknown's avatar
      Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1 · ceadd596
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria1
      
      
      Makefile.am:
        Auto merged
      client/mysqldump.c:
        Auto merged
      configure.in:
        Auto merged
      libmysqld/Makefile.am:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysys/mf_tempfile.c:
        Auto merged
      sql/Makefile.am:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      sql/ha_partition.h:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/lock.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      BUILD/compile-dist:
        SCCS merged
      ceadd596