1. 30 Jul, 2007 2 commits
    • unknown's avatar
      Applying Sanja's patch which makes the log handler not issue · 2f96fe74
      unknown authored
      errors when reading a log record which has a 0-length header
      (like LOGREC_REDO_DROP_TABLE).
      
      
      storage/maria/ma_loghandler.c:
        Functions reading record's header now don't use 0 to indicate error,
        as some valid records have a 0-length header (like REDO_DROP_TABLE).
        Instead, negative values are used for EOF and error.
      storage/maria/ma_loghandler.h:
        functions to read record's header now return an int
        (either the length of this header (>=0) or some negative values
        for EOF or error).
      storage/maria/ma_recovery.c:
        update to the new log handler's behaviour. Note the @todo.
      storage/maria/maria_read_log.c:
        inform when program failed
      storage/maria/unittest/ma_test_loghandler-t.c:
        update to new log handler's API
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        update to new log handler's API
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        update to new log handler's API
      2f96fe74
    • unknown's avatar
      Maria: it is allowed to change unknown type to any legal type of page · b3fed734
      unknown authored
      in the pagecache: fixing wrong assertion and a test case.
      maria.test and ps_maria.test still fail.
      
      
      mysql-test/r/maria.result:
        result update
      mysql-test/t/maria.test:
        added test for incorrect assert on page's type
      storage/maria/ma_pagecache.c:
        It is allowed to change unknown type to any legal type of page in the
        pagecache.
      b3fed734
  2. 27 Jul, 2007 2 commits
    • unknown's avatar
      porting Serg's fix for BUG#30094 to Maria. Now ma_test_all passes. · 01fa891b
      unknown authored
      maria.test and ps_maria.test still fail.
      
      
      mysys/mf_keycache.c:
        split string annoys some compilers
      storage/maria/ha_maria.cc:
        fix for compiler warnings
      storage/maria/ma_test1.c:
        porting Serg's fix for BUG#30094 to Maria
      storage/maria/ma_test2.c:
        porting Serg's fix for BUG#30094 to Maria
      storage/maria/ma_test3.c:
        porting Serg's fix for BUG#30094 to Maria
      storage/maria/ma_test_recovery:
        don't print ma_test1's messages if no problem
      01fa891b
    • unknown's avatar
      merging MyISAM changes into Maria (not done in 5.1->maria merge of · c098d196
      unknown authored
      Jul 7th). "maria.test" and "ps_maria.test" still fail;
      "ma_test_all" starts failing (MyISAM has the same issue see BUG#30094).
      
      
      include/maria.h:
        merging MyISAM changes into Maria
      mysys/mf_keycache.c:
        mi_test_all showed "floating point exception", this was already
        fixed in the latest 5.1, importing fix.
      sql/item_xmlfunc.cc:
        compiler warning (already fixed in latest 5.1)
      storage/maria/ha_maria.cc:
        merging MyISAM changes into Maria. See #ifdef ASK_MONTY.
      storage/maria/ha_maria.h:
        merging MyISAM changes into Maria
      storage/maria/ma_cache.c:
        merging MyISAM changes into Maria
      storage/maria/ma_check.c:
        merging MyISAM changes into Maria
      storage/maria/ma_create.c:
        merging MyISAM changes into Maria
      storage/maria/ma_dynrec.c:
        merging MyISAM changes into Maria
      storage/maria/ma_extra.c:
        merging MyISAM changes into Maria
      storage/maria/ma_ft_boolean_search.c:
        merging MyISAM changes into Maria
      storage/maria/ma_ft_nlq_search.c:
        merging MyISAM changes into Maria
      storage/maria/ma_info.c:
        merging MyISAM changes into Maria
      storage/maria/ma_key.c:
        merging MyISAM changes into Maria
      storage/maria/ma_loghandler.c:
        compiler warning (part->length is size_t)
      storage/maria/ma_open.c:
        merging MyISAM changes into Maria
      storage/maria/ma_preload.c:
        merging MyISAM changes into Maria
      storage/maria/ma_range.c:
        merging MyISAM changes into Maria
      storage/maria/ma_rkey.c:
        merging MyISAM changes into Maria
      storage/maria/ma_rt_index.c:
        merging MyISAM changes into Maria
      storage/maria/ma_rt_key.c:
        merging MyISAM changes into Maria
      storage/maria/ma_rt_split.c:
        merging MyISAM changes into Maria
      storage/maria/ma_search.c:
        merging MyISAM changes into Maria
      storage/maria/ma_sort.c:
        merging MyISAM changes into Maria
      storage/maria/maria_def.h:
        merging MyISAM changes into Maria
      c098d196
  3. 26 Jul, 2007 3 commits
    • unknown's avatar
      post-merge fixes, and fixes for some of the 16 compiler warnings · 0ed84b06
      unknown authored
      found in pushbuild on sapsrv1. Some not fixed as not repeatable
      on my machine (32/64 bit issue?).
      Fixes for some test failures:
      - "maria-connect" now passes;
      - "maria": after fixing the obvious reasons for failures, the test
      went further and hit a more complex issues: difference in the output
      of EXPLAIN output; not fixed;
      - "ps_maria" still crashes in assertion
      mysqld: ha_maria.cc:1627: virtual int ha_maria::index_read(uchar*, const uchar*, uint, ha_rkey_function): Ass
      ertion `inited == INDEX' failed, as already observable in pushbuild.
      All this might just be due to an incomplete merge of MyISAM changes
      into Maria when 5.1 was last merged to mysql-maria.
      
      
      include/my_global.h:
        temporary fix until next merge of 5.1; without this it does not build
      mysql-test/r/maria-connect.result:
        position changed
      mysql-test/t/maria-connect.test:
        If one wants to use the binlog it has to ask for it.
        1582 is not used for dup entry error anymore (it was in older 5.1).
        Size of first event in binlog was increased by 4 (when the new type
        of event "gap" was added).
      mysql-test/t/maria.test:
        1582 not used anymore in this case
      storage/maria/ha_maria.cc:
        engine now has to say what binlogging it supports
      storage/maria/ma_blockrec.c:
        fix for compiler warnings ("comparison is always true" or "always
        false")
      storage/maria/ma_loghandler.c:
        fix for compiler warnings (comparing char* to uchar*)
      storage/maria/ma_packrec.c:
        fix for compiler warning (fix simply merged from MyISAM)
      storage/maria/ma_pagecache.c:
        info_check_pin() was not used so gave a compiler warning.
      storage/maria/ma_pagecache.h:
        fixing typo from the last 5.1->maria merge.
      storage/maria/ma_recovery.c:
        my_free() has a void* argument, so why cast. byte->uchar.
      storage/maria/ma_search.c:
        fix for compiler warning (fix simply merged from MyISAM)
      storage/maria/maria_read_log.c:
        gptr->uchar*
      storage/maria/trnman.c:
        probable fix for warning found in pushbuild (but not on my machine):
        storage/maria/trnman.c: 142
         passing argument 6 of \u2018lf_hash_init\u2019 from incompatible pointer type
        on sapsrv1.
      0ed84b06
    • unknown's avatar
      merge · 5d2efd01
      unknown authored
      
      sql/handler.cc:
        Auto merged
      storage/maria/ha_maria.cc:
        Auto merged
      storage/maria/ma_blockrec.c:
        Auto merged
      storage/maria/ma_close.c:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_loghandler.c:
        Auto merged
      storage/maria/ma_loghandler.h:
        Auto merged
      storage/maria/ma_test2.c:
        Auto merged
      storage/maria/maria_read_log.c:
        will merge by hand
      5d2efd01
    • unknown's avatar
      WL#3072 - Maria recovery · fc08f82b
      unknown authored
      Unit test for recovery: runs ma_test1 and ma_test2 (both only with
      INSERTs and DELETEs; UPDATEs disabled as not handled by recovery)
      then moves the tables elswhere; recreates tables from the log, and
      compares and fails if there is a difference. Passes now.
      Most of maria_read_log.c moved to ma_recovery.c, as it will be re-used
      for recovery-from-ha_maria.
      Bugfixes of applying of REDO_INSERT, REDO_PURGE_ROW.
      Applying of REDO_PURGE_BLOCKS, REDO_DELETE_ALL, REDO_DROP_TABLE,
      UNDO_ROW_INSERT (in REDO phase only, i.e. just doing records++),
      UNDO_ROW_DELETE, UNDO_ROW_PURGE.
      Code cleanups.
      Monty: please look for "QQ". Sanja: please look for "Sanja".
      Future tasks: recovery of the bitmap (easy), recovery of the state
      (make it idempotent), more REDOs (Monty to work on
      REDO_UPDATE?), UNDO phase...
      Pushing this cset as it looks safe, contains test and bugfixes which
      will help Monty implement applying of REDO_UPDATE.
      
      
      sql/handler.cc:
        typo
      storage/maria/Makefile.am:
        Adding ma_test_recovery (which ma_test_all invokes, and which can
        also be run alone). Most of maria_read_log.c moved to ma_recovery.c
      storage/maria/ha_maria.cc:
        comments
      storage/maria/ma_bitmap.c:
        fixing comments. 2 -> sizeof(maria_bitmap_marker).
        Bitmap-related part of _ma_initialize_datafile() moves in bitmap module.
        Now putting the "bm" signature when creating the first bitmap page
        (it used to happen only at next open, but that
        caused an annoying difference when testing Recovery if the original
        run didn't open the table, and it looks more
        logical like this: it goes to disk only with its signature correct);
        see the "QQ" comment towards the _ma_initialize_data_file() call
        in ma_create.c for more).
        When reading a bitmap page, verify its signature (happens when normally
        using the table or when CHECKing it; not when REPAIRing it).
      storage/maria/ma_blockrec.c:
        * no need to sync the data file if table is not transactional
        * Comments, code cleanup (log-related data moved to log-related code
        block, int5store->page_store).
        * Store the table's short id into LOGREC_UNDO_ROW_PURGE, like we
        do for other records (though this record will soon be replaced
        with a CLR).
        * If "page" is 1 it means the page which extends from byte
        page*block_size+1 to (page+1)*block_size (byte number 1 being
        the first byte of the file). The last byte of the file is
        data_file_length (same convention).
        A new page needs to be created if the last byte of the page is
        beyond the last byte of the file, i.e.
         (page+1)*block_size+1 > data_file_length, so we correct the test
        (bug found when testing log applying for ma_test1 -M -T --skip-update).
        * update the page's LSN when removing a row from it during
        execution of a REDO_PURGE_ROW record (bug found when testing log
        applying for ma_test1 -M -T --skip-update).
        * applying of REDO_PURGE_BLOCKs (limited to a one-page range for now).
      storage/maria/ma_blockrec.h:
        new functions. maria_bitmap_marker does not need to be exported.
      storage/maria/ma_close.c:
        we can always flush the table's state when closing the last instance
        of the table. And it is needed for maria_read_log (as it does
        not use maria_lock_database()).
      storage/maria/ma_control_file.c:
        when in Recovery, some assertions should not be used.
      storage/maria/ma_control_file.h:
        double-inclusion safe
      storage/maria/ma_create.c:
        during recovery, don't log records. Comments.
        Moving the creation of the first bitmap page to ma_bitmap.c
      storage/maria/ma_delete_table.c:
        during recovery, don't log records. Log the end-zero of the dropped
        table's name, so that recovery can use the string in place without
        extending it to fit an end zero.
      storage/maria/ma_loghandler.c:
        * inwrite_rec_hook also needs access to the MARIA_SHARE, like
        prewrite_rec_hook. This will be needed to update
        share->records_diff (in the upcoming patch "recovery of the state").
        * LOG_DESC::record_ends_group changed to an enum.
        * LOG_DESC for LOGREC_REDO_PURGE_BLOCKS and LOGREC_UNDO_ROW_PURGE
        corrected
        * Sanja please see the @todo LOG BUG
        * avoiding DBUG_RETURN(func()) as it gives confusing debug traces.
      storage/maria/ma_loghandler.h:
        - log write hooks called while the log's lock is held (inwrite_rec_hook)
        now need the MARIA_SHARE, like prewrite_rec_hook already had
        - instead of a bool saying if this record's type ends groups or not,
        we refine: it may not end a group, it may end a group, or it may
        be a group in itself. Imagine that we had a physical write failure
        to a table before we log the UNDO, we still end up in
        external_lock(F_UNLCK) and then we log a COMMIT: we don't want
        to consider this COMMIT as ending the group of REDOs (don't want
        to execute those REDOs during Recovery), that's why we say "COMMIT
        is a group in itself, it aborts any previous group". This also
        gives one more sanity check in maria_read_log.
      storage/maria/ma_recovery.c:
        New Recovery code, replacing the old pseudocode.
        Most of maria_read_log moved here.
        Call-able from ha_maria, but not enabled yet.
        Compared to the previous version of maria_read_log, some bugs have
        been fixed, debugging output can go to stdout or a disk file (for now
        it's useful for me, later it can be changed), execution of
        REDO_DROP_TABLE, REDO_DELETE_ALL, REDO_PURGE_BLOCKS has been added. Duplicate code
        has been factored into functions. We abort an unfinished group
        of records if we see a record which is a group in itself (like COMMIT).
        No need for maria_panic() after a bug (which caused tables to not
        be closed) was fixed; if there is yet another bug I prefer to see it.
        When opening a table for Recovery, set data_file_length
        and key_file_length to their real physical value (these are the
        easiest state members to restore :). Warn us if the last page
        was truncated (but Recovery handles it).
        MARIA_SHARE::state::state::records is now partly recovered (not
        idempotent, but works if recreating tables from scracth).
        When applying a REDO to a page, stamp it with the UNDO's LSN
        (current_group_end_lsn), not with the REDO's LSN; it makes
        the table more identical to the original table (easier to compare
        the two tables in the end).
        Big thing missing: some types of REDOs are not handled,
        and the UNDO phase does not exist (missing functions to execute UNDOs
        to actually rollback). So for now tests are only inserting/deleting
        a few 100 rows, closing the table and seeing if the log is applied ok;
        it works. UPDATE not handled.
      storage/maria/ma_recovery.h:
        new functions: ma_recover() for recovery from inside ha_maria;
        _ma_apply_log() for maria_read_log (ma_recover() calls _ma_apply_log()).
        Btw, we need to not use the word "recover" for REPAIR/maria_chk anymore.
      storage/maria/ma_rename.c:
        don't write log records during recovery
      storage/maria/ma_test2.c:
        - fail if maria_info() or other subtests find some wrong information
        - new option -g to skip updates.
        - init the translog before creating the table, so that log applying
        can work.
        - in "#if 0" you'll see some fixed bugs (will be removed).
      storage/maria/ma_test_all.sh:
        cleanup files. Test log applying.
      storage/maria/maria_read_log.c:
        most of the logic moves to ma_recovery.c to be shared between
        maria_read_log and recovery-from-inside-mysqld.
        See ma_recovery.c for additional changes made to the moved code.
      storage/maria/ma_test_recovery:
        unit test for Recovery. Tests insert and delete,
        REDO_UPDATE not yet coded.
        Script is called from ma_test_all. Can run standalone.
      fc08f82b
  4. 07 Jul, 2007 8 commits
    • unknown's avatar
      Merged from main 5.1 · d3b91896
      unknown authored
      d3b91896
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 · aa0ee21d
      unknown authored
      into  labbari.dsl.inet.fi:/home/my/bk/mysql-maria.prod
      
      
      configure.in:
        Auto merged
      include/my_base.h:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      storage/myisam/ft_parser.c:
        Auto merged
      aa0ee21d
    • unknown's avatar
      Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.1-engines · 00f0c4a6
      unknown authored
      into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines.merge
      
      00f0c4a6
    • unknown's avatar
      006fb950
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.1 · df8a3ea6
      unknown authored
      into  labbari.dsl.inet.fi:/home/my/bk/mysql-maria.prod
      
      
      BitKeeper/etc/ignore:
        auto-union
      client/mysqldump.c:
        Auto merged
      include/my_base.h:
        Auto merged
      include/my_sys.h:
        Auto merged
      mysql-test/lib/mtr_cases.pl:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/r/ps_2myisam.result:
        Auto merged
      mysql-test/r/ps_3innodb.result:
        Auto merged
      mysql-test/r/ps_4heap.result:
        Auto merged
      mysql-test/r/ps_5merge.result:
        Auto merged
      mysql-test/r/ps_7ndb.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/view.test:
        Auto merged
      sql/Makefile.am:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      storage/myisam/mi_key.c:
        Auto merged
      storage/myisam/mi_open.c:
        Merged with main 5.1.
      df8a3ea6
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria · 4906b5f0
      unknown authored
      into  labbari.dsl.inet.fi:/home/my/bk/mysql-maria.prod
      
      
      mysys/thr_lock.c:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      storage/csv/ha_tina.h:
        Auto merged
      storage/maria/ma_blockrec.c:
        Auto merged
      storage/maria/ma_check.c:
        Auto merged
      storage/maria/ma_loghandler.c:
        Auto merged
      storage/maria/trnman.c:
        Auto merged
      storage/myisam/mi_locking.c:
        Auto merged
      sql/lock.cc:
        SCCS merged
      4906b5f0
    • unknown's avatar
      Merge ymer.(none):/usr/local/mysql/mysql-5.0-engines · 40ceddfa
      unknown authored
      into  ymer.(none):/usr/local/mysql/mysql-5.1-engines
      
      
      sql/stacktrace.c:
        Auto merged
      BUILD/compile-pentium-gcov:
        Manual merge.
      40ceddfa
    • unknown's avatar
      Bug #29543 GCov information not written in case of crash. · 1ec3e7f4
      unknown authored
      For GCov builds, if the server crashes, the normal exit handler for writing
      coverage information is not executed due to the abnormal termination.
      
      Fix this by explicitly calling the __gcov_flush function in our crash handler.
      
      1ec3e7f4
  5. 06 Jul, 2007 12 commits
    • unknown's avatar
      Merge... · df216211
      unknown authored
      Merge ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
      into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines.merge
      
      
      df216211
    • unknown's avatar
      Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.1 · 8114bdf3
      unknown authored
      into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines.merge
      
      
      libmysql/libmysql.c:
        Auto merged
      8114bdf3
    • unknown's avatar
      Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0 · 7cbbce05
      unknown authored
      into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
      
      7cbbce05
    • unknown's avatar
      Merge... · e8201d46
      unknown authored
      Merge ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
      into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines.merge
      
      
      mysql-test/t/fulltext2.test:
        Auto merged
      BitKeeper/deleted/.del-fulltext3.result:
        Delete: mysql-test/r/fulltext3.result
      BitKeeper/deleted/.del-fulltext3.test:
        Delete: mysql-test/t/fulltext3.test
      mysql-test/r/fulltext2.result:
        SCCS merged
      e8201d46
    • unknown's avatar
      fix test for bug29299 · 8d8ca72d
      unknown authored
      8d8ca72d
    • unknown's avatar
      Merge... · 9f06ee4e
      unknown authored
      Merge ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
      into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.1-engines.merge
      
      
      sql/sql_insert.cc:
        Auto merged
      9f06ee4e
    • unknown's avatar
      Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines · 4a1d89bb
      unknown authored
      into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.1-engines.merge
      
      
      include/my_base.h:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/r/events_bugs.result:
        Auto merged
      mysql-test/r/rpl_sp.result:
        Auto merged
      mysql-test/r/show_check.result:
        Auto merged
      mysql-test/r/sp.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/ndb_single_user.test:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/sql_partition.cc:
        Auto merged
      4a1d89bb
    • unknown's avatar
      Merge... · a75a5abf
      unknown authored
      Merge ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-4.1-engines.merge
      into  ppcg5.local:/private/Network/Servers/anubis.xiphis.org/home/antony/work/mysql-5.0-engines.merge
      
      
      a75a5abf
    • unknown's avatar
      Merge anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines · 5670140c
      unknown authored
      into  anubis.xiphis.org:/usr/home/antony/work/mysql-5.0-engines.merge
      
      
      sql/sql_insert.cc:
        Auto merged
      5670140c
    • unknown's avatar
      Merge anubis.xiphis.org:/usr/home/antony/work/mysql-4.1-engines · 07c992d7
      unknown authored
      into  anubis.xiphis.org:/usr/home/antony/work/mysql-4.1-engines.merge
      
      07c992d7
    • unknown's avatar
      Merge labbari.dsl.inet.fi:/home/my/bk/mysql-5.0-marvel · 46bcfdf8
      unknown authored
      into  labbari.dsl.inet.fi:/home/my/bk/mysql-5.1-marvel
      
      
      BitKeeper/etc/ignore:
        auto-union
      libmysql/libmysql.c:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Auto merged
      mysql-test/include/mix1.inc:
        Manual merge from 5.0
      storage/innobase/handler/ha_innodb.cc:
        Manual merge from 5.0
      46bcfdf8
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-5.0 · 0e0b20da
      unknown authored
      into  labbari.dsl.inet.fi:/home/my/bk/mysql-5.0-marvel
      
      
      libmysql/libmysql.c:
        Auto merged
      mysql-test/r/innodb_mysql.result:
        Manual merge from main 5.1 to 5.1-marvel.
      mysql-test/t/innodb_mysql.test:
        Manual merge from main 5.1 to 5.1-marvel.
      0e0b20da
  6. 05 Jul, 2007 7 commits
    • unknown's avatar
      Merge chilla.local:/home/mydev/mysql-5.1-ateam · cfe61b27
      unknown authored
      into  chilla.local:/home/mydev/mysql-5.1-bug26827
      
      cfe61b27
    • unknown's avatar
      Bug#26827 - table->read_set is set incorrectly, · 6e78a53d
      unknown authored
                  causing update of a different column
      
      Post-pushbuild fix.
      
      bitmap_set_bit() is an inline function in DEBUG builds and
      a macro in non-DEBUG builds. The latter evaluates its 'bit'
      argument twice. So one must not use increment/decrement operators
      on this argument.
      
      Moved increment of pointer out of bitmap_set_bit() call.
      
      
      include/my_bitmap.h:
        Bug#26827 - table->read_set is set incorrectly,
                    causing update of a different column
        Added a warning comment.
      sql/sql_partition.cc:
        Bug#26827 - table->read_set is set incorrectly,
                    causing update of a different column
        Moved increment of pointer out of bitmap_set_bit() call.
      6e78a53d
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 97a41052
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria
      
      
      storage/maria/ma_locking.c:
        Auto merged
      97a41052
    • unknown's avatar
      BUG#27564 - Valgrind: UDF does not cleanup correctly · 31c9ba99
      unknown authored
      Enabling rpl_udf test.
      
      
      mysql-test/t/disabled.def:
        Enabling rpl_udf test.
      31c9ba99
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG27564/mysql-5.0-engines · 13ddee4b
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG27564/mysql-5.1-engines
      
      
      mysys/hash.c:
        Auto merged
      13ddee4b
    • unknown's avatar
      Merge mysql.com:/home/svoj/devel/mysql/BUG27564/mysql-4.1-engines · 8e34c7e9
      unknown authored
      into  mysql.com:/home/svoj/devel/mysql/BUG27564/mysql-5.0-engines
      
      
      mysys/hash.c:
        Auto merged
      8e34c7e9
    • unknown's avatar
      BUG#27564 - Valgrind: UDF does not cleanup correctly · 632ed804
      unknown authored
      Dropping an user defined function may cause server crash in
      case this function is still in use by another thread.
      
      The problem was that our hash implementation didn't update
      hash link list properly when hash_update() was called.
      
      
      mysys/hash.c:
        The following requirement wasn't met by hash_update() function
        causing corruption of hash links list:
        
        After a record was unlinked from the old chain during update, it
        holds random position. By the chance this position is equal to
        position for the first element in the new chain. That means
        updated record is the only record in the new chain.
      632ed804
  7. 04 Jul, 2007 5 commits
    • unknown's avatar
      in mysql_unlock_tables(), do thr_unlock() AFTER external_unlock(). · 7f62d812
      unknown authored
      it means, {update,restore}_status() should be called in external_lock, 
      not in thr_unlock. Only affects storage engines that support
      TL_WRITE_CONCURRENT.
      
      7f62d812
    • unknown's avatar
      Bug#26827 - table->read_set is set incorrectly, · 9e54edfa
      unknown authored
                causing update of a different column
      
      For efficiency some storage engines do not read a complete record
      for update, but only the columns required for selecting the rows.
      
      When updating a row of a partitioned table, modifying a column
      that is part of the partition or subpartition expression, then
      the row may need to move from one [sub]partition to another one.
      This is done by inserting the new row into the target
      [sub]partition and deleting the old row from the originating one.
      For the insert we need a complete record.
      
      If an above mentioned engine was used for a partitioned table, we
      did not have a complete record in update_row(). The implicitly
      executed write_row() got an incomplete record.
      
      This is solved by instructing the engine to read a complete record
      if one of the columns of the partition or subpartiton is to be
      updated.
      
      No testcase. This can be reproduced with Falcon only. The engines
      contained in standard 5.1 do always return complete records on
      update.
      
      
      sql/ha_partition.cc:
        Bug#26827 - table->read_set is set incorrectly,
                    causing update of a different column
        Setting partition field bits in read_set if a writing
        operation is going on. This replaces the old function
        include_partition_fields_in_used_fields().
        Setting all bits in read_set if write_set contains a column
        used in a partition or subpartition expression.
        Removed include_partition_fields_in_used_fields().
      sql/ha_partition.h:
        Bug#26827 - table->read_set is set incorrectly,
                    causing update of a different column
        Removed declaration of
        include_partition_fields_in_used_fields().
      sql/partition_info.h:
        Bug#26827 - table->read_set is set incorrectly,
                    causing update of a different column
        Added a bitmap to partition_info for a quick check of
        columns used in a partition or subpartition expression.
      sql/sql_partition.cc:
        Bug#26827 - table->read_set is set incorrectly,
                    causing update of a different column
        Initializing the new bitmap with all columns used in a
        partition or subpartition expression.
      9e54edfa
    • unknown's avatar
      Maria: correcting assertions (should be enforced only in multi-threaded · a021c104
      unknown authored
      mode) so ma_test_all works again; more error detection in ma_test_all;
      maria_control renamed to maria_log_control (Monty's suggestion,
      so that a "rm maria_log*" removes all log-related files). Disabling
      failing wrong assertion.
      
      
      storage/maria/ma_blockrec.c:
        disabling assertion which fails because cur_block is a
        local variable not initialized
      storage/maria/ma_check.c:
        comment
      storage/maria/ma_control_file.h:
        control file renamed
      storage/maria/ma_loghandler.c:
        assertions needed only in multi-threaded mode (ma_test1 and ma_test2
        are single-threaded, it's ok for them to use dummy_transaction_object
        with transactional tables: trn->rec_lsn can be set without interfering
        with other threads).
      storage/maria/ma_test_all.sh:
        got caught by failures in some ma_test1 runs, which I didn't see
        because ma_test_all returned 0 and I didn't scroll up in the window;
        now using "set -e" to avoid that. Also testing that
        we get the errors and warnings we expect.
      storage/maria/unittest/Makefile.am:
        maria_control renamed
      a021c104
    • unknown's avatar
      Fixed bytes to uchar and gptr to uchar* · 808b8437
      unknown authored
      808b8437
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria · 3aa3cc1c
      unknown authored
      into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.prod
      
      
      BitKeeper/etc/ignore:
        auto-union
      include/maria.h:
        Auto merged
      include/my_base.h:
        Auto merged
      mysql-test/include/ps_conv.inc:
        Auto merged
      mysql-test/r/ps_2myisam.result:
        Auto merged
      mysql-test/r/ps_3innodb.result:
        Auto merged
      mysql-test/r/ps_4heap.result:
        Auto merged
      mysql-test/r/ps_5merge.result:
        Auto merged
      mysql-test/r/ps_7ndb.result:
        Auto merged
      mysys/Makefile.am:
        Auto merged
      mysys/mf_iocache.c:
        Auto merged
      mysys/mf_tempfile.c:
        Auto merged
      mysys/my_error.c:
        Auto merged
      mysys/my_init.c:
        Auto merged
      mysys/my_open.c:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/lex.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      storage/maria/ha_maria.cc:
        Auto merged
      storage/maria/ha_maria.h:
        Auto merged
      storage/maria/ma_bitmap.c:
        Auto merged
      storage/maria/ma_blockrec.h:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_dynrec.c:
        Auto merged
      storage/maria/ma_loghandler.h:
        Auto merged
      storage/maria/ma_loghandler_lsn.h:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_pagecache.c:
        Auto merged
      storage/maria/ma_pagecache.h:
        Auto merged
      storage/maria/ma_test1.c:
        Auto merged
      storage/maria/ma_test2.c:
        Auto merged
      storage/maria/ma_update.c:
        Auto merged
      storage/maria/maria_chk.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Auto merged
      storage/myisam/ft_stopwords.c:
        Auto merged
      storage/myisam/mi_close.c:
        Auto merged
      support-files/compiler_warnings.supp:
        Auto merged
      mysys/mf_keycache.c:
        Pulled from mysql-maria tree, manual merge.
      mysys/my_handler.c:
        Pulled from mysql-maria tree, manual merge.
      mysys/my_symlink2.c:
        Pulled from mysql-maria tree, manual merge.
      sql/mysqld.cc:
        Pulled from mysql-maria tree, manual merge.
      sql/sql_table.cc:
        Pulled from mysql-maria tree, manual merge.
      storage/maria/ma_blockrec.c:
        Pulled from mysql-maria tree, manual merge.
      storage/maria/ma_check.c:
        Pulled from mysql-maria tree, manual merge.
      storage/maria/ma_close.c:
        Pulled from mysql-maria tree, manual merge.
      storage/maria/ma_loghandler.c:
        Pulled from mysql-maria tree, manual merge.
      storage/maria/maria_def.h:
        Pulled from mysql-maria tree, manual merge.
      3aa3cc1c
  8. 03 Jul, 2007 1 commit
    • unknown's avatar
      After merge fixes · 55bb3731
      unknown authored
      Note that ma_test_all doesn't work for the moment.
      (ma_test1 -s -M -T fails because it uses the dummy_transaction_object)
      
      
      storage/maria/ma_blockrec.c:
        After merge fixes
      55bb3731