1. 20 Dec, 2007 3 commits
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria · 17bda90a
      unknown authored
      into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.hasky
      
      
      storage/maria/ma_key_recover.c:
        Auto merged
      17bda90a
    • unknown's avatar
      Fixes to merge. · 4dcbe2cb
      unknown authored
      
      mysql-test/r/maria.result:
        Fixed result file. The results will be fixed by Sergei's patch.
      mysql-test/t/variables.test:
        Fixed result file. The results will be fixed by Sergei's patch.
      mysys/my_getopt.c:
        Fixed a problem with manual merge.
      sql/set_var.cc:
        Fixed a problem with manual merge.
      sql/set_var.h:
        Fixed a problem with manual merge.
      sql/sql_plugin.cc:
        Removed unneccessary function call. This was forgotten from
        a previous patch.
      4dcbe2cb
    • unknown's avatar
      Write failure callback added. · 40d08699
      unknown authored
      
      storage/maria/ma_key_recover.c:
        Initialization fixed (by Monty)
      40d08699
  2. 18 Dec, 2007 6 commits
    • unknown's avatar
      typo fixed · 056100ae
      unknown authored
      056100ae
    • unknown's avatar
      solaris fixes · a9d5a3ff
      unknown authored
      
      include/lf.h:
        Forte fixes
      a9d5a3ff
    • unknown's avatar
      - Clean up function for my_uuid() · e8bcebd2
      unknown authored
      - Merge fixes
      - "make test" for maria
      - Replaced ma_test_all with a perl version,
        which now can be run in unittest mode.
      
      
      include/my_sys.h:
        Added clean up function for my_uuid()
      mysql-test/r/create.result:
        Fixed result file.
      mysql-test/r/maria-big.result:
        Changed not to get a warning.
      mysql-test/r/maria-connect.result:
        Not to get a warning.
      mysql-test/r/maria-recovery.result:
        Not to get a warning.
      mysql-test/r/maria.result:
        Fixed result file. Added test for warning on log file.
      mysql-test/r/ps_maria.result:
        Fixed result file. New bit was added to source.
      mysql-test/t/maria-big.test:
        To avoid a warning.
      mysql-test/t/maria-connect.test:
        To avoid a warning.
      mysql-test/t/maria-recovery.test:
        To avoid a warning.
      mysql-test/t/maria.test:
        To avoid a warning.
      mysql-test/t/ps_maria.test:
        To avoid a warning.
      mysys/my_uuid.c:
        Added clean up function for my_uuid()
      sql/mysqld.cc:
        Manual merge.
      storage/maria/Makefile.am:
        Added "make test" for maria.
      storage/maria/ma_key_recover.c:
        Fix for maria_recovery
      storage/maria/ma_test_all.sh:
        Deprecated file. Functionality moved to
        unittest/ma_test_all-t
      BitKeeper/deleted/.del-unit.pl:
        BitKeeper file /home/my/mysql-maria/storage/maria/unit.pl
      e8bcebd2
    • unknown's avatar
      Merge jani@marvel:/my/bk/mysql-maria.new · 9bf89878
      unknown authored
      into  hynda.mysql.fi:/home/my/mysql-maria
      
      
      include/my_sys.h:
        Auto merged
      include/myisam.h:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/binlog_unsafe.result:
        Auto merged
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        Auto merged
      mysys/my_write.c:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_select.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/sql_union.cc:
        Auto merged
      sql/sql_update.cc:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      storage/myisam/ha_myisam.h:
        Auto merged
      storage/myisam/mi_check.c:
        Auto merged
      storage/myisam/mi_open.c:
        Auto merged
      include/my_base.h:
        Manual merge. New error code.
      9bf89878
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 76051e1a
      unknown authored
      into  mysql.com:/home/my/mysql-maria
      
      
      include/my_base.h:
        Auto merged
      mysql-test/r/maria.result:
        Auto merged
      sql/handler.h:
        Auto merged
      storage/maria/ha_maria.cc:
        Auto merged
      76051e1a
    • unknown's avatar
      Fixed several bugs in page CRC handling · 58581adb
      unknown authored
      - Ignore CRC errors in REDO for potential new pages
      - Ignore CRC errors when repairing tables
      - Don't do readcheck callback on read error
      - Set my_errno to HA_ERR_WRONG_CRC if we find page with wrong CRC
      - Check index page for length before calculating CRC to catch bad pages
      Fixed bugs where we used wrong file descriptor to read/write bitmaps
      Fixed wrong hash key in 'files_in_flush'
      Fixed wrong lock method when writing bitmap
      Fixed some wrong printf statements in check/repair that caused core dumps
      Fixed argument to translog_page_validator that cause reading of log files to fail
      Store number of bytes used for delete-linked key pages to be able to use standard index CRC for deleted key pages.
      Use fast 'dummy' pagecheck callbacks for temporary tables
      Don't die silently if flush finds pinned pages
      Give error (for now) if one tries to create a transactional table with fulltext or spatial keys
      Removed some not needed calls to pagecache_file_init()
      Added checking of pagecache checksums to ma_test1 and ma_test2
      More DBUG
      Fixed some DBUG_PRINT to be in line with rest of the code
      
      
      include/my_base.h:
        Added HA_ERR_INTERNAL_ERROR (used for flush with pinned pages) and HA_ERR_WRONG_CRC
      mysql-test/r/binlog_unsafe.result:
        Added missing DROP VIEW statement
      mysql-test/r/maria.result:
        Added TRANSACTIONAL=0 when testing with fulltext keys
        Added test that verifies we can't yet create transactional test with fulltext or spatial keys
      mysql-test/r/ps_maria.result:
        Added TRANSACTIONAL=0 when testing with fulltext keys
      mysql-test/t/binlog_unsafe.test:
        Added missing DROP VIEW statement
      mysql-test/t/maria.test:
        Added TRANSACTIONAL=0 when testing with fulltext keys
        Added test that verifies we can't yet create transactional test with fulltext or spatial keys
      mysql-test/t/ps_maria.test:
        Added TRANSACTIONAL=0 when testing with fulltext keys
      mysys/my_fopen.c:
        Fd: -> fd:
      mysys/my_handler.c:
        Added new error messages
      mysys/my_lock.c:
        Fd: -> fd:
      mysys/my_pread.c:
        Fd: -> fd:
      mysys/my_read.c:
        Fd: -> fd:
      mysys/my_seek.c:
        Fd: -> fd:
      mysys/my_sync.c:
        Fd: -> fd:
      mysys/my_write.c:
        Fd: -> fd:
      sql/mysqld.cc:
        Fixed wrong argument to my_uuid_init()
      sql/sql_plugin.cc:
        Unified DBUG_PRINT (for convert-dbug-for-diff)
      storage/maria/ma_bitmap.c:
        Fixed wrong lock method when writing bitmap
        Fixed valgrind error
        Use fast  'dummy' pagecheck callbacks for temporary tables
        Faster bitmap handling for non transational tables
      storage/maria/ma_blockrec.c:
        Fixed that bitmap reading is done with the correct filehandle
        Handle reading of pages with wrong CRC when page contect doesn't matter
        Use the page buffer also when we get WRONG CRC or FILE_TOO_SHORT. (Faster and fixed a couple of bugs)
      storage/maria/ma_check.c:
        Split long strings for readablity
        Fixed some wrong printf statements that caused core dumps
        Use bitmap.file for bitmaps
        Ignore pages with wrong CRC
      storage/maria/ma_close.c:
        More DBUG_PRINT
      storage/maria/ma_create.c:
        Give error (for now) if one tries to create a crash safe table with fulltext or spatial keys
      storage/maria/ma_key_recover.c:
        Ignore HA_ERR_WRONG_CRC for new pages
        info->s  ->  share
        Store number of bytes used for delete-linked key pages to be able to use standard index CRC for deleted key pages.
      storage/maria/ma_loghandler.c:
        Fixed argument to translog_page_validator()
      storage/maria/ma_open.c:
        Removed old VMS specific code
        Added function to setup pagecache callbacks
        Moved code around to set 'share->temporary' early
        Removed some not needed calls to pagecache_file_init()
      storage/maria/ma_page.c:
        Store number of bytes used for delete-linked key pages to be able to use standard index CRC for deleted key pages.
      storage/maria/ma_pagecache.c:
        Don't do readcheck callback on read error
        Reset PCBLOCK_ERROR in pagecache_unlock_by_link() if we write page
        Set my_errno to HA_ER_INTERNAL_ERROR if flush() finds pinned pages
        Don't die silently if flush finds pinned pages.
        Use correct file descriptor when flushing pages
        Fixed wrong hash key in 'files_in_flush';  This must be the file descriptor, not the PAGECACHE_FILE as there may be several PAGECACHE_FILE for same file descriptor
        More DBUG_PRINT
      storage/maria/ma_pagecrc.c:
        Removed inline from not tiny static function
        Set my_errno to HA_ERR_WRONG_CRC if we find page with wrong CRC
        (Otherwise my_errno may be 0, and a lot of other code will be confused)
        CRCerror -> error (to keep code uniform)
        Print crc with %lu, as in my_checksum()
        uchar* -> uchar *
        Check index page for length before calculating CRC to catch bad pages
        Added 'dummy' crc_check and filler functions that are used for temporary tables
      storage/maria/ma_recovery.c:
        More DBUG
        More message to users to give information what phase failed
        Better error message if recovery failed
      storage/maria/ma_test1.c:
        Added checking of page checksums (combined with 'c' to not have to add more test runs)
      storage/maria/ma_test2.c:
        Added checking of page checksums (combined with 'c' to not have to add more test runs)
      storage/maria/maria_chk.c:
        Fixed wrong argument to _ma_check_print_error()
      storage/maria/maria_def.h:
        Added format information to _ma_check_print_xxxx functions
        uchar* -> uchar *
      58581adb
  3. 17 Dec, 2007 6 commits
  4. 16 Dec, 2007 11 commits
    • unknown's avatar
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · cc2e05ab
      unknown authored
      into  mysql.com:/home/my/mysql-maria
      
      
      mysql-test/r/maria-recovery.result:
        Auto merged
      storage/maria/ha_maria.cc:
        Auto merged
      storage/maria/ma_blockrec.c:
        Auto merged
      storage/maria/ma_blockrec.h:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_key_recover.c:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_recovery.c:
        Auto merged
      storage/maria/maria_def.h:
        Auto merged
      cc2e05ab
    • unknown's avatar
      Fixed bug in undo_key_delete; Caused crashed key files in recovery · dcfdb9bc
      unknown authored
      Maria is now used for internal temporary tables in MySQL
      Better usage of VARCHAR and long strings in temporary tables
      Use packed fields if BLOCK_RECORD is used
      null_bytes are not anymore stored in a separate field
      New interface to remember and restore scan position
      Fixed bugs in unique handling
      Don't sync Maria temporary tables
      Lock control file while it's used to stop several processes from using it
      Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
      Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
      Added MY_FORCE_LOCK
      
      
      include/my_sys.h:
        Changed value of MA_DONT_OVERWRITE_FILE as it collided with MY_SYNC_DIR
        Split MY_DONT_WAIT into MY_NO_WAIT and MY_SHORT_WAIT (for my_lock())
        Added MY_FORCE_LOCK
      include/myisam.h:
        Make MyISAM columndef compile time compatible with Maria
      mysql-test/lib/mtr_process.pl:
        Removed confusing warning (It's common that there is a lot of other files than pid files)
      mysql-test/mysql-test-run.pl:
        Added --sync-frm to speed up tests
      mysql-test/r/maria-recovery.result:
        Updated results from wrong push
      mysql-test/suite/rpl/t/rpl_innodb_bug28430.test:
        Marked test as --big
      mysys/my_lock.c:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      mysys/my_thr_init.c:
        Fix that we don't give name to thread before it's properly initied
      sql/handler.cc:
        Added myisam.h
      sql/handler.h:
        Changes to use Maria for internal temporary tables
        Removed not needed argument to restart_rnd_next()
        Added function remember_rnd_pos()
      sql/my_lock.c:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      sql/mysql_priv.h:
        Added maria_hton
      sql/sql_class.h:
        Changes to use Maria for internal temporary tables
      sql/sql_select.cc:
        Changes to use Maria for internal temporary tables
        Temporary tables didn't properly switch to dynamic row format if long strings was used
        Better usage of VARCHAR in temporary tables
        Use new interface to restart scan in duplicate removal
      sql/sql_select.h:
        Changes to use Maria for internal temporary tables
      sql/sql_show.cc:
        Changes to use Maria for internal temporary tables
        Removed all end space
      sql/sql_table.cc:
        Set HA_OPTION_PACK_RECORD if we are not using default or static record
      sql/sql_union.cc:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      sql/sql_update.cc:
        If MY_FORCE_LOCK is given, use locking even if my_disable_locking is given
        If MY_NO_WAIT is given, return at once if lock is occupied
        If MY_SHORT_WAIT is given, wait some time for lock before returning (This was called MY_DONT_WAIT before)
      storage/maria/ha_maria.cc:
        Use packed fields
        null_bytes are not anymore stored in a separate field
        Changes to use Maria for internal temporary tables
        Give warning if we try to do an ALTER TABLE to a unusable row format
      storage/maria/ha_maria.h:
        Allow Maria with block format to restart scanning at given position
      storage/maria/ma_blockrec.c:
        Added functions to remember and restore scan position
        Allocate cur_row.extents so that we don't have to do a malloc on first read
        Fixed bug when using packed row without packed strings
        Removed unneeded calls to free_full_pages()
        Fixed unlikely bug when using old bitmap to read head page and head page had gone away
        Remember row position when doing undo of delete and update row (needed for undo of key delete)
      storage/maria/ma_blockrec.h:
        Added functions to remember and restore scan position
      storage/maria/ma_close.c:
        Don't sync temporary tables
      storage/maria/ma_control_file.c:
        Lock control file while it's used to stop several processes from using it
      storage/maria/ma_create.c:
        Fixed bug when using FIELD_NORMAL that was longer than FULL_PAGE_SIZE
        Fixed bug that casued fields to not be ordered according to offset
        Fixed bug in unique creation
      storage/maria/ma_delete.c:
        Don't write record reference when deleting key.
        (Rowid is likely to be different when we undo this)
      storage/maria/ma_dynrec.c:
        Fixed core dump when comparing records (happended in unique handling)
      storage/maria/ma_extra.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
        Removed TODO comment. (Was not relevant as all other instances are guranteed to be closed when we the code is excecuted)
        Added DBUG_ASSERT() to prove above.
      storage/maria/ma_key_recover.c:
        CLR's for UNDO_ROW_DELETE and UNDO_ROW_UPDATE now include rowid for the row.
        This was needed for undo_key_delete to work, as undo of delete row is likely to put row in a new position.
        undo_delete_key now doesn't include row position
      storage/maria/ma_open.c:
        Added virtual functions for remembering and restoring scan position
        Fixed wrong key search method when using multi-byte character sets (Bug#32705)
        Store original column number in index file
        
        NOTE: Index files are now incompatible with previous versions!
        (Ok as we haven't yet made a public Maria release)
      storage/maria/ma_recovery.c:
        Set info->cur_row.lastpos when reading CLR's for UNDO_ROW_DELETE or UNDO_ROW_UPDATE
      storage/maria/ma_scan.c:
        Added default function to remember and restore scan position
      storage/maria/maria_def.h:
        Added virtual functions & variables to remember and restore scan position
        Added MARIA_MAX_CONTROL_FILE_LOCK_RETRY
      storage/myisam/ha_myisam.cc:
        Fixed compiler errors as columdef->type is now an enum, not an integer
        Added functions to remember and restore scan position
      storage/myisam/ha_myisam.h:
        Added functions to remember and restore scan position
      storage/myisam/mi_check.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      storage/myisam/mi_extra.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      storage/myisam/mi_open.c:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      storage/myisam/myisamdef.h:
        MY_DONT_WAIT -> MY_SHORT_WAIT
      dcfdb9bc
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria · 7fc621af
      unknown authored
      into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.new
      
      
      configure.in:
        Auto merged
      include/my_global.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      7fc621af
    • unknown's avatar
      Fixed after-merge problems. · dfe098fe
      unknown authored
      dfe098fe
    • unknown's avatar
      test of removing logs. · 4fd3bc22
      unknown authored
      
      storage/maria/unittest/ma_test_loghandler_nologs-t.c:
        New BitKeeper file ``storage/maria/unittest/ma_test_loghandler_nologs-t.c''
      4fd3bc22
    • unknown's avatar
      Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main · 7a278092
      unknown authored
      into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.new
      
      
      BitKeeper/etc/ignore:
        auto-union
      BUILD/compile-dist:
        Auto merged
      client/mysqladmin.cc:
        Auto merged
      client/mysqldump.c:
        Auto merged
      config/ac-macros/plugins.m4:
        Auto merged
      configure.in:
        Auto merged
      dbug/dbug.c:
        Auto merged
      include/keycache.h:
        Auto merged
      include/m_string.h:
        Auto merged
      include/my_global.h:
        Auto merged
      include/my_pthread.h:
        Auto merged
      include/my_sys.h:
        Auto merged
      include/mysql_com.h:
        Auto merged
      libmysql/CMakeLists.txt:
        Auto merged
      libmysql/Makefile.shared:
        Auto merged
      mysql-test/lib/mtr_cases.pl:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/innodb.result:
        Auto merged
      mysql-test/r/merge.result:
        Auto merged
      mysql-test/r/myisam.result:
        Auto merged
      mysql-test/r/mysqldump.result:
        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/query_cache.result:
        Auto merged
      mysql-test/r/subselect.result:
        Auto merged
      mysql-test/r/view.result:
        Auto merged
      mysql-test/suite/ndb/r/ps_7ndb.result:
        Auto merged
      mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
        Auto merged
      mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
        Auto merged
      mysql-test/t/delayed.test:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/myisam.test:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      mysql-test/t/query_cache_notembedded.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/CMakeLists.txt:
        Auto merged
      mysys/Makefile.am:
        Auto merged
      mysys/mf_keycache.c:
        Auto merged
      mysys/my_delete.c:
        Auto merged
      mysys/my_init.c:
        Auto merged
      mysys/my_symlink2.c:
        Auto merged
      mysys/safemalloc.c:
        Auto merged
      mysys/thr_lock.c:
        Auto merged
      sql/field.h:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/ha_ndbcluster.cc:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/item.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/item_xmlfunc.cc:
        Auto merged
      sql/lock.cc:
        Auto merged
      sql/log.cc:
        Auto merged
      sql/log_event_old.h:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/net_serv.cc:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/set_var.h:
        Auto merged
      sql/slave.cc:
        Auto merged
      sql/slave.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_delete.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/share/errmsg.txt:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      sql/udf_example.c:
        Auto merged
      storage/csv/ha_tina.cc:
        Auto merged
      storage/myisam/ft_boolean_search.c:
        Auto merged
      storage/myisam/ft_nlq_search.c:
        Auto merged
      storage/myisam/ft_parser.c:
        Auto merged
      storage/myisam/ha_myisam.cc:
        Auto merged
      storage/myisam/ha_myisam.h:
        Auto merged
      storage/myisam/mi_check.c:
        Auto merged
      storage/myisam/mi_dynrec.c:
        Auto merged
      storage/myisam/mi_open.c:
        Auto merged
      storage/myisam/mi_packrec.c:
        Auto merged
      storage/myisam/mi_write.c:
        Auto merged
      storage/myisam/myisamchk.c:
        Auto merged
      storage/myisam/myisampack.c:
        Auto merged
      storage/myisam/rt_index.c:
        Auto merged
      storage/myisam/sort.c:
        Auto merged
      storage/myisammrg/ha_myisammrg.cc:
        Auto merged
      storage/myisammrg/ha_myisammrg.h:
        Auto merged
      strings/llstr.c:
        Auto merged
      support-files/compiler_warnings.supp:
        Auto merged
      Makefile.am:
        Manual merge from 5.1 to maria.
      client/mysqltest.c:
        Manual merge from 5.1 to maria.
      include/my_base.h:
        Manual merge from 5.1 to maria.
      mysql-test/t/merge.test:
        Manual merge from 5.1 to maria.
      mysys/my_getopt.c:
        Manual merge from 5.1 to maria.
      mysys/thr_mutex.c:
        Manual merge from 5.1 to maria.
      sql/mysqld.cc:
        Manual merge from 5.1 to maria.
      sql/set_var.cc:
        Manual merge from 5.1 to maria.
      sql/sql_table.cc:
        Manual merge from 5.1 to maria.
      sql/sql_yacc.yy:
        Manual merge from 5.1 to maria.
      sql/unireg.cc:
        Manual merge from 5.1 to maria.
      7a278092
    • unknown's avatar
      page CRC calculating · 3f3f20b2
      unknown authored
      
      storage/maria/ma_pagecrc.c:
        New BitKeeper file ``storage/maria/ma_pagecrc.c''
      3f3f20b2
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 3b5a822a
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria
      
      3b5a822a
    • unknown's avatar
      my_uuid_init() was forgotten · 0ce96763
      unknown authored
      
      mysys/my_uuid.c:
        de-corelate two randominit's
      sql/mysqld.cc:
        my_uuid_init() was forgotten here
      0ce96763
    • unknown's avatar
      postmerge changes. · 1cca9bcb
      unknown authored
      1cca9bcb
  5. 15 Dec, 2007 8 commits
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · 5e51ce91
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-callback
      
      
      storage/maria/Makefile.am:
        Auto merged
      storage/maria/ma_blockrec.c:
        Auto merged
      storage/maria/ma_check.c:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_loghandler.h:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_page.c:
        Auto merged
      storage/maria/ma_pagecache.c:
        Auto merged
      storage/maria/maria_chk.c:
        Auto merged
      storage/maria/maria_def.h:
        Auto merged
      storage/maria/unittest/ma_test_loghandler-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_max_lsn-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_noflush-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Auto merged
      storage/maria/ma_bitmap.c:
        Merge.
      storage/maria/ma_loghandler.c:
        Merge.
      storage/maria/unittest/Makefile.am:
        Merge.
      5e51ce91
    • unknown's avatar
      Pagecache callbacks support added. · fce0e6a0
      unknown authored
      Page CRC check based on pagecache support added.
      Loghandler pagecache callbacks support added.
      Loghandler filecache rewritten.
      Support of deletting all logs added.
      
      
      storage/maria/Makefile.am:
        New file with functions for CRC calculation.
      storage/maria/ma_bitmap.c:
        Page CRC support.
      storage/maria/ma_blockrec.c:
        Removed code replaced by pagecache callbacks.
      storage/maria/ma_check.c:
        Page CRC support.
      storage/maria/ma_create.c:
        Page CRC support.
      storage/maria/ma_loghandler.c:
        Pagecache callbacks support.
        New file cache support.
        Removing log files support.
      storage/maria/ma_loghandler.h:
        CRC_LENGTH replaced with CRC_SIZE
      storage/maria/ma_open.c:
        Page CRC support.
      storage/maria/ma_page.c:
        Page CRC support.
      storage/maria/ma_pagecache.c:
        Pagecache callbacks support.
      storage/maria/ma_pagecache.h:
        Pagecache callbacks support.
      storage/maria/ma_panic.c:
        Page CRC support.
      storage/maria/maria_chk.c:
        Page CRC support.
      storage/maria/maria_def.h:
        Page CRC support.
      storage/maria/unittest/Makefile.am:
        New test of removing logs.
      storage/maria/unittest/ma_maria_log_cleanup.c:
        Memory leack fixed.
      storage/maria/unittest/ma_pagecache_consist.c:
        Pagecache callbacks support.
      storage/maria/unittest/ma_pagecache_single.c:
        Pagecache callbacks support.
      storage/maria/unittest/ma_test_loghandler-t.c:
        Fixed the test error processing.
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Fixed the test error processing.
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        Fixed the test error processing.
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Fixed the test error processing.
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        Fixed the test error processing.
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        Fixed the test error processing.
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Pagecache callbacks support.
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Fixed the test error processing.
      storage/maria/unittest/test_file.c:
        Removed unneeded sync.
      fce0e6a0
    • unknown's avatar
      Postmerge fix. · ff512a81
      unknown authored
      
      storage/maria/ma_loghandler.c:
        Postmerge fix.
        New state of the log added to proicess correctly shutdown.
      storage/maria/ma_loghandler.h:
        New state of the log added to proicess correctly shutdown.
      ff512a81
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · d1ee3926
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-readonly
      
      
      storage/maria/ha_maria.cc:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_test1.c:
        Auto merged
      storage/maria/ma_test2.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_max_lsn-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_noflush-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Auto merged
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Auto merged
      storage/maria/ma_check.c:
        Merge.
      storage/maria/ma_loghandler.c:
        Merge.
      storage/maria/ma_loghandler.h:
        Merge.
      storage/maria/maria_read_log.c:
        Merge.
      storage/maria/unittest/Makefile.am:
        Merge.
      d1ee3926
    • unknown's avatar
      Transaction log behaviour in case of write · 3a913bdf
      unknown authored
        error fixed (switching to the read only mode).
      Added read only mode of transactions log handler.
      
      
      storage/maria/ha_maria.cc:
        Transaction log initialization parameters change.
      storage/maria/ma_check.c:
        New status variable of transactional log.
      storage/maria/ma_create.c:
        New status variable of transactional log.
      storage/maria/ma_loghandler.c:
        - New status variable added.
        - Checking the status variable in the loghandler
        interface functions added
        - All fails of loghandler functions revised.
        - UNRECOVERABLE_ERROR() removed.
        - Switching to read only mode added where it nead.
        - Checking of log state added before writes log content
          and changing status variables like sent_to_file, n_buffers_only, flushed.
        - Readonly loghandler initialization added.
        - Fixed problem with example table transactional log initialization.
      storage/maria/ma_loghandler.h:
        Readonly loghandler initialization added.
        Fixed problem with example table transactional log initialization.
        New status variable added.
      storage/maria/ma_open.c:
        New status variable of transactional log.
      storage/maria/ma_test1.c:
        Transaction log initialization parameters change.
      storage/maria/ma_test2.c:
        Transaction log initialization parameters change.
      storage/maria/maria_read_log.c:
        Transaction loghandler initialization in read only mode in
        case of only dysplay parameter.
      storage/maria/unittest/Makefile.am:
        Test of readonly mode added.
      storage/maria/unittest/ma_test_loghandler-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
        Fixed incorrect fprintf call parameters.
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Useing this test also as read only loghandler test.
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Transaction log initialization parameters change.
        Fixed problem with example table transactional log initialization.
      3a913bdf
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 474cfbe8
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-monty
      
      
      storage/maria/ma_blockrec.c:
        Auto merged
      474cfbe8
    • unknown's avatar
      WL#3072 Maria Recovery. · 6912da62
      unknown authored
      Updates to the bitmap flush/pin logic to prepare for when we support
      multiple writers.
      
      
      storage/maria/ma_bitmap.c:
        Read lock is less bad than write lock.
        Changing bitmap->flushable to a counter, to prepare for when multiple
        writers are allowed on a table.
        Using bitmap->flush_all_requested instead of share->in_checkpoint; the
        latter can be true for the time of a whole checkpoint even though
        the checkpoint is not yet handling our table, or has already handled it,
        so to decrease the number of broadcasts we use a dedicated my_bool
        which is true only when checkpoint is handling this table's bitmap.
        _ma_bitmap_flushable(share,+1) waits for a concurrent _ma_bitmap_flush_all()
        to finish before incrementing non_flushable; without this, with multiple
        writers there may always be one thread making the bitmap unflushable
        and thus checkpoint would stall.
      storage/maria/ma_blockrec.c:
        update to new prototype: "flushable is FALSE|TRUE" becomes "add 1|-1 to
        non_flushable".
      storage/maria/ma_blockrec.h:
        new prototype
      storage/maria/maria_def.h:
        MARIA_FILE_BITMAP::flushable becomes a counter.
        New MARIA_FILE_BITMAP::flush_all_requested.
      6912da62
    • unknown's avatar
      include sys/stat.h · 4355adc1
      unknown authored
      remove duplicate symbol
      
      
      configure.in:
        include sys/stat.h
      include/my_global.h:
        include sys/stat.h
      sql/mysqld.cc:
        remove duplicate symbol
      4355adc1
  6. 14 Dec, 2007 6 commits
    • unknown's avatar
      pushbuild fixes to please gcc and darwin/ppc64 · fdbb0258
      unknown authored
      
      include/my_atomic.h:
        transparent_union doesn't work in g++, doesn't work on darwin/ppc64
      storage/maria/ma_blockrec.c:
        compiler warning
      storage/maria/ma_loghandler.c:
        compiler warning
      storage/maria/ma_page.c:
        compiler warning
      fdbb0258
    • unknown's avatar
      fix for pushbuild test failure · 2da93c6e
      unknown authored
      
      mysql-test/t/ps_maria.test:
        test Maria presence before setting Maria variables
      2da93c6e
    • unknown's avatar
      fix for some gcc -ansi warnings. · 6ee5af16
      unknown authored
      
      storage/maria/ma_checkpoint.c:
        gcc -ansi warnings
      storage/maria/ma_pagecache.c:
        comment
      storage/maria/ma_recovery.c:
        gcc -ansi warnings
      6ee5af16
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 908f6c79
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-monty
      
      908f6c79
    • unknown's avatar
      WL#3072 - Maria recovery. · 68f5d6a0
      unknown authored
      * fix for bitmap vs checkpoint bug which could lead to corrupted
      tables in case of crashes at certain moments: a bitmap could be flushed
      to disk even though it was inconsistent with the log (it could be
      flushed before REDO-UNDO are written to the log). One bug remains, need
      code from others. Tests added. Fix is to pin unflushable bitmap pages,
      and let checkpoint wait for them to be flushable.
      * fix for long_trid!=0 assertion failure at Recovery.
      * less useless wakeups in the background flush|checkpoint thread.
      * store global_trid_generator in checkpoint record.
      
      
      mysql-test/r/maria-recovery.result:
        result update
      mysql-test/t/maria-recovery.test:
        make it easier to locate subtests
      storage/maria/ma_bitmap.c:
        When we send a bitmap to the pagecache, if this bitmap is not in a
        flushable state we keep it pinned and add it to a list, it will be
        unpinned when the bitmap is flushable again.
        A new function _ma_bitmap_flush_all() used by checkpoint.
        A new function _ma_bitmap_flushable() used by block format to signal
        when it starts modifying a bitmap and when it is done with it.
      storage/maria/ma_blockrec.c:
        When starting a row operation (insert/update/delete), mark that
        the bitmap is not flushable (because for example INSERT is going
        to over-allocate in the bitmap to prevent other threads from using
        our data pages). If a checkpoint comes at this moment it will wait
        for the bitmap to be flushable before flushing it.
        When the operation ends, bitmap becomes flushable again; that
        transition is done under the bitmap's mutex (needed for correct
        synchro with a concurrent checkpoint); but for INSERT/UPDATE this
        happens inside _ma_bitmap_release_unused() at a place where it already
        has the mutex, so the only penalty (mutex adding) is in DELETE and UNDO
        of INSERT. In case of errors after setting the bitmap unflushable,
        we must always set it back to flushable or checkpoint would block.
        Debug possibilities to force a sleep while the bitmap is over-allocated.
        In case of error in get_head_or_tail() in allocate_and_write_block_record(),
        we still need to unpin all pages.
        Bugfix: _ma_apply_redo_insert_row_blobs() produced wrong
        data_file_length.
      storage/maria/ma_blockrec.h:
        new bitmap calls.
      storage/maria/ma_checkpoint.c:
        filter_flush_indirect not needed anymore (flushing bitmap
        pages happens in _ma_bitmap_flush_all() now). So
        st_filter_param::is_data_file|pages_covered_by_bitmap not needed.
        Other filter_flush* don't need to flush bitmap anymore.
        Add debug possibility to flush all bitmap pages outside of a checkpoint,
        to simulate pagecache LRU eviction.
        When the background flush/checkpoint thread notices it has nothing
        to flush, it now sleeps directly until the next potential checkpoint
        moment instead of waking up every second.
        When in checkpoint we decide to not store a table in the checkpoint record
        (because it has logged no writes for example), we can also skip flushing
        this table.
      storage/maria/ma_commit.c:
        comment is out-of-date
      storage/maria/ma_key_recover.c:
        comment fix
      storage/maria/ma_loghandler.c:
        comment is out-of-date
      storage/maria/ma_open.c:
        comment is out-of-date
      storage/maria/ma_pagecache.c:
        comment for bug to fix. And we don't take checkpoints at end of REDO
        phase yet so can trust block->type.
      storage/maria/ma_recovery.c:
        Comments. Now-unneeded code for incomplete REDO-UNDO groups removed.
        When we forget about an old transaction we must really forget
        about it with bzero() (fixes the "long_trid!=0 assertion" recovery
        bug). When we delete a row with maria_delete() we turn on
        STATE_NOT_OPTIMIZED_ROWS so we do the same when we see a CLR_END
        for an UNDO_ROW_INSERT or when we execute an UNDO_ROW_INSERT (in both
        cases a row was deleted). Pick up max_long_trid from the checkpoint record.
      storage/maria/maria_chk.c:
        comment
      storage/maria/maria_def.h:
        MARIA_FILE_BITMAP gets new members: 'flushable', 'bitmap_cond' and
        'pinned_pages'.
      storage/maria/trnman.c:
        I used to think that recovery only needs to know the maximum TrID
        of the lists of active and committed transactions. But no, sometimes
        both lists can even be empty and their TrID should not be reused.
        So Checkpoint now saves global_trid_generator in the checkpoint record.
      storage/maria/trnman_public.h:
        macros to read/store a TrID
      mysql-test/r/maria-recovery-bitmap.result:
        result is ok. Without the code fix, we would get a corruption message
        about the bitmap page in CHECK TABLE EXTENDED.
      mysql-test/t/maria-recovery-bitmap-master.opt:
        usual when we crash mysqld in tests
      mysql-test/t/maria-recovery-bitmap.test:
        test of recovery problems specific of the bitmap pages.
      68f5d6a0
    • unknown's avatar
      more cmake fixes · 70e045a7
      unknown authored
      70e045a7