1. 26 May, 2008 1 commit
  2. 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
  3. 09 May, 2008 1 commit
  4. 07 May, 2008 1 commit
  5. 06 May, 2008 2 commits
  6. 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
  7. 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
  8. 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
  9. 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
  10. 21 Apr, 2008 3 commits
  11. 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
  12. 15 Apr, 2008 2 commits
  13. 14 Apr, 2008 1 commit
  14. 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
  15. 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
  16. 07 Apr, 2008 1 commit
    • unknown's avatar
      Fixing the little bug that if a new version reads an old control file, · 81d5ca6f
      unknown authored
      it couldn't entirely write its new information (it could not write
      more bytes than the old format wrote).
      
      
      storage/maria/ma_control_file.c:
        Let ma_control_file_write_and_force() return error if called when
        file is not open.
        When the file was of an old version (no room for our changeable part)
        we upgrade this part. When the file was of a new version we re-use its
        format but zero the parts which we can't maintain.
      storage/maria/ma_init.c:
        ma_control_file_write_and_force() now does not assert if called
        when control file is not open.
      storage/maria/ma_recovery.c:
        missing ";" (thanks Peter Zaitsev for the bug report and Monty for the patch)
      81d5ca6f
  17. 04 Apr, 2008 1 commit
    • unknown's avatar
      Store maximum transaction id into control file at clean shutdown. · 1f566172
      unknown authored
      This can serve to maria_chk to check that trids found in rows and keys
      are not too big. Also used by Recovery when logs are lost.
      Options --require-control-file, --datadir, --log-dir (yes, the dashes are
      inconsistent but I imitated mysqld --datadir and --maria-log-dir) for
      maria_chk.
      Lock control file _before_ reading its content.
      
      
      storage/maria/ha_maria.cc:
        new prototype
      storage/maria/ma_check.c:
        A function to find the max trid in the system (consults transaction
        manager and control file), to check tables.
      storage/maria/ma_checkpoint.c:
        new prototype
      storage/maria/ma_control_file.c:
        Store max trid into control file, in a backward-compatible way
        (can still read old control files).
        Parameter to ma_control_file_open(), to not create the log if it's
        missing (maria_chk needs that).
        Lock control file _before_ reading its content.
        Fix for a segfault when reading an old control file (bzero() with a
        negative second argument)
      storage/maria/ma_control_file.h:
        changes to the control file module's API
      storage/maria/ma_init.c:
        When Maria shuts down cleanly, store max trid into control file.
      storage/maria/ma_loghandler.c:
        new prototype
      storage/maria/ma_recovery.c:
        During recovery, consult max trid stored in control file, in case it is
        bigger than what we found in log (case of logs manually removed by user).
      storage/maria/ma_test1.c:
        new prototype
      storage/maria/ma_test2.c:
        new prototype
      storage/maria/maria_chk.c:
        New option --require-control-file (abort if control file not found),
        --datadir (path for control file (and for logs if --log-dir not specified)),
        --log-dir (path for logs).
        Try to open control file when maria_chk starts.
      storage/maria/maria_read_log.c:
        new prototype
      storage/maria/trnman.c:
        A new function to know max trid in transaction manager
      storage/maria/trnman_public.h:
        New function
      storage/maria/unittest/ma_control_file-t.c:
        new prototypes. Testing storing and retrieving the max trid to/from
        control file
      storage/maria/unittest/ma_test_loghandler-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_nologs-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        new prototype
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        new prototype
      1f566172
  18. 03 Apr, 2008 3 commits
    • unknown's avatar
      Fixed problem switching to the new file is file appeared · 81d6561b
      unknown authored
      to be bigger then limit.
      
      81d6561b
    • unknown's avatar
      fix for compiler warning · c55383fe
      unknown authored
      
      mysys/my_handler.c:
        compiler warning
      c55383fe
    • unknown's avatar
      Injecting more "const" declarations into code which does not change · d68922e6
      unknown authored
      pointed data.
      I ran gcc -Wcast-qual on storage/maria, this identified un-needed casts,
      a couple of functions which said they had a const parameter though
      they changed the pointed content! This is fixed here. Some suspicious
      places receive a comment.
      The original intention of running -Wcast-qual was to find what code
      changes R-tree keys: I added const words, but hidden casts
      like those of int2store (casts target to (uint16*)) removed const
      checking; -Wcast-qual helped find those hidden casts.
      Log handler does not change the content pointed by LEX_STRING::str it
      receives, so we now use a struct which has a const inside, to emphasize
      this and be able to pass "const uchar*" buffers to log handler
      without fear of their content being changed by it.
      One-line fix for a merge glitch (when merging from MyISAM).
      
      
      include/m_string.h:
        As Maria's log handler uses LEX_STRING but never changes the content
        pointed by LEX_STRING::str, and assigns uchar* into this member most
        of the time, we introduce a new struct LEX_CUSTRING
        (C const U unsigned) for the log handler.
      include/my_global.h:
        In macros which read pointed content: use const pointers so that
        gcc -Wcast-qual does not warn about casting a const pointer to non-const.
      include/my_handler.h:
        In macros which read pointed content: use const pointers so that
        gcc -Wcast-qual does not warn about casting a const pointer to non-const.
        ha_find_null() does not change *a.
      include/my_sys.h:
        insert_dynamic() does not change *element.
      include/myisampack.h:
        In macros which read pointed content: use const pointers so that
        gcc -Wcast-qual does not warn about casting a const pointer to non-const.
      mysys/array.c:
        insert_dynamic() does not change *element
      mysys/my_handler.c:
        ha_find_null() does not change *a
      storage/maria/ma_bitmap.c:
        Log handler receives const strings now
      storage/maria/ma_blockrec.c:
        Log handler receives const strings now.
        _ma_apply_undo_row_delete/update() do change *header.
      storage/maria/ma_blockrec.h:
        correct prototype
      storage/maria/ma_check.c:
        Log handler receives const strings now. Un-needed casts
      storage/maria/ma_checkpoint.c:
        Log handler receives const strings now
      storage/maria/ma_checksum.c:
        unneeded cast
      storage/maria/ma_commit.c:
        Log handler receives const strings now
      storage/maria/ma_create.c:
        Log handler receives const strings now
      storage/maria/ma_dbug.c:
        fixing warning of gcc -Wcast-qual
      storage/maria/ma_delete.c:
        Log handler receives const strings now
      storage/maria/ma_delete_all.c:
        Log handler receives const strings now
      storage/maria/ma_delete_table.c:
        Log handler receives const strings now
      storage/maria/ma_dynrec.c:
        fixing some warnings of gcc -Wcast-qual. Unneeded casts removed.
        Comment about function which lies.
      storage/maria/ma_ft_parser.c:
        fix for warnings of gcc -Wcast-qual, removing unneeded casts
      storage/maria/ma_ft_update.c:
        less casts, comment
      storage/maria/ma_key.c:
        less casts, stay const (warnings of gcc -Wcast-qual)
      storage/maria/ma_key_recover.c:
        Log handler receives const strings now
      storage/maria/ma_loghandler.c:
        Log handler receives const strings now
      storage/maria/ma_loghandler.h:
        Log handler receives const strings now
      storage/maria/ma_loghandler_lsn.h:
        In macros which read pointed content: use const pointers so that
        gcc -Wcast-qual does not warn about casting a const pointer to non-const.
      storage/maria/ma_page.c:
        Log handler receives const strings now; more const
      storage/maria/ma_recovery.c:
        Log handler receives const strings now
      storage/maria/ma_rename.c:
        Log handler receives const strings now
      storage/maria/ma_rt_index.c:
        more const, to emphasize that functions don't change pointed content.
        best_key= NULL was forgotten during merge from MyISAM a few days ago,
        was causing a Valgrind warning
      storage/maria/ma_rt_index.h:
        new proto
      storage/maria/ma_rt_key.c:
        more const
      storage/maria/ma_rt_key.h:
        new proto
      storage/maria/ma_rt_mbr.c:
        more const for functions which deserve it
      storage/maria/ma_rt_mbr.h:
        new prototype
      storage/maria/ma_rt_split.c:
        make const what is not changed.
      storage/maria/ma_search.c:
        un-needed casts, more const
      storage/maria/ma_sp_key.c:
        more const
      storage/maria/ma_unique.c:
        un-needed casts.
      storage/maria/ma_write.c:
        Log handler receives const strings now
      storage/maria/maria_def.h:
        some more const
      storage/maria/unittest/ma_test_loghandler-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_nologs-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Log handler receives const strings now
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Log handler receives const strings now
      d68922e6
  19. 02 Apr, 2008 2 commits
    • unknown's avatar
      Fix for BUG#35570 "CHECKSUM TABLE unreliable if LINESTRING field (same content... · ebaf694a
      unknown authored
      Fix for BUG#35570 "CHECKSUM TABLE unreliable if LINESTRING field (same content / differen checksum)"
      This will be back-ported to 5.x trees but the work for R-tree logging critically needs this patch in Maria now.
      
      
      mysql-test/r/myisam.result:
        checksums are identical; without the code fix they were all different
      mysql-test/t/myisam.test:
        test that same tables give same checksums
      sql/sql_table.cc:
        Type GEOMETRY is implemented on top of type BLOB, so, just like for BLOB, its 'field' contains pointers
        which it does not make sense to include in the checksum; it rather has to be converted to a string and
        then we can compute the checksum.
      ebaf694a
    • unknown's avatar
      Added new routines for storing/restoring sequences. · 828bed33
      unknown authored
      
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Nornal command line added.
        Added ability store and replay sequence used in the test.
      828bed33
  20. 01 Apr, 2008 7 commits
    • unknown's avatar
      Post-merge fixes. · 48665aea
      unknown authored
      
      sql/share/errmsg.txt:
        Reverting error message to before merge.
      48665aea
    • unknown's avatar
      Merge of changes in MyISAM since December 16 -> April 1 · 1ad29099
      unknown authored
      Fixes bugs:
      Bug#28837  MyISAM storage engine error (134) doing delete with self-join
      Bug#31277  myisamchk --unpack corrupts table
      Bug#4692   DISABLE/ENABLE KEYS waste a space
      Bug#31305  myisam tables crash when they are near capacity
      
      
      BitKeeper/etc/ignore:
        added unittest/tmp/*
      mysql-test/r/maria.result:
        Moved missing tests from myisam.test to maria.test
      mysql-test/t/maria.test:
        Moved missing tests from myisam.test to maria.test
      storage/maria/ha_maria.cc:
        Merge of changes in MyISAM since December 16 -> April 1
        Fixes bug in self join (Bug#28837: MyISAM storage engine error (134) doing delete with self-join)
      storage/maria/ha_maria.h:
        Merge of changes in MyISAM since December 16 -> April 1
      storage/maria/ma_blockrec.c:
        Merge of changes in MyISAM since December 16 -> April 1
        Fixes bug in self join (Bug#28837: MyISAM storage engine error (134) doing delete with self-join)
        The problem is that we may be using a cached key page with old information. Versioning will fix this
      storage/maria/ma_check.c:
        Merge of changes in MyISAM since December 16 -> April 1
        This fixes a problem with pack_reclength not beeing big enough (Bug #31277 myisamchk --unpack corrupts table)
        BUG#4692 - DISABLE/ENABLE KEYS waste a space
      storage/maria/ma_delete.c:
        Indentation fixes
      storage/maria/ma_dynrec.c:
        Merge of changes in MyISAM since December 16 -> April 1
        Fixes Bug#31305 myisam tables crash when they are near capacity.
        (This uses a simpler fix than in MyISAM by remembering the length of the current row)
      storage/maria/ma_ft_boolean_search.c:
        Merge of all changes from myisam/ft_boolean_search.c (This file had not been kept up to date)
      storage/maria/ma_open.c:
        Merge of changes in MyISAM since December 16 -> April 1
        Calculate default_rec_buff_size more exact to be sure it's always big enough
      storage/maria/ma_packrec.c:
        Merge of changes in MyISAM since December 16 -> April 1
        Update default_rec_buff_size to be big enough to hold one packed row
        Related to Bug#31277 myisamchk --unpack corrupts table
      storage/maria/ma_rnext_same.c:
        Indentation fixes
      storage/maria/ma_rt_index.c:
        Merge of changes in MyISAM since December 16 -> April 1
      storage/maria/ma_rt_mbr.c:
        Merge of changes in MyISAM since December 16 -> April 1
        (Added comment)
      storage/maria/ma_search.c:
        Merge of changes in MyISAM since December 16 -> April 1
        (Added comment)
      storage/maria/ma_sort.c:
        Merge of changes in MyISAM since December 16 -> April 1
      storage/maria/ma_statrec.c:
        Indentation fixes
      storage/maria/ma_test2.c:
        Indentation fixes
      storage/maria/maria_chk.c:
        Indentation fixes
      storage/maria/maria_pack.c:
        Merge of changes in MyISAM since December 16 -> April 1
      1ad29099
    • unknown's avatar
      Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge · c61be2f7
      unknown authored
      into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
      
      
      mysql-test/r/binlog_index.result:
        Manual merge
      c61be2f7
    • unknown's avatar
      Post-merge fixes. · 51a75f23
      unknown authored
      
      mysql-test/r/binlog_index.result:
        Result set change.
      51a75f23
    • unknown's avatar
      Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge · 2638a2ed
      unknown authored
      into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
      
      
      sql/share/errmsg.txt:
        Manual merge
      2638a2ed
    • unknown's avatar
      Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1 · 4d23d9a1
      unknown authored
      into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
      
      4d23d9a1
    • unknown's avatar
      Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.0 · cf6baaef
      unknown authored
      into  dl145h.mysql.com:/data0/mkindahl/mysql-5.0-rpl-merge
      
      
      sql/share/errmsg.txt:
        Manual merge.
      cf6baaef
  21. 31 Mar, 2008 1 commit