1. 10 Oct, 2007 1 commit
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 282087da
      unknown authored
      into  mysql.com:/home/my/mysql-maria
      
      
      client/mysqladmin.cc:
        Auto merged
      include/maria.h:
        Auto merged
      include/my_sys.h:
        Auto merged
      include/mysql_com.h:
        Auto merged
      mysql-test/r/maria.result:
        Auto merged
      server-tools/instance-manager/listener.cc:
        Auto merged
      sql/handler.h:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_strfunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_show.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      storage/maria/ma_bitmap.c:
        Auto merged
      storage/maria/ma_blockrec.c:
        Auto merged
      storage/maria/ma_blockrec.h:
        Auto merged
      storage/maria/ma_check.c:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_delete.c:
        Auto merged
      storage/maria/ma_loghandler.h:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_search.c:
        Auto merged
      storage/maria/ma_sort.c:
        Auto merged
      storage/maria/ma_test2.c:
        Auto merged
      storage/maria/ma_test_recovery.expected:
        Auto merged
      storage/maria/ma_write.c:
        Auto merged
      storage/maria/maria_chk.c:
        Auto merged
      storage/maria/maria_pack.c:
        Auto merged
      include/my_base.h:
        Trivial manual merge
      libmysql/Makefile.shared:
        Trivial manual merge
      sql/sql_yacc.yy:
        Manual merge
      storage/maria/ha_maria.cc:
        Trivial manual merge
      storage/maria/ma_page.c:
        Trivial manual merge
      storage/maria/maria_def.h:
        Trivial manual merge
      282087da
  2. 09 Oct, 2007 3 commits
    • unknown's avatar
      Moved randomize and my_rnd under mysys · baad15ae
      unknown authored
      Added my_uuid
      Added pre-support for PAGE_CHECKSUM
      Added syntax for CREATE ... PAGE_CHECKSUM=# TABLE_CHECKSUM=#
      Reserved place for page checksums on index, bitmap and block pages
      Added index number to header of index pages
      Added linked list for free directory entries (speeds up inserts with BLOCK format)
      Calculate checksums in original column order (fixes bug with checksum on rows with BLOCK format)
      Cleaned up all index handling to use 'info->s->keypage_header' (variable size) as the header for index pages (before this was '2')
      Added 0xffffffff to end of index and block data bases and 0xfffffffe at end of bitmap pages when page checksums are not enabled
      Added _ma_get_page_used() and _ma_get_used_and_node() to simplify index page header handling
      rec_per_key_part is now in double precision
      Reserved place in index file for my_guid and nulls_per_key_part
      Give error HA_ERR_NEW_FILE if trying to open a Maria file with new, not yet supported extensions
      
      Lots of renames to increase readability:
      
      randomize() -> my_rnd_init()
      st_maria_info -> st_maria_handler
      st_maria_info -> MARIA_HA
      st_maria_isaminfo -> st_maria_info
      rand_struct -> my_rand_struct
      rec_per_key_rows -> records_at_analyze
      
      
      client/mysqladmin.cc:
        rand_struct -> my_rrnd_struct
      include/maria.h:
        st_maria_info -> MARIA_HA
        st_maria_isaminfo -> st_maria_info
        Changed analyze statistics to be of double precission
        Changed offset to field to be 32bits instead of 64 (safe as a record without blobs can't be that big)
      include/my_base.h:
        Added HA_OPTION_PAGE_CHECKSUM & HA_CREATE_PAGE_CHECKSUM
        Fixed comments
        Added HA_ERR_NEW_FILE
      include/my_sys.h:
        Added prototypes and structures for my_uuid() and my_rnd()
      include/myisamchk.h:
        Changed some buffers to size_t
        Added possibility to have key statistics with double precission
      include/mysql_com.h:
        Move rand functions to mysys
      libmysql/Makefile.shared:
        Added my_rnd
      mysql-test/r/maria.result:
        Updated results
      mysql-test/t/maria.test:
        More tests for checksum
      mysys/Makefile.am:
        Added my_rnd.c and my_uuid.c
      server-tools/instance-manager/listener.cc:
        Fixed include order (my_global.h should always be first)
      server-tools/instance-manager/mysql_connection.cc:
        Fixed include order (my_global.h should always be first)
        Use my_rnd_init()
      server-tools/instance-manager/mysql_connection.h:
        rand_struct -> my_rand_struct
      sql/handler.h:
        Added flag for page checksums
      sql/item_func.cc:
        Use new my_rnd() interface
      sql/item_func.h:
        Use new my_rnd() interface
      sql/item_strfunc.cc:
        Use new my_rnd() interface
      sql/lex.h:
        Added PAGE_CHECKSUM and TABLE_CHECKSUM
      sql/mysql_priv.h:
        Use new my_rnd() interface
      sql/mysqld.cc:
        Use new my_rnd() interface
      sql/password.c:
        Move my_rnd() to mysys
        Use new my_rnd() interface
      sql/sql_class.cc:
        Use new my_rnd() interface
      sql/sql_class.h:
        Use new my_rnd() interface
      sql/sql_crypt.cc:
        Use new my_rnd() interface
      sql/sql_crypt.h:
        Use new my_rnd() interface
      sql/sql_show.cc:
        Simpler handling of ha_choice_values
        Added PAGE_CHECKSUM
      sql/sql_table.cc:
        Enable correct checksum handling (for now) if not running in compatible mode
      sql/sql_yacc.yy:
        Added table option PAGE_CHECKSUM
        Added future compatible table option TABLE_CHECKSUM (alias for CHECKSUM)
        Added 'choice' target to simplify code
      sql/table.cc:
        Store flag for PAGE_CHECKSUM
      sql/table.h:
        Added support for PAGE_CHECKSUM
      storage/maria/ha_maria.cc:
        Remove protection for incompatbile frm and MAI
        (Slow, not needed test)
        Rec_per_key is now in double
        Remember row type for table
        Give warning if one Maria uses another row type than requested
        Removed some old ASK_MONTY entries (added comments instead)
        Added handling of PAGE_CHECKSUM flags
      storage/maria/ma_bitmap.c:
        Added page checksums to bitmap pages
        Added special bitmap marker for bitmap pages
        (Used to find bugs when running without page checksums)
      storage/maria/ma_blockrec.c:
        Added a free-link list over directory entries. This makes insert of small rows faster as we don't
        have to scan the whole directory to find a not used entry.
        Moved SANITY_CHECKS to maria_def.h
        Simplify code by introducing dir_entry_pos()
        Added support for PAGE_CHECKSUM
      storage/maria/ma_blockrec.h:
        Added DIR_FREE_SIZE (linked list of free directory entries)
        Added PAGE_CHECKSUM
        Added 'dir_entry_pos()'
      storage/maria/ma_check.c:
        Check that index pages has correct index number
        Calculate rec_per_key with double precission
        Simplify code by using '_ma_get_used_and_node()'
        Check free directory list
        Remove wrong end \n from messages
        maria_data_on_page() -> _ma_get_page_used()
        maria_putint() -> _ma_store_page_used()
        rec_per_key_rows -> records_at_analyze
      storage/maria/ma_checksum.c:
        Calculate checksum in original column order
      storage/maria/ma_create.c:
        Store original column order in index file
        Reserve place for nulls_per_key_part (future)
        Added support for PAGE_CHECKSUM
      storage/maria/ma_dbug.c:
        Fixed wrong debug output of key of type 'ulong'
      storage/maria/ma_delete.c:
        maria_data_on_page() -> _ma_get_used_and_node()
        maria_data_on_page() -> _ma_get_page_used()
        maria_putint() -> _ma_store_page_used()
        Added page header (index key number) to all index pages
        Reserved page for checksum on index pages
        Use keypage_header
      storage/maria/ma_ft_update.c:
        maria_putint() -> _ma_store_page_used()
        Store key number at start of page
      storage/maria/ma_loghandler.h:
        st_maria_info -> MARIA_HA
      storage/maria/ma_open.c:
        rec_per_key is now in double precission
        Added 'nulls_per_key_part'
        Added 'extra_options' (flags for future)
        Added support for PAGE_CHECKSUM
        Give error HA_ERR_NEW_FILE when using unsupported maria extensions
        Added comments
        Add maria_uuid to index file
        Added functions to store and read column_nr map.
        Changed some functions to return my_bool instead of uint
      storage/maria/ma_page.c:
        Added checks that pages has correct key nr
        Store 0xffffffff in checksum position if page checksums are not enabled
        Moved key-page-delete link to take into account keypage header
      storage/maria/ma_preload.c:
        Remove old MyISAM dependent code
        When scanning pages, only add pages to page cache for the requested index
      storage/maria/ma_range.c:
        maria_data_on_page() -> _ma_get_used_and_node()
        Use keypage_header
      storage/maria/ma_rt_index.c:
        Fixed indentation
      storage/maria/ma_rt_index.h:
        Added support for dynamic index page header
        Reserved place for PAGE_CHECKSUM
      storage/maria/ma_rt_key.c:
        Fixed indentation
        maria_data_on_page() -> _ma_get_page_used()
        maria_putint() -> maria_store_page_used()
      storage/maria/ma_rt_mbr.c:
        Fixed indentation
      storage/maria/ma_rt_split.c:
        Fixed indentation
        maria_data_on_page () -> _ma_get_page_used()
      storage/maria/ma_rt_test.c:
        Fixed indentation
      storage/maria/ma_search.c:
        Remove support of using -1 as 'last used index' to _ma_check_index()
        maria_data_on_page() -> _ma_get_page_used()
        maria_data_on_page() -> _ma_get_used_and_node()
        Use keypage_header
      storage/maria/ma_sort.c:
        Changed some buffers to size_t
        Changed rec_per_key_part to double
      storage/maria/ma_static.c:
        Removed NEAR
        Added maria_uuid
      storage/maria/ma_test2.c:
        Moevd testflag == 2 to correct place
        Remove test of reading with index number -1 (not supported anymore)
      storage/maria/ma_test_recovery.expected:
        Updated results
      storage/maria/ma_test_recovery:
        Changed tmp table names so that one can run maria_chk on them
      storage/maria/ma_write.c:
        Fixed indentation
        Use keypage_header
        Store index number on index pages
        maria_putint() -> _ma_store_page_used()
        maria_data_on_page() -> ma_get_used_and_node()
        maria_data_on_page() -> _ma_get_page_used()
        Added PAGE_CHECKSUM
        Added Maria handler to some functions
        Removed some not needed casts
      storage/maria/maria_chk.c:
        Added error handling for HA_ERR_NEW_FILE
        Added information about page checksums
        rec_per_key_part changed to double
        maria_data_on_page() -> _ma_get_page_used()
        Use keypage_header
      storage/maria/maria_def.h:
        Added IDENTICAL_PAGES_AFTER_RECOVERY and SANITY_CHECKS
        Changed rec_per_key_part to double
        Added nulls_per_key_part
        rec_per_key_rows -> records_at_analyze
        st_maria_info -> MARIA_HA
        Reserve place for new statistics variables, uuid, checksums per page etc.
        Removed NEAR tags
        Changed some prototypes to use my_bool and size_t
      storage/maria/maria_pack.c:
        st_maria_info -> MARIA_HA
        Fixed indentation
      storage/myisam/mi_dbug.c:
        Fix wrong debug output for ULONG
      mysys/my_rnd.c:
        New BitKeeper file ``mysys/my_rnd.c''
      mysys/my_uuid.c:
        New BitKeeper file ``mysys/my_uuid.c''
      baad15ae
    • unknown's avatar
      WL#3071 - Maria checkpoint · e7085957
      unknown authored
      * Preparation for having a background checkpoint thread:
      frequency of checkpoint taken by that thread is now configurable
      by the user: global variable maria_checkpoint_frequency, in seconds,
      default 30 (checkpoint every 30th second); 0 means no checkpoints
      (and thus no background thread, thus no background flushing, that
      will probably only be used for testing).
      * Don't take checkpoints in Recovery if it didn't do anything
      significant; thus no checkpoint after a clean shutdown/restart. The
      only checkpoint which is never skipped is the one at shutdown.
      * fix for a test failure (after-merge fix)
      
      
      include/maria.h:
        new variable
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
        result update
      mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
        position update (=after merge fix, as this position was already changed
        into 5.1 and not merged here, causing test to fail)
      storage/maria/ha_maria.cc:
        Checkpoint's frequency is now configurable by the user:
        global variable maria_checkpoint_frequency. Changing it on the fly
        requires us to shutdown/restart the background checkpoint thread,
        as the loop done in that thread assumes a constant checkpoint
        interval. Default value is 30: a checkpoint every 30 seconds (yes, I
        know, physicists will remind that it should be named "period" then).
        ha_maria now asks for a background checkpoint thread when it starts,
        but this is still overruled (disabled) in ma_checkpoint_init().
      storage/maria/ma_checkpoint.c:
        Checkpoint's frequency is now configurable by the user: background thread
        takes a checkpoint every maria_checkpoint_interval-th second.
        If that variable is 0, no checkpoints are taken.
        Note, I will enable the background thread only in a later changeset.
      storage/maria/ma_recovery.c:
        Don't take checkpoints at the end of the REDO phase and at the end of
        Recovery if Recovery didn't make anything significant (didn't open
        any tables, didn't rollback any transactions).
        With this, after a clean shutdown, Recovery shouldn't take any
        checkpoint, which makes starting faster (we save a few fsync()s of
        the log and control file).
      e7085957
    • unknown's avatar
      Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria · 91a48a75
      unknown authored
      into  gbichot4.local:/home/mysql_src/mysql-maria-tmp
      
      
      storage/maria/ma_loghandler.c:
        Auto merged
      91a48a75
  3. 08 Oct, 2007 8 commits
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · a2b44f09
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-bug
      
      a2b44f09
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-maria · 8ddf0edc
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria1
      
      8ddf0edc
    • unknown's avatar
      Merge janus.mylan:/usr/home/serg/Abk/mysql-5.1 · f532dd11
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-maria1
      
      
      Makefile.am:
        Auto merged
      client/mysqldump.c:
        Auto merged
      configure.in:
        Auto merged
      libmysqld/Makefile.am:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/mysqldump.result:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysys/mf_tempfile.c:
        Auto merged
      sql/Makefile.am:
        Auto merged
      sql/ha_partition.cc:
        Auto merged
      sql/ha_partition.h:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/lock.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_plugin.cc:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      sql/table.h:
        Auto merged
      BUILD/compile-dist:
        SCCS merged
      f532dd11
    • unknown's avatar
      sql_plugin.cc: · 6762bccc
      unknown authored
        fixed uninit memory access in SET pluginvar=DEFAULT
      innodb_mysql.test, innodb_mysql.result:
        test case for SET pluginvar=DEFAULT
      
      
      mysql-test/r/innodb_mysql.result:
        test case for SET pluginvar=DEFAULT
      mysql-test/t/innodb_mysql.test:
        test case for SET pluginvar=DEFAULT
      sql/sql_plugin.cc:
        fixed uninit memory access in SET pluginvar=DEFAULT
      6762bccc
    • unknown's avatar
      rpl_mixed_dml.inc: · 1f7faf59
      unknown authored
        use mysqltest builtins instead of --exec. Fixes a failing test too :)
      
      
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
        use mysqltest builtins instead of --exec. Fixes a failing test too :)
      1f7faf59
    • unknown's avatar
      Makefile.am: · 07ac491c
      unknown authored
        do link_sources only once
      
      
      sql/Makefile.am:
        do link_sources only once
      libmysql_r/Makefile.am:
        do link_sources only once
      07ac491c
    • unknown's avatar
      Comments added. · 55fbc02b
      unknown authored
      moved debugging defines.
      Fixed buffer flushing (we copied last page
      content before it was actually written, now
      we abvance pointer in new buffer and unlock
      it while waiting for filling old buffer)
      
      55fbc02b
    • unknown's avatar
      WL#3072 Maria recovery · cd357588
      unknown authored
      Misc changes:
      - fix for benign Valgrind error, compiler warnings
      - fix for a segfault in execution of maria_delete_all_rows() and one
      when taking multiple checkpoints
      - fix for too paranoid assertion
      - adding ability to take checkpoints at the end of the REDO phase
      and at the end of recovery.
      - other minor changes
      
      
      storage/maria/ha_maria.cc:
        The checkpoint done after Recovery is finished, is moved to
        maria_recover().
      storage/maria/ma_bitmap.c:
        fix for Valgrind error: the "shadow debug copy" of the bitmap page
        started unitialized and so ma_print_bitmap() would use it uninitialized
      storage/maria/ma_checkpoint.c:
        * reset pointers to NULL after freeing them, or we segfault at
        next checkpoint in my_realloc().
        * fix for compiler warnings.
      storage/maria/ma_delete_all.c:
        info->trn is NULL for non-transactional tables
      storage/maria/ma_locking.c:
        correct assertion (it fired wrongly in execution of REDO_DROP_TABLE
        due to the maria_extra(HA_PREPARE_FOR_DROP)->_ma_decrement_open_count()
        ->maria_lock_database(F_UNLCK); another solution would have been to
        not call _ma_decrement_open_count() (it's ok to have a wrong open
        count in a table which we are dropping), but the same problem
        would still exist for REDO_RENAME_TABLE.
      storage/maria/ma_loghandler.c:
        fail early if UNRECOVERABLE_ERROR
      storage/maria/ma_recovery.c:
        * new argument to maria_apply_log(): should it take checkpoints
        (at end of REDO phase and at the very end) or no.
        * moving the call to translog_next_LSN() into
        parse_checkpoint_record() ("hide the details").
        * Refining an error detection for something which could happen
        if there is a checkpoint record in the log.
        * Using close_one_table() instead of maria_extra(HA_EXTRA_PREPARE_FOR_DROP|RENAME),
        as it looks safer, and also changing how close_one_table() works:
        it now limits itself to scanning all_tables[], thus having one loopp
        instead of two, which should be faster (as a result, it does not
        close tables not registered in this array, which is ok as there
        should not be any).
      storage/maria/ma_recovery.h:
        new parameter
      storage/maria/maria_read_log.c:
        update to new prototype
      cd357588
  4. 07 Oct, 2007 2 commits
    • unknown's avatar
      Comments fixed and added. · 561b6b42
      unknown authored
      561b6b42
    • unknown's avatar
      Optimisation todo for loghandler added. · fd97577f
      unknown authored
      Debug output information fixed.
      Fixed direct page referencing in write mode.
      
      
      storage/maria/ma_loghandler.c:
        TODO added.
      storage/maria/ma_pagecache.c:
        Debug output information fixed.
        Fixed direct page referencing in write mode.
      fd97577f
  5. 06 Oct, 2007 3 commits
    • unknown's avatar
      remove maria_* variables from the server, declare them in ha_maria.cc · 58532a17
      unknown authored
      note: this does *not* move pagecache* variables.
      
      
      sql/mysqld.cc:
        remove maria_* variables from the server, declare them in ha_maria.cc
      sql/set_var.cc:
        remove maria_* variables from the server, declare them in ha_maria.cc
      sql/sql_class.h:
        remove maria_* variables from the server, declare them in ha_maria.cc
      sql/sql_plugin.cc:
        bugfix: support for ENUM/SET thd local plugin variables
      storage/maria/ha_maria.cc:
        remove maria_* variables from the server, declare them in ha_maria.cc
      58532a17
    • unknown's avatar
      after-merge fixes for 64bit · ee0e324c
      unknown authored
      
      storage/maria/ma_test1.c:
        typo (?) fixed
      ee0e324c
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1 · ba8b9742
      unknown authored
      into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
      
      ba8b9742
  6. 04 Oct, 2007 7 commits
    • unknown's avatar
      Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-maria · 0b3e9103
      unknown authored
      into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-maria.prod
      
      
      BUILD/SETUP.sh:
        Auto merged
      sql/opt_range.cc:
        Auto merged
      sql/sql_insert.cc:
        Auto merged
      storage/maria/ha_maria.cc:
        Auto merged
      storage/maria/ma_check.c:
        Auto merged
      storage/maria/ma_create.c:
        Auto merged
      storage/maria/ma_delete.c:
        Auto merged
      storage/maria/ma_open.c:
        Auto merged
      storage/maria/ma_update.c:
        Auto merged
      storage/maria/ma_write.c:
        Auto merged
      storage/maria/maria_chk.c:
        Auto merged
      storage/maria/maria_def.h:
        Auto merged
      storage/maria/ma_pagecache.c:
        Manual merge with maria tree.
      storage/myisam/sort.c:
        Manual merge with maria tree.
      0b3e9103
    • unknown's avatar
      After merge fixes. Applied changes made in myisam manually to maria. · 243a5d49
      unknown authored
      
      
      storage/maria/ma_test1.c:
        After merge fixes. Applied changes made in myisam manually to maria.
        
        Fixed memory leak.
      storage/maria/ma_test2.c:
        After merge fixes. Applied changes made in myisam manually to maria.
        
        Fixed memory leak.
      243a5d49
    • unknown's avatar
      Merge trift2.:/MySQL/M50/push-5.0 · 0f769793
      unknown authored
      into  trift2.:/MySQL/M51/push-5.1
      
      
      storage/ndb/test/ndbapi/testScanFilter.cpp:
        Auto merged
      0f769793
    • unknown's avatar
      Merge trift2.:/MySQL/M50/mysql-5.0 · 711be53b
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      711be53b
    • unknown's avatar
      Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0 · 3fb8f160
      unknown authored
      into  production.mysql.com:/usersnfs/jperkin/bk/build/5.1
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      scripts/mysql_install_db.sh:
        Auto merged
      3fb8f160
    • unknown's avatar
      Merge production.mysql.com:/usersnfs/jperkin/bk/build/5.0 · 270011cb
      unknown authored
      into  production.mysql.com:/usersnfs/jperkin/bk/bug-27692/5.0
      
      270011cb
    • unknown's avatar
      Restore creation of test databases and the anonymous user which · 4d1a88e8
      unknown authored
      were accidentally removed during a previous rototill of this
      code.  Fixes bug#27692.
        
      While it can be argued we should strive to provide a 'secure by
      default' installation, this happens to be the setup currently
      documented in the manual as the default, so defer changes that
      improve security out of the box to a co-ordinated effort later
      on.
        
      For now, make a note about the test databases and anonymous user
      in mysql_install_db and recommend that mysql_secure_installation
      be ran for users wishing to remove these defaults.
      
      [..re-commit of previously lost change..]
      
      
      scripts/mysql_system_tables_data.sql:
        Add anonymous accounts.
      scripts/mysql_install_db.sh:
        Point users at the mysql_secure_installation script.
      mysql-test/mysql-test-run.pl:
        Add a comment where removing anonymous users.
      4d1a88e8
  7. 03 Oct, 2007 1 commit
    • unknown's avatar
      WL#3072 Maria recovery. · 08ced364
      unknown authored
      * Thanks to Serg's tip, we fix here the compilation issue of
      REDO_REPAIR_TABLE's execution, by defining versions of
      _ma_killed_ptr() and _ma_check_print_info|warning|error()
      in maria_read_log.c (we move those of maria_chk.c into an include
      file and include it in maria_chk.c and maria_read_log.c).
      Execution of such record looks like working from my tests (it only
      happens in maria_read_log; recovery-from-mysqld skips DDLs and
      REPAIR is considered DDL here as it bypasses logging): tested
      ALTER TABLE ENABLE KEYS and then remove table, apply log: that
      did a repair.
      * Recent changes broke maria_read_log a bit: -a became default
      and -o caused error; fixing this.
      
      
      storage/maria/Makefile.am:
        addind new file
      storage/maria/ma_recovery.c:
        enable execution of REDO_REPAIR_TABLE by maria_read_log now that
        it compiles. Now reason to keep only T_QUICK from testflag.
      storage/maria/maria_chk.c:
        moving these functions to ma_check_standalone.h for reusability
      storage/maria/maria_def.h:
        comment
      storage/maria/maria_read_log.c:
        ma_check_standalone.h needs my_progname_short.
        Fixing bug where "maria_read_log" would default to -a and
        "maria_read_log -o" would throw an error. Implemented behaviour is:
        - no options: usage()
        - -a : applys, applys UNDOs by default unless --disable-undo
        - -o : only prints
      storage/maria/ma_check_standalone.h:
        All standalone programs which need to use functions from ma_check.c
        (like maria_repair()) must define their version of _ma_killed_ptr()
        and _ma_check_print_info|warning|error(). Indeed, linking with ma_check.o
        brings in the dependencies of ma_check.o which are definitions of the above
        functions; if the program does not define them then the ones of
        ha_maria.o are used i.e. ha_maria.o is linked into the program, and this
        brings dependencies of ha_maria.o on mysqld.o into the program's linking
        which thus fails, as the program is not linked with mysqld.o.
        We put in this file the functions which maria_chk.c uses, so that
        they can be reused by maria_read_log (when it replays REDO_REPAIR_TABLE)
        as they are good enough (they just print to stdout/stderr like
        maria_read_log already does).
      08ced364
  8. 02 Oct, 2007 3 commits
    • unknown's avatar
      testScanFilter.cpp: · c47eab5e
      unknown authored
         Updated variable size arrays to use vector like Jonas did for 5.1 so that my build would not break
      
      
      ndb/test/ndbapi/testScanFilter.cpp:
         Updated variable size arrays to use vector like Jonas did for 5.1 so that my build would not break
      c47eab5e
    • unknown's avatar
      Fix for pushbuild failure (noticable only on 64-bit) · e030a7af
      unknown authored
      
      storage/maria/ma_pagecache.c:
        pagecache->blocks is now long, takes 8 bytes on some platforms.
        The cast to ulonglong in int8store is for those platforms where
        ulong is 32-bit and int8store uses some << shifts, if there are
        (x<<40 is undefined if x is 32-bit).
      storage/maria/ma_recovery.c:
        this change corresponds to the one done in ma_pagecache.c: number
        of dirty pages is stored in 8 bytes.
      e030a7af
    • unknown's avatar
      WL#3072 - Maria recovery. · 198a1b6f
      unknown authored
      * Recovery of the table's live checksum (CREATE TABLE ... CHECKSUM=1)
      is achieved in this patch. The table's live checksum
      (info->s->state.state.checksum) is updated in inwrite_rec_hook's
      under the log mutex when writing UNDO_ROW_INSERT|UPDATE|DELETE
      and REDO_DELETE_ALL. The checksum variation caused by the operation
      is stored in these UNDOs, so that the REDO phase, when it sees such
      UNDOs, can update the live checksum if it is older (state.is_of_lsn is
      lower) than the record. It is also used, as a nice add-on with no
      cost, to do less row checksum computation during the UNDO phase
      (as we have it in the record already).
      Doing this work, it became pressing to move in-write hooks
      (write_hook_for_redo() et al) to ma_blockrec.c.
      The 'parts' argument of inwrite_rec_hook is unpredictable (it comes
      mangled at this stage, for example by LSN compression) so it is
      replaced by a 'void* hook_arg', which is used to pass down information,
      currently only to write_hook_for_clr_end() (previous undo_lsn and
      type of undone record).
      * If from ha_maria, we print to stderr how many seconds (with one
      fractional digit) the REDO phase took, same for UNDO phase and for
      final table close. Just to give an indication for debugging and maybe
      also for Support.
      
      
      storage/maria/ha_maria.cc:
        question for Monty
      storage/maria/ma_blockrec.c:
        * log in-write hooks (write_hook_for_redo() etc) move from
        ma_loghandler.c to here; this is natural: the hooks are coupled
        to their callers (functions in ma_blockrec.c).
        * translog_write_record() now has a new argument "hook_arg";
        using it to pass down to write_hook_for_clr_end() the transaction's
        previous_undo_lsn and the type of the being undone record, and also
        to pass down to all UNDOs the live checksum variation caused by the
        operation.
        * If table has live checksum, store in UNDO_ROW_INSERT|UPDATE|DELETE
        and in CLR_END the checksum variation ("delta") caused by the
        operation. For example if a DELETE caused the table's live checksum
        to change from 123 to 456, we store in the UNDO_ROW_DELETE, in 4 bytes,
        the value 333 (456-123).
        * Instead of hard-coded "1" as length of the place where we store
        the undone record's type in CLR_END, use a symbol CLR_TYPE_STORE_SIZE;
        use macros clr_type_store and clr_type_korr.
        * write_block_record() has a new parameter 'old_record_checksum'
        which is the pre-computed checksum of old_record; that value is used
        to update the table's live checksum when writing UNDO_ROW_UPDATE|CLR_END.
        * In allocate_write_block_record(), if we are executing UNDO_ROW_DELETE
        the row's checksum is already computed.
        * _ma_update_block_record2() now expect the new row's checksum into
        cur_row.checksum (was already true) and the old row's checksum into
        new_row.checksum (that's new). Its two callers, maria_update() and
        _ma_apply_undo_row_update(), honour this.
        * When executing an UNDO_ROW_INSERT|UPDATE|DELETE in UNDO phase, pick
        up the checksum delta from the log record. It is then used to update
        the table's live checksum when writing CLR_END, and saves us a
        computation of record.
      storage/maria/ma_blockrec.h:
        in-write hooks move from ma_loghandler.c
      storage/maria/ma_check.c:
        more straightforward size of buffer
      storage/maria/ma_checkpoint.c:
        <= is enough
      storage/maria/ma_commit.c:
        new prototype of translog_write_record()
      storage/maria/ma_create.c:
        new prototype of translog_write_record()
      storage/maria/ma_delete.c:
        The row's checksum must be computed before calling(*delete_record)(),
        not after, because it must be known inside _ma_delete_block_record()
        (to update the table's live checksum when writing UNDO_ROW_DELETE).
        If deleting from a transactional table, live checksum was already updated
        when writing UNDO_ROW_DELETE.
      storage/maria/ma_delete_all.c:
        @todo is now done (in ma_loghandler.c)
      storage/maria/ma_delete_table.c:
        new prototype of translog_write_record()
      storage/maria/ma_loghandler.c:
        * in-write hooks move to ma_blockrec.c.
        * translog_write_record() gets a new argument 'hook_arg' which is
        passed down to pre|inwrite_rec_hook. It is more useful that 'parts'
        for those hooks, because when those hooks are called, 'parts' has
        possibly been mangled (like with LSN compression) and is so
        unpredictable.
        * fix for compiler warning (unused buffer_start when compiling without
        debug support)
        * Because checksum delta is stored into UNDO_ROW_INSERT|UPDATE|DELETE
        and CLR_END, but only if the table has live checksum, these records
        are not PSEUDOFIXEDLENGTH anymore, they are now VARIABLE_LENGTH (their
        length is X if no live checksum and X+4 otherwise).
        * add an inwrite_rec_hook for UNDO_ROW_UPDATE, which updates the
        table's live checksum. Update it also in hooks of UNDO_ROW_INSERT|
        DELETE and REDO_DELETE_ALL and CLR_END.
        * Bugfix: when reading a record in translog_read_record(), it happened
        that "length" became negative, because the function assumed that
        the record extended beyond the page's end, whereas it may be shorter.
      storage/maria/ma_loghandler.h:
        * Instead of hard-coded "1" and "4", use symbols and macros
        to store/retrieve the type of record which the CLR_END corresponds
        to, and the checksum variation caused by the operation which logs the
        record
        * translog_write_record() gets a new argument 'hook_arg' which is
        passed down to pre|inwrite_rec_hook. It is more useful that 'parts'
        for those hooks, because when those hooks are called, 'parts' has
        possibly been mangled (like with LSN compression) and is so
        unpredictable.
      storage/maria/ma_open.c:
        fix for "empty body in if() statement" (when compiling without safemutex)
      storage/maria/ma_pagecache.c:
        <= is enough
      storage/maria/ma_recovery.c:
        * print the time that each recovery phase (REDO/UNDO/flush) took;
        this is enabled only when recovering from ha_maria. Is it printed
        n seconds with a fractional part of one digit (like 123.4 seconds).
        * In the REDO phase, update the table's live checksum by using
        the checksum delta stored in UNDO_ROW_INSERT|DELETE|UPDATE and CLR_END.
        Update it too when seeing REDO_DELETE_ALL.
        * In the UNDO phase, when executing UNDO_ROW_INSERT, if the table does
        not have live checksum then reading the record's header (as done by
        the master loop of run_undo_phase()) is enough; otherwise we
        do a translog_read_record() to have the checksum delta ready
        for _ma_apply_undo_row_insert().
        * When at the end of the REDO phase we notice that there is an unfinished
        group of REDOs, don't assert in debug binaries, as I verified that it
        can happen in real life (with kill -9)
        * removing ' in #error as it confuses gcc3
      storage/maria/ma_rename.c:
        new prototype of translog_write_record()
      storage/maria/ma_test_recovery.expected:
        Change in output of ma_test_recovery: now all live checksums of
        original tables equal those of tables recreated by the REDO phase
        and those of tables fixed by the UNDO phase. I.e. recovery of
        the live checksum looks like working (which was after all the only
        goal of this changeset).
        I checked by hand that it's not just all live checksums which are
        now 0 and that's why they match. They are the old values like
        3757530372. maria.test has hard-coded checksum values in its result
        file so checks this too.
      storage/maria/ma_update.c:
        * It's useless to put up HA_STATE_CHANGED in 'key_changed',
        as we put up HA_STATE_CHANGED in info->update anyway.
        * We need to compute the old and new rows' checksum before calling
        (*update_record)(), as checksum delta must be known when logging
        UNDO_ROW_UPDATE which is done by _ma_update_block_record(). Note that
        some functions change the 'newrec' record (at least _ma_check_unique()
        does) so we cannot move the checksum computation too early in the
        function.
      storage/maria/ma_write.c:
        If inserting into a transactional table, live's checksum was
        already updated when writing UNDO_ROW_INSERT. The multiplication
        is a trick to save an if().
      storage/maria/unittest/ma_test_loghandler-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_first_lsn-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_max_lsn-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_multigroup-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_multithread-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_noflush-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_pagecache-t.c:
        new prototype of translog_write_record()
      storage/maria/unittest/ma_test_loghandler_purge-t.c:
        new prototype of translog_write_record()
      storage/myisam/sort.c:
        fix for compiler warnings in pushbuild (write_merge_key* functions
        didn't have their declaration match MARIA_HA::write_key).
      198a1b6f
  9. 01 Oct, 2007 11 commits
    • unknown's avatar
      Merge desktop.sanja.is.com.ua:/home/bell/mysql/bk/mysql-maria · da6db764
      unknown authored
      into  desktop.sanja.is.com.ua:/home/bell/mysql/bk/work-maria-recovery
      
      da6db764
    • unknown's avatar
      Fixed problem with scanner destruction (unpinned page in the cache). · 108307b8
      unknown authored
      
      storage/maria/ma_loghandler.c:
        Debug output adder to control scanner freeing.
        Fixed problem with scanner destruction (unpinned page in the cache).
      108307b8
    • unknown's avatar
      Fix for "innodb_mysql" and "events" failures: we can disable transactionality · 426158e2
      unknown authored
      in CREATE SELECT only if the table is not temporary (because
      re-enabling causes a commit). In the future we should disable
      again for temporary tables; that will probably require changing
      ha_enable_transaction().
      
      
      sql/sql_insert.cc:
        When we disable transactionality in CREATE SELECT, we re-enable it
        at the end and this causes a commit (inside ha_enable_transaction());
        but this is undesired if the created table is temporary (we don't
        want CREATE TEMPORARY TABLE SELECT to commit all previous statements).
        So we disable logging only if the table is not temporary.
        Ideally in the future we would want to lift this restriction which
        sounds stupid, but for Maria it does not matter now (temporary
        tables are not transactional yet).
      426158e2
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build · 1b0701e4
      unknown authored
      into  mysql.com:/home/kent/bk/make-install/mysql-5.1-build
      
      1b0701e4
    • unknown's avatar
      make_binary_distribution.sh: · 2f295f62
      unknown authored
        Added special handling of "mysql_install_db" and "mysql.server" scripts,
        find executables relative to the current directory.
      
      
      scripts/make_binary_distribution.sh:
        Added special handling of "mysql_install_db" and "mysql.server" scripts,
        find executables relative to the current directory.
      2f295f62
    • unknown's avatar
      fater way to detect last page address for the last log file. · ef3a5b5f
      unknown authored
      gprof build for amd64.
      
      
      storage/maria/ma_loghandler.c:
        fater way to detect last page address for the last log file.
      BUILD/compile-amd64-gprof-no-ndb:
        New BitKeeper file ``BUILD/compile-amd64-gprof-no-ndb''
      ef3a5b5f
    • unknown's avatar
      ma_recovery.c: · 4881ab88
      unknown authored
        SCCS merged
      
      
      storage/maria/ma_recovery.c:
        SCCS merged
      4881ab88
    • unknown's avatar
      Merge trift2.:/MySQL/M50/push-5.0 · 8f9743d6
      unknown authored
      into  trift2.:/MySQL/M51/push-5.1
      
      
      configure.in:
        5.0 version change does not affect 5.1 - "use local".
      8f9743d6
    • unknown's avatar
      Merge trift2.:/MySQL/M50/mysql-5.0 · 1b96170f
      unknown authored
      into  trift2.:/MySQL/M50/push-5.0
      
      1b96170f
    • unknown's avatar
      Fix bug#31150 "Test case does not cleanup": · a7e3f053
      unknown authored
      Add the cleanup by dropping the database 'track' in test "rpl_bug31076".
      
      
      mysql-test/suite/rpl/r/rpl_bug31076.result:
        Fix bug#31150 "Test case does not cleanup":
        Drop the database 'track' which was newly created for this test.
      mysql-test/suite/rpl/t/rpl_bug31076.test:
        Fix bug#31150 "Test case does not cleanup":
        Drop the database 'track' which was newly created for this test.
      a7e3f053
    • unknown's avatar
      Incorrect function call fixed. · be4d74e7
      unknown authored
      be4d74e7
  10. 29 Sep, 2007 1 commit