An error occurred fetching the project authors.
  1. 11 Jan, 2011 1 commit
    • Michael Widenius's avatar
      Safety fix for Aria: · fcd3f2cd
      Michael Widenius authored
      - Set lastinx= ~0 when last_key.keyinfo is set.
      
      
      storage/maria/ma_check.c:
        Set lastinx= ~0 when last_key.keyinfo is set
      storage/maria/ma_ft_boolean_search.c:
        Set lastinx= ~0 when last_key.keyinfo is set
      storage/maria/ma_rt_index.c:
        Remove setting of info->lastkey.keyinfo, as this should already be set by caller
      storage/maria/ma_search.c:
        Added ASSERT to ensure that info->last_key.keyinfo is properly set
      storage/maria/ma_unique.c:
         Set lastinx= ~0 when last_key.keyinfo is set
      fcd3f2cd
  2. 07 Jan, 2011 1 commit
    • Michael Widenius's avatar
      Don't do DBUG_ASSERT for checksum errors when using REPAIR · c0fc6d42
      Michael Widenius authored
      mysql_convert_table_format ignored --engine option.
      Fix that zerofill() doesn't write out wrong data to client if run with auto repair.
      Ensure that pagecache is properly flushed, even in case of errors.
      Handle checksum errors in BLOCK_RECORD format.
      
      
      scripts/mysql_convert_table_format.sh:
        Fixed that --engine option works
      storage/maria/ha_maria.cc:
        Fix that zerofill() doesn't write out wrong data to client if run with auto repair.
      storage/maria/ma_check.c:
        Set in_check_table when scanning table to not get DBUG_ASSERT for checksum error.
        Ensure that pagecache is properly flushed, even in case of errors.
        Handle checksum errors in BLOCK_RECORD format.
      storage/maria/ma_sort.c:
        Set in_check_table when scanning table to not get DBUG_ASSERT for checksum error.
      c0fc6d42
  3. 06 Jan, 2011 1 commit
    • Michael Widenius's avatar
      Bug fixing in Aria: · 5b0afd8a
      Michael Widenius authored
      - Fixed some bugs in recovery of blobs
      - Don't ASSERT() on checksum errors when running check table
      - Added to maria_read_log option --tables-to-redo=list-of-tables to only recover some tables (good for debugging)
      
      
      storage/maria/ma_blockrec.c:
        Don't ASSERT() on checksum errors when running check table
        Fixed bug in recovery of blog page that was not in dirty pages list
      storage/maria/ma_check.c:
        Don't ASSERT() on checksum errors when running check table
      storage/maria/ma_recovery.c:
        Handling of --tables-to-redo
      storage/maria/ma_recovery.h:
        Handling of --tables-to-redo
      storage/maria/ma_recovery_util.c:
        Give better warning if table was not in dirty pages list
      storage/maria/maria_def.h:
        Added in_check_table
      storage/maria/maria_read_log.c:
        Added --tables-to-redo=list-of-tables to only recover some tables (good for debugging)
        Cleaned up message when wrong arguments
      5b0afd8a
  4. 04 Jan, 2011 1 commit
    • Michael Widenius's avatar
      Fixed recovery problem in Aria where bitmap had wrong information after recovery. · 1e0b42d9
      Michael Widenius authored
      LP#619731: Aria recovery corruption "Page 1: Row: 1 has an extent with wrong information in bitmap
      
      storage/maria/ma_bitmap.c:
        Don't send broadcast if no one is waiting for it
      storage/maria/ma_blockrec.c:
        Don't update bitmap if the page is not in the dirty_page list (or LSN is after checkpoint start)
        Fixes the case where we have in the log redo_free_block followed by another redo entry for the same page which is ignored.
        Also fixed that _ma_apply_redo_insert_row_blobs() doesn't update the bitmap in similar circumstances.
      storage/maria/ma_blockrec.h:
        Updated prototype
      storage/maria/ma_check.c:
        Added printing of bitmap information if used with maria_chk -vvv (for debugging)
      storage/maria/ma_recovery.c:
        Updated call parameters to _ma_apply_redo_free_blocks().
      1e0b42d9
  5. 10 Dec, 2010 1 commit
    • Michael Widenius's avatar
      Fix for Lbug:#686010 maria.optimize corrupts stack around alloca() call · bd2034db
      Michael Widenius authored
      storage/maria/ma_check.c:
        Allocate also memory for nodflag and transid's
      storage/maria/ma_write.c:
        Allow nodflag and transid as part of key.
        (This has nothing to do with the bug report, but it's a safer check).
      storage/maria/maria_def.h:
        Define MARIA_MAX_POINTER_LENGTH (length of pointer to node)
        Added node pointer length to MARIA_INDEX_OVERHEAD_SIZE, as this is part of the key.
        (Safety fix)
      bd2034db
  6. 07 Nov, 2010 1 commit
    • Michael Widenius's avatar
      Added option BACKUP_ALL to mysqld --myisam-recover to also get a backup of the... · 9d68ccde
      Michael Widenius authored
      Added option BACKUP_ALL to mysqld --myisam-recover to also get a backup of the index file before it's repaired.
      Removed wrong call to translog_buffer_unlock() that caused 'unlocking not locked mutex' failure in Aria log handler.
      
      extra/replace.c:
        Updated call to my_redel()
      include/maria.h:
        Updated prototype for maria_change_to_newfile
      include/my_sys.h:
        Updated prototypes
        Added my_create_backup_name
      include/myisam.h:
        Updated prototypes
      include/myisamchk.h:
        Added 'backup_time' to st_handler_check_param to be able to generate same name for backuped data and index file
      mysys/my_redel.c:
        Added time_t option to my_redel() to be able to generate same backup extensions for many files
      sql/handler.cc:
        Added start_time to st_ha_check_opt
      sql/handler.h:
        Added start_time to HA_CHECK_OPT
      sql/mysqld.cc:
        Added option BACKUP_ALL to --myisam-recover
      storage/maria/ha_maria.cc:
        Remember start time for repair
      storage/maria/ma_check.c:
        Use remembered start time for backup file names
        Removed some dead code
      storage/maria/ma_loghandler.c:
        Removed wrong call to translog_buffer_unlock() that caused 'unlocking not locked mutex' failure in log handler.
      storage/maria/maria_chk.c:
        Removed dead code (O_NEW_INDEX was never set)
        Report if table was 'crashed on repair'
      storage/maria/maria_pack.c:
        Updated parameters to my_redel()
      storage/myisam/ha_myisam.cc:
        Added recover option BACKUP_ALL to get a backup of the index file before it's repaired.
        Print information to log if we make a backup of data as part of repair.
      storage/myisam/ha_myisam.h:
        Added HA_RECOVER_FULL_BACKUP
      storage/myisam/mi_check.c:
        Use remembered start time for backup file names
        Added mi_make_backup_of_index()
      storage/myisam/myisamchk.c:
        Removed dead code (O_NEW_INDEX was never set)
        Report if table was 'crashed on repair'
      storage/myisam/myisampack.c:
        Updated call to my_redel()
      9d68ccde
  7. 12 Oct, 2010 1 commit
    • Michael Widenius's avatar
      Use less memory on stack in sql_parse.cc and in repair/check for MyISAM & Aria · 236141d4
      Michael Widenius authored
      sql/sql_parse.cc:
        Make some not commonly used functions with big local variables to separate functions to make default stack usage smaller.
        Decrease size of db_buff[] (Was bigger than needed)
        Allocate current_global_status_var with malloc().
      storage/maria/ha_maria.cc:
        Don't allocate HA_CHECK on stack (it's > 100K)
      storage/maria/ma_check.c:
        Removed duplicated code
      236141d4
  8. 23 Sep, 2010 1 commit
    • Michael Widenius's avatar
      Change some my_bool in C++ classes and a few functions to bool to detect wrong... · bdba1d11
      Michael Widenius authored
      Change some my_bool in C++ classes and a few functions to bool to detect wrong usage of bool/my_bool.
      Fix some bugs where we stored values other than 0 or 1 in my_bool
      Fixed some compiler warnings
      
      
      client/mysql.cc:
        Changed interrupted_query from my_bool to int, as we stored 2 in it.
      client/mysqladmin.cc:
        Changed return variable type to same type as function value type
      client/mysqltest.cc:
        Changed 'found' to int as we store other values than 0 or 1 into it
        Changed type for parameter of set_reconnect() to match usage.
      extra/libevent/evbuffer.c:
        Added __attribute__((unused))
      extra/libevent/event.c:
        Added __attribute__((unused))
      extra/libevent/signal.c:
        Added __attribute__((unused))
      sql/event_data_objects.h:
        my_bool -> bool
      sql/event_db_repository.cc:
        my_bool -> bool
      sql/event_db_repository.h:
        my_bool -> bool
      sql/event_parse_data.h:
        my_bool -> bool
      sql/events.cc:
        my_bool -> bool
      sql/events.h:
        my_bool -> bool
      sql/field.cc:
        my_bool -> bool
      sql/field.h:
        my_bool -> bool
      sql/hash_filo.h:
        my_bool -> bool
      sql/item.cc:
        my_bool -> bool
      sql/item.h:
        my_bool -> bool
      sql/item_cmpfunc.h:
        my_bool -> bool
        Changed result_for_null_param from my_bool to int as we stored -1 in it.
      sql/item_func.cc:
        my_bool -> bool
        Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
      sql/item_func.h:
        my_bool -> bool
      sql/item_subselect.h:
        my_bool -> bool
      sql/item_sum.cc:
        Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
      sql/parse_file.h:
        my_bool -> bool
      sql/rpl_mi.h:
        my_bool -> bool
      sql/sp_rcontext.h:
        my_bool -> bool
      sql/sql_analyse.h:
        my_bool -> bool
      sql/sql_base.cc:
        Change some assignments so that we don't initialize bool variables with int's.
      sql/sql_bitmap.h:
        my_bool -> bool
      sql/sql_cache.cc:
        my_bool -> bool
      sql/sql_cache.h:
        my_bool -> bool
      sql/sql_class.h:
        my_bool -> bool
      sql/sql_insert.cc:
        Change some assignments so that we don't initialize bool variables with int's.
      sql/sql_prepare.cc:
        my_bool -> bool
      sql/table.h:
        my_bool -> bool
      storage/maria/ma_check.c:
        Removed duplicate assignment
      strings/decimal.c:
        Fixed wrong variable usage.
        Don't do complex arithmetic on bool when simple works.
      bdba1d11
  9. 12 Sep, 2010 1 commit
  10. 10 Sep, 2010 1 commit
    • Michael Widenius's avatar
      Fix for LP#634943 "marked as crashed", "zerofilling" and "wrong data in... · b9890b05
      Michael Widenius authored
      Fix for LP#634943 "marked as crashed", "zerofilling" and "wrong data in bitmap" when recovering Aria tables
      This was an interaction of several bugs:
      - Tables marked as opened was not properly unmarked on recovery if there was not changes since checkpoint
      - zerofill of tables put wrong data in bitmap if directory for page was full
      - Tables was thought as 'moved' during recovery if they had a create_lsn bigger than the lsn in the control file.
      
      
      storage/maria/ha_maria.cc:
        If table is moved and crashed, threat it as crashed.
        (Not a related to this bug, but still good to have fixed)
      storage/maria/ma_blockrec.c:
        Make enough_free_entries_on_page() global
      storage/maria/ma_blockrec.h:
        Make enough_free_entries_on_page() global
      storage/maria/ma_check.c:
        If directory is full, mark page full. Fixes bug in zerofill
      storage/maria/ma_open.c:
        Don't marke files as MOVED during recovery if create_trid > trnman_max_trid, as this fails for tables created after checkpoint.
      storage/maria/ma_recovery.c:
        Reset open_count in file that was open during crash and was part of checkpoint.
        Fixed wrong warning of 'open count' after recovery of files that was not touched since checkpoint.
      storage/maria/maria_chk.c:
        Changed not documented option --log-dir to --logdir
        Document more of the options.
        Clean up output for --help
      storage/maria/trnman.c:
        Added DBUG_PRINT
      b9890b05
  11. 09 Sep, 2010 1 commit
    • Michael Widenius's avatar
      Fixed bug LP#605798 "wrong data in bitmap" after recovery. · b7158601
      Michael Widenius authored
      Extend remove_function_from_trace.pl to work with many threads (patch from Sergei)
      
      
      dbug/remove_function_from_trace.pl:
        Extend remove_function_from_trace.pl to work with many threads (patch from Sergei)
      storage/maria/ma_bitmap.c:
        Added marker that table had changed since last checkpoint.
        This ensures that we will flush all bitmap pages from cache at checkpoint.
        This fixes bug LP#605798 "wrong data in bitmap" after recovery.
      storage/maria/ma_check.c:
        Cleaned up error output
      storage/maria/ma_recovery.c:
        Cleaned up error output
      storage/maria/maria_def.h:
        Added changed_not_flushed
      b7158601
  12. 05 Sep, 2010 1 commit
    • Michael Widenius's avatar
      Fixed bug that 'maria_read_log -a' didn't set max_trid when reparing tables. · 0f3d4b2f
      Michael Widenius authored
      Fixed bug in Aria when replacing short keys with long keys and a key tree both overflow and underflow at same time.
      Fixed several bugs when generating recovery logs when using RGQ with replacing long keys with short keys and vice versa.
      Lots of new DBUG_ASSERT()'s
      Added more information to recovery log to make it easier to know from where log entry orginated.
      Introduced MARIA_PAGE->org_size that tells what the size of the page was in last log entry. This allows us to find out if all key changes for index page was logged.
      Small code cleanups:
      - Introduced _ma_log_key_changes() to log crc of key page changes
      - Added share->max_index_block_size as max size of data one can put in key block (block_size - KEYPAGE_CHECKSUM_SIZE)
        This will later simplify adding a directory to index pages.
      - Write page number instead of page postition to DBUG log
      
      
      
      mysql-test/lib/v1/mysql-test-run.pl:
        Use --general-log instead of --log to disable warning when using RQG
      sql/mysqld.cc:
        If we have already sent ok to client when we get an error, log this to stderr
        Don't disable option --log-output if CSV engine is not supported.
      storage/maria/ha_maria.cc:
        Log queries to recovery log also in LOCK TABLES
      storage/maria/ma_check.c:
        If param->max_trid is set, use this value instead of max_trid_in_system().
        This is used by recovery to set max_trid to max seen trid so far.
        keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE -> max_index_block_size (Style optimization)
      storage/maria/ma_delete.c:
        Mark tables crashed early
        Write page number instead of page position to debug log.
        Added parameter to ma_log_delete() and ma_log_prefix() that is logged so that we can find where wrong log entries where generated.
        Fixed bug where a page was not proplerly written when same key tree had both an overflow and underflow when deleting a key.
        keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE => max_index_block_size (Style optimization)
        ma_log_delete() now has extra parameter of how many bytes from end of page should be appended to log for page (for page overflows)
      storage/maria/ma_key_recover.c:
        Added extra parameter to ma_log_prefix() to indicate what caused log entry.
        Update MARIA_PAGE->org_size when logging info about page.
        Much more DBUG_ASSERT()'s.
        Fix some bugs in maria_log_add() to handle page overflows.
        Added _ma_log_key_changes() to log crc of key page changes.
        If EXTRA_STORE_FULL_PAGE_IN_KEY_CHANGES is defines, log the resulting pages to log so one can trivally
        see how the resulting page should have looked like (for errors in CRC values)
      storage/maria/ma_key_recover.h:
        Added _ma_log_key_changes() which is only called if EXTRA_DEBUG_KEY_CHANGES is defined.
        Updated function prototypes.
      storage/maria/ma_loghandler.h:
        Added more values to en_key_debug, to get more exact location where things went wrong when logging to recovery log.
      storage/maria/ma_open.c:
        Initialize share->max_index_block_size
      storage/maria/ma_page.c:
        Added updating and testing of MARIA_PAGE->org_size
        Write page number instead of page postition to DBUG log
        Generate error if we read page with wrong data.
        Removed wrong assert: key_del_current != share->state.key_del.
        Simplify _ma_log_compact_keypage()
      storage/maria/ma_recovery.c:
        Set param.max_trid to max seen trid before running repair table (used for alter table to create index)
      storage/maria/ma_rt_key.c:
        Update call to _ma_log_delete()
      storage/maria/ma_rt_split.c:
        Use _ma_log_key_changes()
        Update MARIA_PAGE->org_size
      storage/maria/ma_unique.c:
        Remove casts
      storage/maria/ma_write.c:
        keyinfo->block_length - KEYPAGE_CHECKSUM_SIZE => share->max_index_block_length.
        Updated calls to _ma_log_prefix()
        Changed code to use _ma_log_key_changes()
        Update ma_page->org_size
        Fixed bug in _ma_log_split() for pages that overflow
        Added KEY_OP_DEBUG logging to functions
        Log KEYPAGE_FLAG in all log entries
      storage/maria/maria_def.h:
        Added SHARE->max_index_block_size
        Added MARIA_PAGE->org_size
      storage/maria/trnman.c:
        Reset flags for new transaction.
      0f3d4b2f
  13. 12 Aug, 2010 1 commit
    • Michael Widenius's avatar
      Added option --start-from-checkpoint to maria_read_log · 6bbb0b57
      Michael Widenius authored
      Print out checked file names in maria_check -s (unless you use a second -s)
      Some trivial optimizations
      
      storage/maria/ma_bitmap.c:
        Trivial optimizations:
        - Combine common code (to be able to remove duplicate mutex_lock call)
        - Move setting of thread specific variables outside of mutex
      storage/maria/ma_check.c:
        Fixed wrong argument to printf
      storage/maria/maria_chk.c:
        Print out checked table names unless -s -s
      storage/maria/maria_read_log.c:
        Added option --start-from-checkpoint (to help find bugs in checkpoints)
      6bbb0b57
  14. 10 Aug, 2010 1 commit
    • Michael Widenius's avatar
      Fixed LP#605798 RQG: Table corruption after Maria engine recovery - "Wrong data in bitmap" · e6cf286b
      Michael Widenius authored
      maria_chk & maria_read_log now reads block size from control file.
      
      
      
      mysql-test/suite/maria/r/maria.result:
        Updated results after trivial change of maria_chk's output
      storage/maria/ma_bitmap.c:
        More DBUG_PRINT
      storage/maria/ma_blockrec.c:
        Fixed bug that we didn't mark page full in bitmap if directory is full
      storage/maria/ma_check.c:
        Write out if directory is full for errors in bitmap
      storage/maria/ma_control_file.c:
        Don't give error for wrong block size if block size is 0
      storage/maria/maria_chk.c:
        Read block size from control file
        In case of -dvv, write also out bitmap information (good for debugging)
      storage/maria/maria_read_log.c:
        Read block size from control file
        Fixed that maria_read_log works with different page size than TRANSLOG_PAGE_SIZE
      e6cf286b
  15. 07 Aug, 2010 1 commit
    • Michael Widenius's avatar
      This patch fixes LP#613408 Memory corruption with (M)aria storage engine and... · 0d3039d4
      Michael Widenius authored
      This patch fixes LP#613408  Memory corruption with (M)aria storage engine and virtual columns in MariaDB 5.2
      Fixed compiler warnings
      Disabled some tests that doesn't work on windows (uses shell tools or strange characters)
      
      
      
      client/mysqlshow.c:
        Fixed compiler warnings
      client/mysqlslap.c:
        Fixed compiler warnings
      mysql-test/mysql-test-run.pl:
        Use an error file instead of /dev/null
        (Fixes problem on Windows and the output may be usefull)
      mysql-test/suite/maria/r/maria.result:
        Test case for bug LP#613408 (not complete)
      mysql-test/suite/maria/t/maria.test:
        Test case for bug LP#613408 (not complete)
      mysql-test/suite/percona/percona_log_slow_slave_statements-and-use_global_long_query_time.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_log_slow_slave_statements.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-long_query_time.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test:
        This test doesn't work one windows (needs shell tools)
      mysql-test/t/ctype_filesystem.test:
        This test doesn't work one windows (problem with character sets)
      mysql-test/t/events_time_zone.test:
        Use longer times to get predictable tests
      mysql-test/t/show_check-master.opt:
        set long query time to get more predictable tests
      storage/maria/ma_check.c:
        Restore info->s->lock_key_trees after repair.
        Disable logging to temp tables for all repair cases (safety fix)
      storage/maria/ma_state.c:
        Ensurethat info->state_start doesn't point to freed memory. (Could happen after running an internal repair to fast create indexes)
      storage/maria/trnman.c:
        Added longer comment
      0d3039d4
  16. 30 Jul, 2010 1 commit
    • Michael Widenius's avatar
      Fix for LP#602604: RQG: ma_blockrec.c:6187:... · d2f8b7d0
      Michael Widenius authored
      Fix for LP#602604: RQG: ma_blockrec.c:6187: _ma_apply_redo_insert_row_head_or_tail: Assertion `0' failed on Maria engine recovery
      More DBUG_PRINT (to simplify future debugging)
      Aria: Added STATE_IN_REPAIR, which is set on start of repair. This allows us to see if 'crashed' flag was set intentionally.
      Aria: Some trivial speedup optimization
      Aria: Better warning if table was marked crashed by unfinnished repair
      
      
      mysql-test/lib/v1/mysql-test-run.pl:
        Fix so one can run RQG
      mysql-test/suite/maria/r/maria-recovery2.result:
        Update for new error message.
      mysys/stacktrace.c:
        Fixed compiler warning
      storage/maria/ha_maria.cc:
        More DBUG_PRINT
        Added STATE_IN_REPAIR flag, which is set on start of repair. This allows us to see if 'crashed' flag was set intentionally.
        Don't log query for dropping temporary table.
      storage/maria/ha_maria.h:
        Added prototype for drop_table()
      storage/maria/ma_blockrec.c:
        More DBUG_PRINT
        Make read_long_data() inline for most cases. (Trivial speedup optimization)
      storage/maria/ma_check.c:
        Better warning if table was marked crashed by unfinnished repair
      storage/maria/ma_open.c:
        More DBUG_PRINT
      storage/maria/ma_recovery.c:
        Give warning if found crashed table.
        Changed warning for tables that can't be opened.
      storage/maria/ma_recovery_util.c:
        Write warnings to DBUG file
      storage/maria/maria_chk.c:
        Added STATE_IN_REPAIR flag, which is set on start of repair. This allows us to see if 'crashed' flag was set intentionally.
      storage/maria/maria_def.h:
        Added maria_mark_in_repair(x)
      storage/maria/maria_read_log.c:
        Added option: --character-sets-dir
      storage/maria/trnman.c:
        By default set min_read_from to max value.
        This allows us to remove TRN:s from rows during recovery to get more space.
        This fixes bug LP#602604: RQG: ma_blockrec.c:6187: _ma_apply_redo_insert_row_head_or_tail: Assertion `0' failed on Maria engine recovery
      d2f8b7d0
  17. 16 Jul, 2010 1 commit
    • Michael Widenius's avatar
      mysql client: Ignore --comments at start of command line. This allows one to... · 9f96097a
      Michael Widenius authored
      mysql client: Ignore --comments at start of command line. This allows one to more easily run mysqltest tests trough the command line.
      Fixed bug: LP#603026 RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table  
      
      client/mysql.cc:
        Removed Oracle copyright from stdout, as Oracle doesn't have copyright to all code in this file.
        Ignore --comments at start of command line. This allows one to more easily run mysqltest tests trough the command line.
      mysql-test/suite/maria/r/optimize.result:
        Added test for LP#603026
      mysql-test/suite/maria/t/optimize.test:
        Added test for LP#603026
      sql/net_serv.cc:
        Removed DBUG_ASSERT(), as this code can happen during testing.
      storage/maria/ma_check.c:
        Fixed bug: LP#603026 RQG: pagecache_read: Assertion `pageno < ((1ULL) << 40)' on OPTIMIZE TABLE of a Maria table  
        The problem was duplicated memory usage with long packed keys.
      9f96097a
  18. 14 Jan, 2010 1 commit
    • Michael Widenius's avatar
      Fix for compiler warnings on windows · d121e663
      Michael Widenius authored
      Fix wrong cast of time()
      
      include/my_pthread.h:
        Safety fix that also removes compiler warnings
      sql/handler.h:
        Changed timestamp columns to be of type time_t
      storage/maria/ma_check.c:
        Removed wrong cast
      storage/maria/ma_create.c:
        Removed wrong cast
      storage/myisam/mi_check.c:
        Removed wrong cast
      storage/myisam/mi_create.c:
        Removed wrong cast
      storage/xtradb/handler/ha_innodb.cc:
        Removed compiler warning on windows
      d121e663
  19. 29 Nov, 2009 1 commit
    • Michael Widenius's avatar
      Remove compiler warnings (Including some warnings from -Wstrict-aliasing) · d13c5435
      Michael Widenius authored
      Don't use static link by default (in compile-pentium) as some new systems doesn't have all static libraries available
      Change type for functions in plugin.h:str_mysql_ftparser_param() to const unsigned char and string lengths to size_t.
      One effect of the above change is that one needs to include mysql_global.h or define size_t before including plugin.h
      This fixes a case where mysql_client_test failed with newer gcc that enables strict-aliasing by default
      
      
      BUILD/compile-pentium:
        Don't use static link by default as some new systems doesn't have all static libraries available
      client/mysql_upgrade.c:
        Remove not used variable
      cmd-line-utils/readline/config_readline.h:
        Define some constants to get rid of compiler warnings on Linux
      cmd-line-utils/readline/display.c:
        Get rid of compiler warnings
      cmd-line-utils/readline/history.c:
        Got rid of compiler warnings:
        - Defining some strings as const
        - Added cast
      cmd-line-utils/readline/rlmbutil.h:
        Added cast to get rid of compiler warnings
      cmd-line-utils/readline/text.c:
        Remove not needed initialization to get rid of compiler warnings
      cmd-line-utils/readline/xmalloc.c:
        Changed types to 'const char* to get rid of compiler warnings
      configure.in:
        Ensure that we use MariaDB as suffix
      include/mysql/plugin.h:
        Changed types to 'const unsigned char* to get rid of compiler warnings (in other parts of the code)
        Change length for not \0 terminated string to size_t
      include/mysql/plugin.h.pp:
        Update related to plugin.h
      libmysql/libmysql.c:
        Fixed bug that caused core dump with newer gcc when strict aliasing is not turned off
      mysql-test/t/information_schema.test:
        Test is depending on innodb
      mysql-test/t/not_partition.test:
        Fixed wrong directory name
        (Not noticed before as we don't ususally run this test)
      mysys/lf_hash.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      mysys/my_redel.c:
        Removed not used variable
      regex/engine.c:
        Changed types to 'const char* to get rid of compiler warnings
      regex/engine.ih:
        Changed types to 'const char* to get rid of compiler warnings
      sql/sp_head.cc:
        Got rid of compiler warning from -Wstrict-aliasing
      sql/sql_base.cc:
        Got rid of compiler warnings from -Wstrict-aliasing
        (The original code was probably wrong as nj_col->table_field was
      sql/sql_builtin.cc.in:
        plugin.h needs to have size_t defined
      sql/sql_parse.cc:
        Remove used variable
      sql/sql_select.cc:
        Got rid of compiler warnings from -Wstrict-aliasing
      sql/sql_show.cc:
        Added #ifdef to get rid of compiler warning when not using partition engine
      sql/table.cc:
        Got rid of compiler warning from -Wstrict-aliasing
      storage/maria/ha_maria.cc:
        Got rid of compiler warnings from -Wstrict-aliasing:
        - Use the thd_killed() API function
      storage/maria/lockman.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/maria/ma_check.c:
        Got rid of compiler warnings from -Wstrict-aliasing
        Change to use new version of _ma_killed_ptr; Don't call it as often as before
      storage/maria/ma_check_standalone.h:
        Update to compatible _ma_killed_ptr() from ha_maria.cc
      storage/maria/ma_ft_boolean_search.c:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/maria/ma_ft_nlq_search.c:
        Got rid of compiler warnings from -Wstrict-aliasing
        Ensure that 'subkeys' is 32 bit
      storage/maria/ma_ft_parser.c:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/maria/ma_ftdefs.h:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/maria/ma_sort.c:
        Change to use new version of _ma_killed_ptr; Don't call it as often as before
      storage/maria/ma_state.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/maria/maria_def.h:
        Redefine ma_killed_ptr()
      storage/maria/maria_ftdump.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/maria/trnman.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/myisam/ft_boolean_search.c:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/myisam/ft_nlq_search.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/myisam/ft_parser.c:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/myisam/ft_stopwords.c:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/myisam/ftdefs.h:
        Changed pointers from char -> const char* and length to size_t (to get rid of compiler warnings and casts)
      storage/myisam/ha_myisam.cc:
        Got rid of compiler warnings from -Wstrict-aliasing:
        - Use the thd_killed() API function
      storage/myisam/mi_check.c:
        Use new killed_ptr() function
      storage/myisam/myisam_ftdump.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/myisam/myisamchk.c:
        Update to compatible killed_ptr() from ha_myisam.cc
      storage/myisam/myisamdef.h:
        Redefine killed_ptr()
      storage/myisam/myisamlog.c:
        Got rid of compiler warnings from -Wstrict-aliasing
      storage/myisam/sort.c:
        Change to use new version of killed_ptr; Don't call it as often as before
      storage/xtradb/fil/fil0fil.c:
        Fixedc ompiler warning
      storage/xtradb/trx/trx0i_s.c:
        Include mysql_plugin.h later to ensure that size_t is defined
      d13c5435
  20. 06 May, 2009 1 commit
    • unknown's avatar
      We are now using Valgrind rather than purify, and have for quite some time. · b125770a
      unknown authored
      Consequently, rename HAVE_purify to HAVE_valgrind, and related changes.
      Leave some comments about purify when not clear that they apply also to Valgrind.
      Fix redundant IF_VALGRIND declaration.
      
      Misc. small fixes:
       - Fixes for pool-of-threads patch.
       - Fixes for push of PBXT storage engine.
       - mysql-test-run.pl fix.
       - Fix build problem in compile-pentium64-max.
      
      
      BUILD/SETUP.sh:
        Rename purify -> valgrind.
      BUILD/build_mccge.sh:
        Rename purify -> valgrind.
      BUILD/compile-dist:
        Fix that PBXT was missing in source tarball after `BUILD/compile-dist && make dist`
      BUILD/compile-pentium64-max:
        Fix a build problem with BUILD/compile-pentium64-max on CentOS/Fedora Core 10 amd64.
              
        On these systems, there is libz.so but no libz.a. Finding libz.so, ./configure decides
        to use system zlib. But since BUILD/compile-pentium64-max builds a fully static binary
        with -all-static, the link of mysqld fails due to missing libz.a.
              
        Fix by using bundled zlib in the build script.
      BUILD/compile-solaris-sparc-purify:
        Rename purify -> valgrind.
      include/m_string.h:
        Rename purify -> valgrind.
      include/my_global.h:
        Rename purify -> valgrind.
      mysql-test/Makefile.am:
        Fix that PBXT test suite was missing from `make dist` source tarball.
      mysql-test/lib/mtr_unique.pm:
        Better fix to avoid races when chmod'ing the semaphore file.
        (Though using chmod 666 shared files in /tmp/ is still not a very good solution).
      mysql-test/t/pool_of_threads.cnf:
        Fix that test case pool_of_threads fails if run on mysqld with no --with-libevent support.
      mysys/mf_qsort.c:
        Rename purify -> valgrind.
      mysys/my_alloc.c:
        Rename purify -> valgrind.
      mysys/my_init.c:
        Rename purify -> valgrind.
      mysys/my_rnd.c:
        Rename purify -> valgrind.
      mysys/safemalloc.c:
        Rename purify -> valgrind.
      scripts/mysql_config.pl.in:
        Rename purify -> valgrind.
      scripts/mysql_config.sh:
        Rename purify -> valgrind.
      sql/field_conv.cc:
        Rename purify -> valgrind.
      sql/filesort.cc:
        Rename purify -> valgrind.
      sql/ha_partition.cc:
        Rename purify -> valgrind.
      sql/hostname.cc:
        Rename purify -> valgrind.
      sql/item_timefunc.cc:
        Rename purify -> valgrind.
      sql/log_event.cc:
        Rename purify -> valgrind.
      sql/log_event_old.cc:
        Rename purify -> valgrind.
      sql/my_decimal.h:
        Rename purify -> valgrind.
      sql/mysqld.cc:
        Rename purify -> valgrind.
        Fix redundant IF_VALGRIND declaration.
      sql/opt_range.cc:
        Rename purify -> valgrind.
      sql/opt_range.h:
        Rename purify -> valgrind.
      sql/records.cc:
        Rename purify -> valgrind.
      sql/rpl_rli.cc:
        Rename purify -> valgrind.
      sql/rpl_rli.h:
        Rename purify -> valgrind.
      sql/set_var.cc:
        Fix missing static declaration on pool_of_threads.
      sql/slave.cc:
        Rename purify -> valgrind.
      sql/sql_base.cc:
        Rename purify -> valgrind.
      sql/sql_binlog.cc:
        Rename purify -> valgrind.
      sql/sql_class.cc:
        Rename purify -> valgrind.
      sql/sql_list.h:
        Rename purify -> valgrind.
      sql/sql_load.cc:
        Rename purify -> valgrind.
      sql/sql_select.cc:
        Rename purify -> valgrind.
      sql/table.cc:
        Rename purify -> valgrind.
      storage/archive/azio.c:
        Rename purify -> valgrind.
      storage/innobase/buf/buf0buf.c:
        Rename purify -> valgrind.
      storage/innobase/include/univ.i:
        Rename purify -> valgrind.
      storage/innobase/srv/srv0start.c:
        Rename purify -> valgrind.
      storage/maria/ha_maria.cc:
        Rename purify -> valgrind.
      storage/maria/ma_blockrec.c:
        Rename purify -> valgrind.
      storage/maria/ma_check.c:
        Rename purify -> valgrind.
      storage/maria/ma_loghandler.c:
        Rename purify -> valgrind.
      storage/maria/ma_packrec.c:
        Rename purify -> valgrind.
      storage/maria/ma_page.c:
        Rename purify -> valgrind.
      storage/maria/ma_pagecrc.c:
        Rename purify -> valgrind.
      storage/maria/ma_search.c:
        Rename purify -> valgrind.
      storage/myisam/mi_check.c:
        Rename purify -> valgrind.
      storage/myisam/mi_page.c:
        Rename purify -> valgrind.
      storage/myisam/mi_search.c:
        Rename purify -> valgrind.
      storage/myisammrg/ha_myisammrg.cc:
        Rename purify -> valgrind.
      strings/bcmp.c:
        Rename purify -> valgrind.
      strings/decimal.c:
        Rename purify -> valgrind.
      strings/strmake.c:
        Rename purify -> valgrind.
      b125770a
  21. 12 Feb, 2009 1 commit
  22. 09 Jan, 2009 1 commit
    • Michael Widenius's avatar
      Code cleanup: · 7eda7f13
      Michael Widenius authored
      - Removed not needed casts
      - Indentation fixes
      - Changed some buffer variables to uchar, to be able to remove casts
      
      
      storage/maria/ma_bitmap.c:
        Removed not needed casts
      storage/maria/ma_blockrec.c:
        Removed not needed casts
      storage/maria/ma_check.c:
        Removed not needed casts.
        Changed type of buffers to be able to remove casts
      storage/maria/ma_create.c:
        Removed not needed casts
      storage/maria/ma_delete.c:
        Removed not needed casts
      storage/maria/ma_dynrec.c:
        Removed not needed casts
      storage/maria/ma_extra.c:
        Removed not needed casts
      storage/maria/ma_ft_boolean_search.c:
        Removed not needed casts
      storage/maria/ma_ft_nlq_search.c:
        Removed not needed casts
      storage/maria/ma_ft_parser.c:
        Removed not needed casts
      storage/maria/ma_loghandler.c:
        Removed not needed casts
      storage/maria/ma_open.c:
        Removed not needed casts
      storage/maria/ma_packrec.c:
        Removed not needed casts
      storage/maria/ma_pagecache.c:
        Removed not needed casts
      storage/maria/ma_preload.c:
        Removed not needed casts
        Removed not needed initialization
      storage/maria/ma_rnext_same.c:
        Removed not needed casts
      storage/maria/ma_rt_index.c:
        Removed not needed casts
      storage/maria/ma_search.c:
        Removed not needed casts
      storage/maria/ma_sort.c:
        Removed not needed casts
        Removed not needed if
        Fixed indentation
      storage/maria/ma_statrec.c:
        Removed not needed casts
      storage/maria/ma_test2.c:
        Removed not needed casts
      storage/maria/ma_write.c:
        Removed not needed casts
        Indentation fixes
      storage/maria/maria_chk.c:
        Removed not needed casts
      storage/maria/maria_pack.c:
        Removed not needed casts
      7eda7f13
  23. 08 Jan, 2009 1 commit
  24. 27 Dec, 2008 1 commit
    • Michael Widenius's avatar
      Fixed bugs found by pushbuild · 910284e6
      Michael Widenius authored
      Added code to detect and give error when doing an insert into a view where we accessed fields in a not yet read table
      Disabled test in subselect.test as the CHECK_OPTION for views doesn't work for insert.
      This needs to be fixed properly later.
      
      The problem with views are described in Bug #41760 Inserting into multiple-table views is not working
      
      mysql-test/r/insert.result:
        Fixed wrong usage of insert into view.
      mysql-test/r/subselect.result:
        Disabled wrong test (temporary)
      mysql-test/suite/maria/r/maria.result:
        Added test of size of table
      mysql-test/suite/maria/t/maria.test:
        Added test of size of table
      mysql-test/t/insert.test:
        Fixed wrong usage of insert into view
        The bug is that during insert/update we currently don't read any of the referenced tables of the view.
        This means that we can't get a value from another table to use as part of the update.
      mysql-test/t/subselect.test:
        Disabled not working test until someone has time to fix insert into view properly
        Here we where refering to last used value in t2, which is wrong.
      sql/sql_insert.cc:
        Detect if we are trying to update one table in a view based on value in another, not yet read, table.
        This fixes the problem discovered in insert.test
      storage/maria/ma_blockrec.c:
        Don't ignore not critical changes to the last page in the table.
        We need to write the last page as otherwise we can during aborting of a row with a duplicate key get
        state.data_file_length and the real length of file out of sync
      storage/maria/ma_check.c:
        Flush the page cache even if we got an error during zerofill.
        (This fixes a call to assert() in case of a too short data file)
      storage/maria/ma_pagecache.c:
        Mark page as read when we do a write of a full page.
        This fixes a bug when we got an error during read and then used direct write to page to update it
      storage/maria/ma_state.c:
        Restore info->lock.type after call to maria_versioning.
        Fixed crash in maria_recover.test
      storage/maria/maria_read_log.c:
        Don't write thread id in debug log. (Not needed as maria_read_log is a single treaded program)
      910284e6
  25. 14 Oct, 2008 2 commits
    • Michael Widenius's avatar
      Merging of changes from myisam -> maria missing in last 5.1 - 5.1->maria merge · 32718418
      Michael Widenius authored
      MARIA_MAX_MSG_BUF -> HA_MAX_MSG_BUF
      
      include/maria.h:
        Remove MARIA_MAX_MSG_BUF; We are now using HA_MAX_MSG_BUF
        Added maria_test_invalid_symlink
      storage/maria/ha_maria.cc:
        MARIA_MAX_MSG_BUF -> HA_MAX_MSG_BUF
      storage/maria/ma_check.c:
        Removed tab in string constant
        Add extra argument to ma_open_datafile()
      storage/maria/ma_create.c:
        Set error number if table is in use
      storage/maria/ma_open.c:
        Added name argument to open functions for security check if filename is linked to another file in database directory
      storage/maria/ma_static.c:
        Default functions for checking if wrong symlink
      storage/maria/maria_chk.c:
        Add extra argument to _ma_open_datafile()
      storage/maria/maria_def.h:
        Add extra argument to _ma_open_datafile()
      32718418
    • Guilhem Bichot's avatar
      _ma_bitmap_unpin_all() needs to unpin not-locked pages which were pinned by other threads · 8ecda6cd
      Guilhem Bichot authored
      in write_changed_bitmap(), and page cache forbids that. Here we make the page
      cache more relaxed. Original patch by Sanja, simplified by me as limited to
      not-locked. See comment of ma_bitmap.c.
      With that, maria_stress.yy runs until hitting BUG 39665.
      
      storage/maria/ma_bitmap.c:
        A thread which unpins bitmap pages in _ma_bitmap_unpin_all() sometimes
        hit an assertion in the page cache (info!=0 in remove_pin()) which states
        that you can unpin/unlock only what *you* have pinned/locked.
        Fixed by setting the new last parameter of pagecache_unlock_by_link()
        to TRUE in _ma_bitmap_unpin_all().
      storage/maria/ma_blockrec.c:
        new prototype and splitting assertion in three (3rd one fires: BUG 39665)
      storage/maria/ma_check.c:
        new prototype
      storage/maria/ma_key_recover.c:
        new prototype
      storage/maria/ma_loghandler.c:
        new prototype
      storage/maria/ma_pagecache.c:
        Allow a thread to unpin, with pagecache_unlock_by_link(), a non-locked page pinned by others.
        This is a hack for _ma_bitmap_unpin_all() which needs to unpin pages which were
        pinned by other threads in write_changed_bitmap().
      storage/maria/ma_pagecache.h:
        new prototype
      storage/maria/ma_preload.c:
        new prototype
      storage/maria/unittest/ma_pagecache_rwconsist.c:
        new prototype
      storage/maria/unittest/ma_pagecache_single.c:
        new prototype
      8ecda6cd
  26. 01 Sep, 2008 1 commit
    • Michael Widenius's avatar
      Added MARIA_PAGE structure to keep all information about a maria key page. · d6bdf033
      Michael Widenius authored
      This allowed me to remove a lot of parameters to functions, local variables,
      duplicate code and identical constructs.  It should also make the code easier
      to read.
      Changed all marking of page as changed to use offset instead of pointers; This removed
      one theoretical problem where dynamic_array may have been moved between two calls.
      In addition I changed some functions from return my_bool
      
      
      include/maria.h:
        Changes to use MARIA_PAGE
      storage/maria/ma_check.c:
        Changes to use MARIA_PAGE
        Folded lines longer > 79 characters
      storage/maria/ma_delete.c:
        Changes to use MARIA_PAGE
        Changed _ma_ck_delete(), ma_log_delete(), ma_write_undo_key_delete() and _ma_ck_real_delete() to return type my_bool
        Removed some calls to maria_print_error() as the caller (maria_delete() and maria_write()) also prints the error
      storage/maria/ma_ft_update.c:
        Fix needed as _ma_ck_delete() now returns my_bool
        New parameter for ma_write_keypage.
      storage/maria/ma_key_recover.c:
        Changes to use MARIA_PAGE
      storage/maria/ma_key_recover.h:
        Updated function prototypes
      storage/maria/ma_page.c:
        Changes to use MARIA_PAGE
        Added _ma_page_setup() for old functions that doesn't (yet) use MARIA_PAGE natively
      storage/maria/ma_range.c:
        Changes to use MARIA_PAGE
      storage/maria/ma_rt_index.c:
        Changes to use MARIA_PAGE
        Changed maria_rtree_delete() and maria_rtree_real_delete() to return type my_bool
        Removed one 'if (node_flag) as this was always true
        Changed lable 'err1' to 'err' as there was no other error lables
        Moved allocation of page_buff outside of loop for fewer alloc/free calls
        Changed n_pages and m_pages to uint as 65000 pages is more than enough
      storage/maria/ma_rt_index.h:
        Updated function prototypes
      storage/maria/ma_rt_key.c:
        Changes to use MARIA_PAGE
      storage/maria/ma_rt_key.h:
        Updated function prototypes
      storage/maria/ma_rt_mbr.c:
        Changes to use MARIA_PAGE
      storage/maria/ma_rt_mbr.h:
        Updated function prototypes
      storage/maria/ma_rt_split.c:
        Changes to use MARIA_PAGE
      storage/maria/ma_search.c:
        Changes to use MARIA_PAGE
      storage/maria/ma_write.c:
        Changes to use MARIA_PAGE
        Changed _ma_ck_write_btree_with_log(), _ma_ck_real_write_btree(), ma_enlarge_root() to use return type my_bool
        Don't set *root to HA_OFFSET_ERROR in case of error
        Removed maria_print_error() calls as caller will do this
        Simplified logic in balance_page by introducing pointers to left and right pages
      storage/maria/maria_chk.c:
        Changes to use MARIA_PAGE
      storage/maria/maria_def.h:
        Changes to use MARIA_PAGE
        Removed some not used macros
        Added macros for MARIA_PAGE handling
      d6bdf033
  27. 25 Aug, 2008 1 commit
    • Michael Widenius's avatar
      Changed all file names in maria to LEX_STRING and removed some calls to strlen() · 1a5de5bc
      Michael Widenius authored
      Ensure that pagecache gives correct error number even if error for block happend
      
      
      mysys/my_pread.c:
        Indentation fix
      storage/maria/ha_maria.cc:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_check.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_checkpoint.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_create.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_dbug.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_delete.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_info.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_keycache.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_locking.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_loghandler.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_open.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_pagecache.c:
        Store error number for last failed operation in the page block
        This should fix some asserts() when errno was not properly set after failure to read block in another thread
      storage/maria/ma_recovery.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_update.c:
        filenames changed to be of type LEX_STRING
      storage/maria/ma_write.c:
        filenames changed to be of type LEX_STRING
      storage/maria/maria_def.h:
        filenames changed to be of type LEX_STRING
      storage/maria/maria_ftdump.c:
        filenames changed to be of type LEX_STRING
      storage/maria/maria_pack.c:
        filenames changed to be of type LEX_STRING
      1a5de5bc
  28. 10 Jul, 2008 1 commit
  29. 09 Jul, 2008 1 commit
    • Guilhem Bichot's avatar
      Fix for BUG#37876 "Importing Maria table from other server via binary copy does not work": · 60b88ce4
      Guilhem Bichot authored
      - after auto-zerofill (ha_maria::check_and_repair()) kepts its state's LSNs unchanged, which could
      be the same as the create_rename_lsn of another pre-existing table, which would break versioning as this LSN
      serves as unique identifier in the versioning code (in maria_open()). Even the state pieces which
      maria_zerofill() did change were lost (because they didn't go to disk).
      - after this fix, if two tables were auto-zerofilled at the same time (by _ma_mark_changed())
      they could receive the same create_rename_lsn, which would break versioning again. Fix is to write a log
      record each time a table is imported.
      - Print state's LSNs (create_rename_lsn, is_of_horizon, skip_redo_lsn) and UUID in maria_chk -dvv.
      
      mysql-test/r/maria-autozerofill.result:
        result
      mysql-test/t/maria-autozerofill.test:
        Test for auto-zerofilling
      storage/maria/ha_maria.cc:
        The state changes done by auto-zerofilling never reached disk.
      storage/maria/ma_check.c:
        When zerofilling a table, including its pages' LSNs, new state LSNs are needed next time the table
        is imported into a Maria instance.
      storage/maria/ma_create.c:
        Write LOGREC_IMPORTED_TABLE when importing a table. This is informative and ensures
        that the table gets a unique create_rename_lsn even though multiple tables
        are imported by concurrent threads (it advances the log's end LSN).
      storage/maria/ma_key_recover.c:
        comment
      storage/maria/ma_locking.c:
        instead of using translog_get_horizon() for state's LSNs of imported table,
        use the LSN of to-be-written LOGREC_IMPORTED_TABLE.
      storage/maria/ma_loghandler.c:
        New type of log record
      storage/maria/ma_loghandler.h:
        New type of log record
      storage/maria/ma_loghandler_lsn.h:
        New name for constant as can be used not only by maria_chk but auto-zerofill now too.
      storage/maria/ma_open.c:
        instead of using translog_get_horizon() for state's LSNs of imported table,
        use the LSN of to-be-written LOGREC_IMPORTED_TABLE.
      storage/maria/ma_recovery.c:
        print content of LOGREC_IMPORTED_TABLE in maria_read_log.
      storage/maria/maria_chk.c:
        print info about LSNs of the table's state, and UUID, when maria_chk -dvv
      storage/maria/maria_pack.c:
        new name for constant
      storage/maria/unittest/ma_test_recovery.pl:
        Now that maria_chk -dvv shows state LSNs and UUID those need to be filtered out,
        as maria_read_log -a does not use the same as at original run.
      60b88ce4
  30. 05 Jul, 2008 1 commit
    • Michael Widenius's avatar
      Bug#37276 maria crash on insert around the time check table is run · 82d79389
      Michael Widenius authored
      Fixed several (but not all) issues found by the test program:
      - ASSERT on row_length in ma_blockrec.c::_ma_compact_block_page()
      - Fixed bug when splitting node pages
      - Fixed hang in 'closeing tables' (conflicting mutex order) by ensuring we first take trnman lock and then share->intern_lock
      
      storage/maria/ma_blockrec.c:
        When compacting a row page when allocating space for a new row, the min length of a the new block may be temporarly smaller than 'min_block_length'.
      storage/maria/ma_check.c:
        More DBUG output
      storage/maria/ma_checkpoint.c:
        Call new function _ma_remove_not_visible_states_with_lock() to ensure we first take lock on trnman and then on share->intern_lock
        +
      storage/maria/ma_close.c:
        Added comment
      storage/maria/ma_open.c:
        Added comment
      storage/maria/ma_search.c:
        Copy also node data; Caused bug when splitting node pages
      storage/maria/ma_state.c:
        Added _ma_remove_not_visible_states_with_lock() to ensure we take locks in right order
      storage/maria/ma_state.h:
        Added new prototype
      storage/maria/trnman.c:
        Added trnman_lock() and trnman_unlock().
        Needed by _ma_remove_not_visible_states_with_lock() to get mutex in right order
      storage/maria/trnman_public.h:
        Added new prototypes
      82d79389
  31. 30 Jun, 2008 2 commits
  32. 28 Jun, 2008 1 commit
    • Michael Widenius's avatar
      Fix for Bug #36578 Maria: maria-recover may fail to autorepair a table · 9f589947
      Michael Widenius authored
      Fixed also some similar issues in MyISAM. This was not noticed before as MyISAM did a second retry without key cache (which just made the second repair attempty slower)
      
      storage/maria/ha_maria.cc:
        Print information if we retry without quick in case of CHECK TABLE table_name QUICK
        Remove T_QUICK flag when retrying repair, but set T_SAFE_REPAIR to ensure we don't loose any rows
        Remember T_RETRY_WITH_QUICK flag when restoring repair flags
        Don't print 'checking table' if we are not checking table in auto-repair
        Don't use T_QUICK in auto repair (safer)
        Changed parameter of type HA_PARAM &param to HA_PARAM *param
      storage/maria/ha_maria.h:
        Changed parameter of type HA_PARAM &param to HA_PARAM *param
      storage/maria/ma_check.c:
        Added retry without T_QUICK if there is a problem reading a row in BLOCK_RECORD
      storage/myisam/ha_myisam.cc:
        Remove T_QUICK flag when retrying repair, but set T_SAFE_REPAIR to ensure we don't loose any rows
        Remember T_RETRY_WITH_QUICK flag when restoring repair flags
      9f589947
  33. 26 Jun, 2008 2 commits
    • Guilhem Bichot's avatar
      Fixes for build errors under Windows and compiler warning under Linux · f0c53638
      Guilhem Bichot authored
      include/m_string.h:
        new macro like LINT_INIT but for struct. In m_string.h because bzero() becomes available only there
      storage/maria/ma_check.c:
        compiler error under Windows (declaration after statements...)
      storage/maria/ma_key.c:
        trnman.h is not in include/ but in storage/maria
      storage/maria/ma_sp_key.c:
        trnman.h is not in include/ but in storage/maria
      storage/maria/ma_write.c:
        avoid compiler warning (org_key.flag may be used uninitialized)
      f0c53638
    • Michael Widenius's avatar
      Added versioning of Maria index · 52cb0c24
      Michael Widenius authored
      Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file.
      Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned.
      Changed info->lastkey to type MARIA_KEY. Removed info->lastkey_length as this is now part of info->lastkey
      Renamed old info->lastkey to info->lastkey_buff
      Use exact key lenghts for keys, not USE_WHOLE_KEY
      For partial key searches, use SEARCH_PART_KEY
      When searching to insert new key on page, use SEARCH_INSERT to mark that key has rowid
      
      Changes done in a lot of files:
      - Modified functions to use MARIA_KEY instead of key pointer and key length
      - Use keyinfo->root_lock instead of share->key_root_lock[keynr]
      - Simplify code by using local variable keyinfo instead if share->keyinfo[i]
      - Added #fdef EXTERNAL_LOCKING around removed state elements
      - HA_MAX_KEY_BUFF -> MARIA_MAX_KEY_BUFF (to reserve space for transid)
      - Changed type of 'nextflag' to uint32 to ensure all SEARCH_xxx flags fits into it
      
      .bzrignore:
        Added missing temporary directory
      extra/Makefile.am:
        comp_err is now deleted on make distclean
      include/maria.h:
        Added structure MARIA_KEY, which is used for intern key objects in Maria.
        Changed functions to take MARIA_KEY as an argument instead of pointer to packed key.
        Changed some functions that always return true or false to my_bool.
        Added virtual function make_key() to avoid if in _ma_make_key()
        Moved rw_lock_t for locking trees from share->key_root_lock to MARIA_KEYDEF. This makes usage of the locks simpler and faster
      include/my_base.h:
        Added HA_RTREE_INDEX flag to mark rtree index. Used for easier checks in ma_check()
        Added SEARCH_INSERT to be used when inserting new keys
        Added SEARCH_PART_KEY for partial searches
        Added SEARCH_USER_KEY_HAS_TRANSID to be used when key we use for searching in btree has a TRANSID
        Added SEARCH_PAGE_KEY_HAS_TRANSID to be used when key we found in btree has a transid
      include/my_handler.h:
        Make next_flag 32 bit to make sure we can handle all SEARCH_ bits
      mysql-test/include/maria_empty_logs.inc:
        Read and restore current database; Don't assume we are using mysqltest.
        Don't log use databasename to log. Using this include should not cause any result changes.
      mysql-test/r/maria-gis-rtree-dynamic.result:
        Updated results after adding some check table commands to help pinpoint errors
      mysql-test/r/maria-mvcc.result:
        New tests
      mysql-test/r/maria-purge.result:
        New result after adding removal of logs
      mysql-test/r/maria-recovery-big.result:
        maria_empty_logs doesn't log 'use mysqltest' anymore
      mysql-test/r/maria-recovery-bitmap.result:
        maria_empty_logs doesn't log 'use mysqltest' anymore
      mysql-test/r/maria-recovery-rtree-ft.result:
        maria_empty_logs doesn't log 'use mysqltest' anymore
      mysql-test/r/maria-recovery.result:
        maria_empty_logs doesn't log 'use mysqltest' anymore
      mysql-test/r/maria.result:
        New tests
      mysql-test/r/variables-big.result:
        Don't log id as it's not predictable
      mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb_2.result:
        Updated results to new binlog results. (Test has not been run in a long time as it requires --big)
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2-master.opt:
        Moved file to ndb replication test directory
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb_2.test:
        Fixed wrong path to included tests
      mysql-test/t/maria-gis-rtree-dynamic.test:
        Added some check table commands to help pinpoint errors
      mysql-test/t/maria-mvcc.test:
        New tests
      mysql-test/t/maria-purge.test:
        Remove logs to make test results predictable
      mysql-test/t/maria.test:
        New tests for some possible problems
      mysql-test/t/variables-big.test:
        Don't log id as it's not predictable
      mysys/my_handler.c:
        Updated function comment to reflect old code
        Changed nextflag to be uint32 to ensure we can have flags > 16 bit
        Changed checking if we are in insert with NULL keys as next_flag can now include additional bits that have to be ignored.
        Added SEARCH_INSERT flag to be used when inserting new keys in btree. This flag tells us the that the keys includes row position and it's thus safe to remove SEARCH_FIND
        Added comparision of transid. This is only done if the keys actually have a transid, which is indicated by nextflag
      mysys/my_lock.c:
        Fixed wrong test (Found by Guilhem)
      scripts/Makefile.am:
        Ensure that test programs are deleted by make clean
      sql/rpl_rli.cc:
        Moved assignment order to fix compiler warning
      storage/heap/hp_write.c:
        Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys
      storage/maria/Makefile.am:
        Remove also maria log files when doing make distclean
      storage/maria/ha_maria.cc:
        Use 'file->start_state' as default state for transactional tables without versioning
        At table unlock, set file->state to point to live state. (Needed for information schema to pick up right number of rows)
        In ha_maria::implicit_commit() move all locked (ie open) tables to new transaction. This is needed to ensure ha_maria->info doesn't point to a deleted history event.
        Disable concurrent inserts for insert ... select and table changes with subqueries if statement based replication as this would cause wrong results on slave
      storage/maria/ma_blockrec.c:
        Updated comment
      storage/maria/ma_check.c:
        Compact key pages (removes transid) when doing --zerofill
        Check that 'page_flag' on key pages contains KEYPAGE_FLAG_HAS_TRANSID if there is a single key on the page with a transid
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Use new interface to _ma_rec_pos(), _ma_dpointer(), _ma_ft_del(), ma_update_state_lsn()
        Removed not needed argument from get_record_for_key()
        Fixed that we check doesn't give errors for RTREE; We now treath these like SPATIAL
        Remove some SPATIAL specific code where the virtual functions can handle this in a general manner
        Use info->lastkey_buff instead of info->lastkey
        _ma_dpos() -> _ma_row_pos_from_key()
        _ma_make_key() -> keyinfo->make_key()
        _ma_print_key() -> _ma_print_keydata()
        _ma_move_key() -> ma_copy_copy()
        Add SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys
        Ensure that data on page doesn't overwrite page checksum position
        Use DBUG_DUMP_KEY instead of DBUG_DUMP
        Use exact key lengths instead of USE_WHOLE_KEY to ha_key_cmp()
        Fixed check if rowid points outside of BLOCK_RECORD data file
        Use info->lastkey_buff instead of key on stack in some safe places
        Added #fdef EXTERNAL_LOCKING around removed state elements
      storage/maria/ma_close.c:
        Use keyinfo->root_lock instead of share->key_root_lock[keynr]
      storage/maria/ma_create.c:
        Removed assert that is already checked in maria_init()
        Force transactinal tables to be of type BLOCK_RECORD
        Fixed wrong usage of HA_PACK_RECORD (should be HA_OPTION_PACK_RECORD)
        Mark keys that uses HA_KEY_ALG_RTREE with HA_RTREE_INDEX for easier handling of these in ma_check
        Store max_trid in index file as state.create_trid. This is used to pack all transids in the index pages relative to max possible transid for file.
      storage/maria/ma_dbug.c:
        Changed _ma_print_key() to use MARIA_KEY
      storage/maria/ma_delete.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        info->lastkey2-> info->lastkey_buff2
        Added SEARCH_INSERT to signal ha_key_cmp that we we should also compare rowid for keys
        Use new interface for get_key(), _ma_get_last_key() and others
        _ma_dpos() -> ma_row_pos_from_key()
        Simplify setting of prev_key in del()
        Ensure that KEYPAGE_FLAG_HAS_TRANSID is set in page_flag if key page has transid
        Treath key pages that may have a transid as if keys would be of variable length
      storage/maria/ma_delete_all.c:
        Reset history state if maria_delete_all_rows() are called
        Update parameters to _ma_update_state_lsns() call
      storage/maria/ma_extra.c:
        Store and restore info->lastkey
      storage/maria/ma_ft_boolean_search.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_ft_nlq_search.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Use lastkey_buff2 instead of info->lastkey+info->s->base.max_key_length (same thing)
      storage/maria/ma_ft_update.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_ftdefs.h:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_fulltext.h:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_init.c:
        Check if blocksize is legal
        (Moved test here from ma_open())
      storage/maria/ma_key.c:
        Added functions for storing/reading of transid 
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Moved _ma_sp_make_key() out of _ma_make_key() as we now use keyinfo->make_key to create keys
        Add transid to keys if table is versioned
        Added _ma_copy_key()
      storage/maria/ma_key_recover.c:
        Add logging of page_flag (holds information if there are keys with transid on page)
        Changed DBUG_PRINT("info" -> DBUG_PRINT("redo" as the redo logging can be quite extensive
        Added lots of DBUG_PRINT()
        Added support for index page operations: KEY_OP_SET_PAGEFLAG and KEY_OP_COMPACT_PAGE
      storage/maria/ma_key_recover.h:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_locking.c:
        Added new arguments to _ma_update_state_lsns_sub()
      storage/maria/ma_loghandler.c:
        Fixed all logging of LSN to look similar in DBUG log
        Changed if (left != 0) to if (left) as the later is used also later in the code
      storage/maria/ma_loghandler.h:
        Added new index page operations
      storage/maria/ma_open.c:
        Removed allocated "state_dummy" and instead use share->state.common for transactional tables that are not versioned
        This is needed to not get double increments of state.records (one in ma_write.c and on when log is written)
        Changed info->lastkey to MARIA_KEY type
        Removed resetting of MARIA_HA variables that have 0 as default value (as info is zerofilled)
        Enable versioning for transactional tables with index. Tables with an auto-increment key, rtree or fulltext keys are not versioned.
        Check on open that state.create_trid is correct
        Extend share->base.max_key_length in case of transactional table so that it can hold transid
        Removed 4.0 compatible fulltext key mode as this is not relevant for Maria
        Removed old and wrong #ifdef ENABLE_WHEN_WE_HAVE_TRANS_ROW_ID code block
        Initialize all new virtual function pointers
        Removed storing of state->unique, state->process and store state->create_trid instead
      storage/maria/ma_page.c:
        Added comment to describe key page structure
        Added functions to compact key page and log the compact operation
      storage/maria/ma_range.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Use SEARCH_PART_KEY indicator instead of USE_WHOLE_KEY to detect if we are doing a part key search
        Added handling of pages with transid
      storage/maria/ma_recovery.c:
        Don't assert if table we opened are not transactional. This may be a table which has been changed from transactional to not transactinal
        Added new arguments to _ma_update_state_lsns()
      storage/maria/ma_rename.c:
        Added new arguments to _ma_update_state_lsns()
      storage/maria/ma_rkey.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Don't use USE_WHOLE_KEY, use real length of key
        Use share->row_is_visible() to test if row is visible
        Moved search_flag == HA_READ_KEY_EXACT out of 'read-next-row' loop as this only need to be tested once
        Removed test if last_used_keyseg != 0 as this is always true
      storage/maria/ma_rnext.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Simplify code by using local variable keyinfo instead if share->keyinfo[i]
        Use share->row_is_visible() to test if row is visible
      storage/maria/ma_rnext_same.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        lastkey2 -> lastkey_buff2
      storage/maria/ma_rprev.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Simplify code by using local variable keyinfo instead if share->keyinfo[i]
        Use share->row_is_visible() to test if row is visible
      storage/maria/ma_rsame.c:
        Updated comment
        Simplify code by using local variable keyinfo instead if share->keyinfo[i]
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_rsamepos.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_rt_index.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Use better variable names
        Removed not needed casts
        _ma_dpos() -> _ma_row_pos_from_key()
        Use info->last_rtree_keypos to save position to key instead of info->int_keypos
        Simplify err: condition
        Changed return type for maria_rtree_insert() to my_bool as we are only intressed in ok/fail from this function
      storage/maria/ma_rt_index.h:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_rt_key.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Simplify maria_rtree_add_key by combining idenitcal code and removing added_len
      storage/maria/ma_rt_key.h:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_rt_mbr.c:
        Changed type of 'nextflag' to uint32
        Added 'to' argument to RT_PAGE_MBR_XXX functions to more clearly see which variables changes value
      storage/maria/ma_rt_mbr.h:
        Changed type of 'nextflag' to uint32
      storage/maria/ma_rt_split.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        key_length -> key_data_length to catch possible errors
      storage/maria/ma_rt_test.c:
        Fixed wrong comment
        Reset recinfo to avoid valgrind varnings
        Fixed wrong argument to create_record() that caused test to fail
      storage/maria/ma_search.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Added support of keys with optional trid
        Test for SEARCH_PART_KEY instead of USE_WHOLE_KEY to detect part key reads
        _ma_dpos() -> _ma_row_pos_from_key()
        If there may be keys with transid on the page, have _ma_bin_search() call _ma_seq_search()
        Add _ma_skip_xxx() functions to quickly step over keys (faster than calling get_key() in most cases as we don't have to copy key data)
        Combine similar code at end of _ma_get_binary_pack_key()
        Removed not used function _ma_move_key()
        In _ma_search_next() don't call _ma_search() if we aren't on a nod page.
        Update info->cur_row.trid with trid for found key
        
        
        
        Removed some not needed casts
        Added _ma_trid_from_key()
        Use MARIA_SHARE instead of MARIA_HA as arguments to _ma_rec_pos(), _ma_dpointer() and _ma_xxx_keypos_to_recpos() to make functions faster and smaller
      storage/maria/ma_sort.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_sp_defs.h:
        _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value
      storage/maria/ma_sp_key.c:
        _ma_sp_make_key() now fills in and returns (MARIA_KEY *) value
        Don't test sizeof(double), test against 8 as we are using float8store()
        Use mi_float8store() instead of doing swap of value (same thing but faster)
      storage/maria/ma_state.c:
        maria_versioning() now only calls _ma_block_get_status() if table supports versioning
        Added _ma_row_visible_xxx() functions for different occasions
        When emptying history, set info->state to point to the first history event.
      storage/maria/ma_state.h:
        Added _ma_row_visible_xxx() prototypes
      storage/maria/ma_static.c:
        Indentation changes
      storage/maria/ma_statrec.c:
        Fixed arguments to _ma_dpointer() and _ma_rec_pos()
      storage/maria/ma_test1.c:
        Call init_thr_lock() if we have versioning
      storage/maria/ma_test2.c:
        Call init_thr_lock() if we have versioning
      storage/maria/ma_unique.c:
        Modified functions to use MARIA_KEY
      storage/maria/ma_update.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
      storage/maria/ma_write.c:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Simplify code by using local variable keyinfo instead if share->keyinfo[i]
        In _ma_enlarge_root(), mark in page_flag if new key has transid
        _ma_dpos() -> _ma_row_pos_from_key()
        Changed return type of _ma_ck_write_tree() to my_bool as we are only testing if result is true or not
        Moved 'reversed' to outside block as area was used later
      storage/maria/maria_chk.c:
        Added error if trying to sort with HA_BINARY_PACK_KEY
        Use new interface to get_key() and _ma_dpointer()
        _ma_dpos() -> _ma_row_pos_from_key()
      storage/maria/maria_def.h:
        Modified functions to use MARIA_KEY instead of key pointer and key length
        Added 'common' to MARIA_SHARE->state for storing state for transactional tables without versioning
        Added create_trid to MARIA_SHARE
        Removed not used state variables 'process' and 'unique'
        Added defines for handling TRID's in index pages
        Changed to use MARIA_SHARE instead of MARIA_HA for some functions
        Added 'have_versioning' flag if table supports versioning
        Moved key_root_lock from MARIA_SHARE to MARIA_KEYDEF
        Changed last_key to be of type MARIA_KEY. Removed lastkey_length
        lastkey -> lastkey_buff, lastkey2 -> lastkey_buff2
        Added _ma_get_used_and_nod_with_flag() for faster access to page data when page_flag is read
        Added DBUG_DUMP_KEY for easier DBUG_DUMP of a key
        Changed 'nextflag' and assocaited variables to uint32
      storage/maria/maria_ftdump.c:
        lastkey -> lastkey_buff
      storage/maria/trnman.c:
        Fixed wrong initialization of min_read_from and max_commit_trid
        Added trnman_get_min_safe_trid()
      storage/maria/unittest/ma_test_all-t:
        Added --start-from
      storage/myisam/mi_check.c:
        Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order
      storage/myisam/mi_delete.c:
        Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order
      storage/myisam/mi_range.c:
        Updated comment
      storage/myisam/mi_write.c:
        Added SEARCH_INSERT, as ha_key_cmp() needs it when doing key comparision for inserting key on page in rowid order
      storage/myisam/rt_index.c:
        Fixed wrong parameter to rtree_get_req() which could cause crash
      52cb0c24
  34. 29 May, 2008 1 commit
    • unknown's avatar
      WL#3138: Maria - fast "SELECT COUNT(*) FROM t;" and "CHECKSUM TABLE t" · 5099033c
      unknown authored
      Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation
      Fixed wrong call to strmake
      Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert
      Allow storing year 2155 in year field
      When running with purify/valgrind avoid copying structures over themself
      Added hook 'trnnam_end_trans_hook' that is called when transaction ends
      Added trn->used_tables that is used to an entry for all tables used by transaction
      Fixed that ndb doesn't crash on duplicate key error when start_bulk_insert/end_bulk_insert are not called
      
      
      include/maria.h:
        Added argument to maria_end_bulk_insert() to know if the table will be deleted after the operation
      include/my_tree.h:
        Added macro 'reset_free_element()' to be able to ignore calls to the external free function.
        Is used to optimize end-bulk-insert in case of failures, in which case we don't want write the remaining keys in the tree
      mysql-test/install_test_db.sh:
        Upgrade to new mysql_install_db options
      mysql-test/r/maria-mvcc.result:
        New tests
      mysql-test/r/maria.result:
        New tests
      mysql-test/suite/ndb/r/ndb_auto_increment.result:
        Fixed error message now when bulk insert is not always called
      mysql-test/suite/ndb/t/ndb_auto_increment.test:
        Fixed error message now when bulk insert is not always called
      mysql-test/t/maria-mvcc.test:
        Added testing of versioning of count(*)
      mysql-test/t/maria-page-checksum.test:
        Added comment
      mysql-test/t/maria.test:
        More tests
      mysys/hash.c:
        Code style change
      sql/field.cc:
        Allow storing year 2155 in year field
      sql/ha_ndbcluster.cc:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/ha_ndbcluster.h:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/ha_partition.cc:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/ha_partition.h:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored
      sql/handler.cc:
        Don't call get_dup_key() if there is no table object. This can happen if the handler generates a duplicate key error on commit
      sql/handler.h:
        Added new argument to end_bulk_insert() to signal if the bulk insert should ignored (ie, the table will be deleted)
      sql/item.cc:
        Style fix
        Removed compiler warning
      sql/log_event.cc:
        Added new argument to ha_end_bulk_insert()
      sql/log_event_old.cc:
        Added new argument to ha_end_bulk_insert()
      sql/mysqld.cc:
        Removed compiler warning
      sql/protocol.cc:
        Added DBUG
      sql/sql_class.cc:
        Added DBUG
        Fixed wrong call to strmake
      sql/sql_insert.cc:
        Don't call bulk insert in case of inserting only one row (speed optimization as starting/stopping bulk insert involves a lot of if's)
        Added new argument to ha_end_bulk_insert()
      sql/sql_load.cc:
        Added new argument to ha_end_bulk_insert()
      sql/sql_parse.cc:
        Style fixes
        Avoid goto in common senario
      sql/sql_select.cc:
        When running with purify/valgrind avoid copying structures over themself.  This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings
      sql/sql_select.h:
        Avoid copying structures over themself.  This is not a real bug in itself, but it's a waste of cycles and causes valgrind warnings
      sql/sql_table.cc:
        Call HA_EXTRA_PREPARE_FOR_DROP if table created by ALTER TABLE is going to be dropped
        Added new argument to ha_end_bulk_insert()
      storage/archive/ha_archive.cc:
        Added new argument to end_bulk_insert()
      storage/archive/ha_archive.h:
        Added new argument to end_bulk_insert()
      storage/federated/ha_federated.cc:
        Added new argument to end_bulk_insert()
      storage/federated/ha_federated.h:
        Added new argument to end_bulk_insert()
      storage/maria/Makefile.am:
        Added ma_state.c and ma_state.h
      storage/maria/ha_maria.cc:
        Versioning of count(*) and checksum
        - share->state.state is now assumed to be correct, not handler->state
        - Call _ma_setup_live_state() in external lock to get count(*)/checksum versioning. In case of
          not versioned and not concurrent insertable table, file->s->state.state contains the correct state information
        
        Other things:
        - file->s -> share
        - Added DBUG_ASSERT() for unlikely case
        - Optimized end_bulk_insert() to not write anything if table is going to be deleted (as in failed alter table)
        - Indentation changes in external_lock becasue of removed 'goto' caused a big conflict even if very little was changed
      storage/maria/ha_maria.h:
        New argument to end_bulk_insert()
      storage/maria/ma_blockrec.c:
        Update for versioning of count(*) and checksum
        Keep share->state.state.data_file_length up to date (not info->state->data_file_length)
        Moved _ma_block_xxxx_status() and maria_versioning() functions to ma_state.c
      storage/maria/ma_check.c:
        Update and use share->state.state instead of info->state
        info->s to share
        Update info->state at end of repair
        Call _ma_reset_state() to update share->state_history at end of repair
      storage/maria/ma_checkpoint.c:
        Call _ma_remove_not_visible_states() on checkpoint to clean up not visible state history from tables
      storage/maria/ma_close.c:
        Remember state history for running transaction even if table is closed
      storage/maria/ma_commit.c:
        Ensure we always call trnman_commit_trn() even if other calls fails. If we don't do that, the translog and state structures will not be freed
      storage/maria/ma_delete.c:
        Versioning of count(*) and checksum:
        - Always update info->state->checksum and info->state->records
      storage/maria/ma_delete_all.c:
        Versioning of count(*) and checksum:
        - Ensure that share->state.state is updated, as here is where we store the primary information
      storage/maria/ma_dynrec.c:
        Use lock_key_trees instead of concurrent_insert to check if trees should be locked.
        This allows us to lock trees both for concurrent_insert and for index versioning.
      storage/maria/ma_extra.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        - share->concurrent_insert -> share->non_transactional_concurrent_insert
        - Don't update share->state.state from info->state if transactional table
        
        Optimization:
        - Don't flush io_cache or bitmap if we are using FLUSH_IGNORE_CHANGED
      storage/maria/ma_info.c:
        Get most state information from current state
      storage/maria/ma_init.c:
        Add hash table and free function to store states for closed tables
        Install hook for transaction commit/rollback to update history state
      storage/maria/ma_key_recover.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
      storage/maria/ma_locking.c:
        Versioning of count(*) and checksum:
        - Call virtual functions (if exists) to restore/update status
        - Move _ma_xxx_status() functions to ma_state.c
        
        info->s -> share
      storage/maria/ma_open.c:
        Versioning of count(*) and checksum:
        - For not transactional tables, set info->state to point to new allocated state structure.
        - Initialize new info->state_start variable that points to state at start of transaction
        - Copy old history states from hash table (maria_stored_states) first time the table is opened
        - Split flag share->concurrent_insert to non_transactional_concurrent_insert & lock_key_tree
        - For now, only enable versioning of tables without keys (to be fixed in soon!)
        - Added new virtual function to restore status in maria_lock_database)
        
        More DBUG
      storage/maria/ma_page.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        - Modify share->state.state.key_file_length under share->intern_lock
      storage/maria/ma_range.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
        
        info->s -> share
      storage/maria/ma_recovery.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        - Update state information on close and when reenabling logging
      storage/maria/ma_rkey.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_rnext.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_rnext_same.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
        - Only skip rows based on file length if non_transactional_concurrent_insert is set
      storage/maria/ma_rprev.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_rsame.c:
        Versioning of count(*) and checksum:
        - Lock trees based on share->lock_key_trees
      storage/maria/ma_sort.c:
        Use share->state.state instead of info->state
        Fixed indentation
      storage/maria/ma_static.c:
        Added maria_stored_state
      storage/maria/ma_update.c:
        Versioning of count(*) and checksum:
        - Always update info->state->checksum and info->state->records
        - Remove optimization for index file update as it doesn't work for transactional tables
      storage/maria/ma_write.c:
        Versioning of count(*) and checksum:
        - Always update info->state->checksum and info->state->records
      storage/maria/maria_def.h:
        Move MARIA_STATUS_INFO to ma_state.h
        
        Changes to MARIA_SHARE:
        - Added state_history to store count(*)/checksum states
        - Added in_trans as counter if table is used by running transactions
        - Split concurrent_insert into lock_key_trees and on_transactional_concurrent_insert.
        - Added virtual function lock_restore_status
        
        Changes to MARIA_HA:
        - save_state -> state_save
        - Added state_start to store state at start of transaction
      storage/maria/maria_pack.c:
        Versioning of count(*) and checksum:
        - Use share->state.state instead of info->state
        
        Indentation fixes
      storage/maria/trnman.c:
        Added hook 'trnnam_end_trans_hook' that is called when transaction ends
        Added trn->used_tables that is used to an entry for all tables used by transaction
        More DBUG
        Changed return type of trnman_end_trn() to my_bool
        Added trnman_get_min_trid() to get minimum trid in use.
        Added trnman_exists_active_transactions() to check if there exist a running transaction started between two commit id
      storage/maria/trnman.h:
        Added 'used_tables'
        Moved all pointers into same groups to get better memory alignment
      storage/maria/trnman_public.h:
        Added prototypes for new functions and variables
        Chagned return type of trnman_end_trn() to my_bool
      storage/myisam/ha_myisam.cc:
        Added argument to end_bulk_insert() if operation should be aborted
      storage/myisam/ha_myisam.h:
        Added argument to end_bulk_insert() if operation should be aborted
      storage/maria/ma_state.c:
        Functions to handle state of count(*) and checksum
      storage/maria/ma_state.h:
        Structures and declarations to handle state of count(*) and checksum
      5099033c
  35. 24 Apr, 2008 1 commit
    • unknown's avatar
      WL#3072 - Maria Recovery · c9a82581
      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.
      c9a82581
  36. 10 Apr, 2008 1 commit
    • unknown's avatar
      Added versioning of row data · 126c1228
      unknown authored
      Will in future changeset (soon) av versioning of status variables (number of rows) and index
      Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings
      Removed some not needed variables (as noticed by Guilhem)
      
      
      include/maria.h:
        Added prototypes for maria_chk_init_for_check(), maria_versioning() and maria_ignore_trids()
      include/my_base.h:
        Add new error HA_ERR_ROW_NOT_VISIBLE
      include/myisamchk.h:
        Added variables for checking visibility of rows during maria_chk
      include/thr_lock.h:
        Changed argument type from int to my_bool for get_status
        Added variable allow_multiple_concurrent_insert, to signal if table supports multiple concurrent inserts
      mysql-test/r/maria-page-checksum.result:
        Added missing drop table
      mysql-test/t/maria-page-checksum.test:
        Added missing drop table
      mysys/my_handler.c:
        Added new error messages
      mysys/thr_lock.c:
        Added support for multiple concurrent inserts, if table handler supports it
      sql/sql_yacc.yy:
        Added LOCK TABLE table_name WRITE CONCURRENT
        This was added (temporarly?) to be able to check versioning with Maria
      storage/csv/ha_tina.cc:
        Updated parameter for get_status
      storage/maria/ha_maria.cc:
        Added calls to maria_chk_init_status()
        Fixed call to ma_control_file_open()
      storage/maria/ma_blockrec.c:
        Changed some LEX_STRING to LEX_CUSTRING to avoid casts and warnings
        Changed back some 'header' parameters to const char*
        Removed some casts
        
        Added support for versioning:
        - If info->row_flag & ROW_FLAG_TRANSID is set, store transaction id together with the row
        - When reading rows, check if rows are visible. Give error if not
        - When scanning table, ignore not visible rows
        - Added function parameters to some functions, to be able to call _ma_compact_block_page() with different parameters depending of if the page is a HEAD or TAIL page
        - _ma_compact_block_page() deletes transaction id's that are visible by all running transactions
        - Added functions for thr_lock() to enable multiple concurrent inserts
        - Added helper function 'mysql_versioning()' to enable/disable versioning
        - Added helper function maria_ignore_trids(), used by maria_chk and maria_pack to see all rows.
      storage/maria/ma_blockrec.h:
        Updated parameters for some functions.
        Added new functions to read/store state with thr_lock
      storage/maria/ma_check.c:
        Enable handling of transaction id's in rows
        Give a readable error if a table contains a transation id that makes rows not visible
      storage/maria/ma_control_file.c:
        Added option to not give warning if control file doesn't exists.
      storage/maria/ma_control_file.h:
        Updated parameter lists for ma_control_file_open()
      storage/maria/ma_delete.c:
        Removed not used variable (suggestion by Guilhem)
      storage/maria/ma_locking.c:
        Changed type of argument from int -> my_bool
      storage/maria/ma_open.c:
        Removed not used variables 'key_write_undo_lsn' and 'key_delete_undo_lsn'
        Added new thr_lock interface functions for BLOCK_RECORD to enable multiple concurrent insert
      storage/maria/ma_test1.c:
        Added option --versioning (-C) to check versioning
      storage/maria/ma_test2.c:
        Added option -C to check versioning
      storage/maria/ma_test_recovery:
        Forward argumetns to ma_test_recovery.pl
      storage/maria/ma_write.c:
        Removed not used variable key_write_undo_lsn
      storage/maria/maria_chk.c:
        Always read control file (if exist) at start
        Initialize checking of tables by calling maria_chk_init_for_check()
        In verbose mode and in case of error, print max found transaction id
      storage/maria/maria_def.h:
        Added Trid to MARIA_ROW to be able to check transaction id for found row
        Moved 'base_length' from MARIA_ROW to MARIA_HA to be able to handle different base length (with and without TRANSID) without if's
        Added default row_flag to MARIA_HA for the same reason
        Changed LEX_STRING -> LEX_CUSTRING to avoid casts in ma_blockrec.c
        Removed not needed variables key_write_undo_lsn and key_delete_undo_lsn
        Added prototypes for new functions and fixed those that had changed
      storage/maria/maria_pack.c:
        Ensure we can read all rows from the file, independent of the used transaction id
      storage/maria/maria_read_log.c:
        Updated arguments to ma_control_file_open()
      storage/maria/trnman.c:
        If we have only one transaction, fixed that min_read_from contains current transaction
        Fixed that trnman_can_read_from() returns that row is readable if it was written by current transaction
      storage/maria/unittest/ma_control_file-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_all-t:
        Added test of versioning
        Removed printing of one extra space
      storage/maria/unittest/ma_test_loghandler-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_nologs-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        Updated arguments to ma_control_file_open()
      storage/maria/unittest/ma_test_recovery.expected:
        Updated file with result from new tests
      storage/maria/unittest/ma_test_recovery.pl:
        Added options --abort-on-error and --verbose
        In case of --verbose, print all excuted shell commands
        Added test of versioning
      storage/myisam/mi_locking.c:
        Updated type of parameter
      storage/myisam/myisamdef.h:
        Updated type of parameter
      mysql-test/r/maria-mvcc.result:
        New BitKeeper file ``mysql-test/r/maria-mvcc.result''
      mysql-test/t/maria-mvcc.test:
        New BitKeeper file ``mysql-test/t/maria-mvcc.test''
      126c1228
  37. 04 Apr, 2008 1 commit
    • unknown's avatar
      Store maximum transaction id into control file at clean shutdown. · 722a8ebe
      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
      722a8ebe