1. 16 Sep, 2011 2 commits
  2. 15 Sep, 2011 2 commits
  3. 14 Sep, 2011 1 commit
  4. 13 Sep, 2011 1 commit
    • Michael Widenius's avatar
      Increased version number · 4139bba2
      Michael Widenius authored
      Give proper error to client on shutdown.
      
      configure.in:
        Increased version number
      mysql-test/mysql-test-run.pl:
        Ignore errors that one can get while running with --mysqld=--log-warnings=2
      mysql-test/r/variables.result:
        Remember original value of log_warnings
      mysql-test/suite/rpl/r/rpl_idempotency.result:
        Ignore errors that one can get while running with --mysqld=--log-warnings=2
      mysql-test/suite/rpl/t/rpl_idempotency.test:
        Ignore errors that one can get while running with --mysqld=--log-warnings=2
      mysql-test/t/variables.test:
        Remember original value of log_warnings
      sql/mysqld.cc:
        Give proper error to close_connection() on shutdown
      storage/maria/ha_maria.cc:
        Added missing DBUG_RETURN
      4139bba2
  5. 10 Sep, 2011 1 commit
  6. 09 Sep, 2011 1 commit
    • Michael Widenius's avatar
      Fixed that automatic killing of delayed insert thread (in flush, alter table... · 8fb10c24
      Michael Widenius authored
      Fixed that automatic killing of delayed insert thread (in flush, alter table etc) will not abort auto-repair of MyISAM table.
      Give more information when finding an error in a MyISAM table.
      When killing system thread, use KILL_SYSTEM_THREAD instead of KILL_CONNECTION to make it easier to ignore the signal in sensitive context (like auto-repair)
      Added new kill level: KILL_SERVER that will in the future to be used to signal killed by shutdown.
      Add more warnings about killed connections when warning level > 3
      
      include/myisamchk.h:
        Added counting of printed info/notes
      mysys/mf_iocache.c:
        Remove duplicate assignment
      sql/handler.cc:
        Added test of KILL_SERVER
      sql/log.cc:
        Ignore new 'kill' error ER_NEW_ABORTING_CONNECTION when requesting query error code.
      sql/mysqld.cc:
        Add more warnings for killed connections when warning level > 3
      sql/scheduler.cc:
        Added checks for new kill signals
      sql/slave.cc:
        Ignore new kill signal ER_NEW_ABORTING_CONNECTION
      sql/sp_head.cc:
        Fixed assignment to bool
        Added testing of new kill signals
      sql/sql_base.cc:
        Use KILL_SYSTEM_THREAD to auto-kill system threads
      sql/sql_class.cc:
        Add more warnings for killed connections when warning level > 3
        thd_killed() now ignores KILL_BAD_DATA and THD::KILL_SYSTEM_THREAD as these should not abort sensitive operations.
      sql/sql_class.h:
        Added KILL_SYSTEM_THREAD and KILL_SERVER
      sql/sql_connect.cc:
        Added handling of KILL_SERVER
      sql/sql_insert.cc:
        Use KILL_SYSTEM_THREAD to auto-kill system threads
        Added handling of KILL_SERVER
      sql/sql_parse.cc:
        Add more warnings for killed connections when warning level > 3
        Added checking that thd->abort_on_warning is reset at end of query.
      sql/sql_show.cc:
        Update condition for when a query is 'killed'
      storage/myisam/ha_myisam.cc:
        Added counting of info/notes printed
      storage/myisam/mi_check.c:
        Always print an an error if we find data errors when checking/repairing a MyISAM table.
        When a repair was killed, don't retry repair.
        Added assert if sort_get_next_record() returned an error without an error message.
        Removed nonsence check "if (sort_param->read_cache.error < 0)" in repair.
      storage/myisam/myisamchk.c:
        Added counting of notes printed
      storage/pbxt/src/thread_xt.cc:
        Better error message.
      8fb10c24
  7. 08 Sep, 2011 1 commit
    • unknown's avatar
      LP BUG#813418 fix. · b80641b3
      unknown authored
      The problem was that optimization code did not take into account later feature when instad of NOT before BETWEEN it has negated flag into the Item_func_between inherited from Item_func_neg_opt. So optimizer tried process NOT BETWEEN as BETWEEN.
      
      The patch just switches off the optimisation for NOT BETWEEN as it was before when NOT function was really used.
      b80641b3
  8. 05 Sep, 2011 2 commits
    • unknown's avatar
      Fix of LP BUG#780386. · 8b062c1f
      unknown authored
        
        ALL subquery should return TRUE if subquery rowa set is empty independently
        of left part.  The problem was that Item_func_(eq,ne,gt,ge,lt,le) do not
        call execution of second argument if first is NULL no in this case subquery
        will not be executed and when Item_func_not_all calls any_value() of the
        subquery or aggregation function which report that there was rows. So for
        NULL < ALL (SELECT...) result was FALSE instead of TRUE.
        
        Fix is just swapping of arguments of Item_func_(eq,ne,gt,ge,lt,le) (with
        changing the operation if it is needed) so that result will be the same
        (for examole a < b is equal to b > a). This fix exploit the fact that
        first argument will be executed in any case.
      8b062c1f
    • unknown's avatar
      43380919
  9. 02 Sep, 2011 2 commits
    • Michael Widenius's avatar
      Fixed lp:814238 "safe_mutex issues must be assertions in debug binary" · 13e4d547
      Michael Widenius authored
      Added --debug-assert-on-error variable which, if set, will cause safe_mutex to assert if it founds an error.
      
      include/my_sys.h:
        Added my_assert_on_error
      mysys/my_static.c:
        Added my_assert_on_error
      mysys/thr_mutex.c:
        Assert when found wrong mutex usage if my_assert_on_error is set
      sql/mysqld.cc:
        Added setting of my_assert_on_error
      13e4d547
    • unknown's avatar
      LP BUG#823169 fix. · 37a8497d
      unknown authored
      For ANY subqueries NULLs should be ignored (if there is other values) when finding max min.
      For ALL subqueries NULLs should be saved if they found.
      
      Optimisation for ALL suqbueries if NULL is possible in the SELECT list with max/min aggregate function switched off.
      
      Some test changed where NULL is not used but optimization with max/min aggregate function important so NOT NULL added.
      
      mysql-test/r/explain.result:
        Forced old optimization.
      mysql-test/r/subselect.result:
        Forced old optimization.
        
        New test suite.
      mysql-test/t/explain.test:
        Forced old optimization.
      mysql-test/t/subselect.test:
        Forced old optimization.
        
        New test suite.
      sql/item_subselect.cc:
        Store converted subquery type.
        
        Switch off aggregate function optimisation for ALL and nulls.
      sql/sql_class.cc:
        Fixed NULL comparison.
      sql/sql_class.h:
        Store converted subquery type.
      37a8497d
  10. 01 Sep, 2011 3 commits
    • Michael Widenius's avatar
      Added logging of all errors from my_read/my_write/my_pread/my_pwrite/my_open &... · 31c8c95b
      Michael Widenius authored
      Added logging of all errors from my_read/my_write/my_pread/my_pwrite/my_open & my_malloc to mysqld error log if one sets log-warning to 10 or 11
      The idea is that my_global_flags is ored to the MyFlags parameter for the above functions if the MY_WME flag is not set.
      As the my_global_flags has ME_JUST_INFO (mark error as 'note') and possible ME_NOREFRESH (write error to log) this will force mysqld to log the not critical error to the log as a note.
      
      
       
      
      include/my_sys.h:
        Moved MY_SYNC_DIR to ensure it never clashes with ME_JUST_INFO
        Added my_global_flags
      mysql-test/Makefile.am:
        Removed not used bugs directory
      mysys/my_init.c:
        Added my_global_flags, a variable that is ored to MyFlags in a those mysys functions we want extra logging.
      mysys/my_malloc.c:
        Added support for my_global_flags
      mysys/my_open.c:
        Added support for my_global_flags
      mysys/my_pread.c:
        Added support for my_global_flags
      mysys/my_read.c:
        Added support for my_global_flags
      mysys/my_static.c:
        Added my_global_flags
      mysys/my_write.c:
        Added support for my_global_flags
      sql/mysqld.cc:
        Set my_global_flags for warning levels 10 & 11
      sql/sql_base.cc:
        Don't increment unhandled errors for notes or warnings.
      31c8c95b
    • Michael Widenius's avatar
      Fixed non critical buffer overflow bug in open_binary_frm() that could cause ASSERT · 4692537f
      Michael Widenius authored
      Added more printing of errors to myisamchk.
      
      mysys/mf_iocache.c:
        Write error message if failed seek.
      sql/table.cc:
        Fixed buffer overflow bug:
        - It's not enough to check for mysql_version to to detect partion indicator as the version may have been updated by mysql_upgrade.
      storage/myisam/ha_myisam.cc:
        Don't log same error twice.
        Don't reset log_all_errors if it's set
      storage/myisam/mi_check.c:
        Fixed bug that caused repair() to not report error if called twice (as when doing retry)
        More printing of errors.
      storage/myisam/sort.c:
        Set my_errno in case of out of memory errors.
      4692537f
    • Michael Widenius's avatar
      Added variable ARIA_CHECKPOINT_LOG_ACTIVITY to allow one to specify how often... · 1a51fe36
      Michael Widenius authored
      Added variable ARIA_CHECKPOINT_LOG_ACTIVITY to allow one to specify how often we should do a checkpoint.
      Added more error printing to log if log_warnings > 2
      Give an error if checkpoint record is not correct,
      
      mysql-test/suite/maria/r/compat_aliases.result:
        Added ARIA_CHECKPOINT_LOG_ACTIVITY
      mysql-test/suite/maria/r/maria3.result:
        Added ARIA_CHECKPOINT_LOG_ACTIVITY
      storage/maria/ha_maria.cc:
        Added ARIA_CHECKPOINT_LOG_ACTIVITY
        Added more error printing to log if log_warnings > 2
        Added db and table name to error message when printing to log
      storage/maria/ma_check.c:
        Fixed bug where we didn't reset some variables between repair() calls
      storage/maria/ma_checkpoint.c:
        Made maria_checkpoint_min_activity global.
        Don't do checkpoint if no data logged.
        Changed test for if we should do checkpoint to test separately for if log has grown or if we have had a lot of of cache writes.
      storage/maria/ma_recovery.c:
        Give an error if checkpoint record is not correct
      storage/maria/trnman.c:
        Don't print not needed long_transaction_id entries for checkpoints.
      1a51fe36
  11. 29 Aug, 2011 1 commit
    • Michael Widenius's avatar
      Added logging of all messages (also system warnings) one gets during a MyISAM... · 8b7a63b1
      Michael Widenius authored
      Added logging of all messages (also system warnings) one gets during a MyISAM recovery or auto-recovery.
      
      
      sql/mysqld.cc:
        Log errors if thd->log_all_errors is set
      sql/sql_class.cc:
        Add log_all_errors
      sql/sql_class.h:
        Add log_all_errors
      storage/myisam/ha_myisam.cc:
        Write db and table name for all logged errors
        Log errors also during auto_recovery
        During auto_recovery, set thd->log_all_errors if log_warnings >2 to ensure that system errors are also logged to file
      8b7a63b1
  12. 16 Aug, 2011 4 commits
  13. 15 Aug, 2011 5 commits
    • Michael Widenius's avatar
      Fixed recovery crash lp:814806 "Unclean shutdown corrupted Aria table blocking startup" · 13af3982
      Michael Widenius authored
      storage/maria/ma_recovery.c:
        Moved trman_init() before parse_checkpoint_record() as this calls trnman functions if we have to open tables.
      13af3982
    • Michael Widenius's avatar
      Merge in bug fix from 5.1 · b5f830d8
      Michael Widenius authored
      b5f830d8
    • Michael Widenius's avatar
      Increase server version · 8740e596
      Michael Widenius authored
      8740e596
    • Michael Widenius's avatar
      Fixed bug lp:826377 "Aria DB Format: Reading specific table from dump causes Wrong bytesec" · e71eb27a
      Michael Widenius authored
      The bug was that when using bulk insert combined with lock table, we intitalized the io cache with the wrong file position.
      This fixed a bug where MariaDB could not read in a table dump done with mysqldump.
      
      
      mysql-test/suite/maria/r/locking.result:
        Test case for locking + write cache bug
      mysql-test/suite/maria/t/locking.test:
        Test case for locking + write cache bug
      storage/maria/ma_extra.c:
        Initialize write cache used with bulk insert to correct file length.
        (The old code didn't work if one was using LOCK TABLE for the given table).
      e71eb27a
    • Michael Widenius's avatar
      Fixes bugs found by testcase for lp:815022 and lp:726374 "ma_blockrec.c:3000:... · b95d2778
      Michael Widenius authored
      Fixes bugs found by testcase for lp:815022 and lp:726374 "ma_blockrec.c:3000: write_block_record: Assertion `cur_block[1].page_count == 0' failed with a multi-index Aria workload"
      The issues was:
      - For some tables with a lot of not packed fields, we didn't allocate enough memory in head page which caused DBUG_ASSERT's
      - Removed wrong DBUG_ASSERT()
      - Fixed a problem with underflow() where it generates a key page where all keys didn't fit.
      - Max key length is now limited by block_size/3  (was block_size /2).  This is required for underflow() to work with packed keys.
      
      
      
      
      mysql-test/lib/v1/mysql-test-run.pl:
        Remove --alignment=8 as this doesn't work on 64 bit systems
      mysql-test/suite/maria/r/small_blocksize.result:
        Test case for Aria bug
      mysql-test/suite/maria/t/small_blocksize-master.opt:
        Test case for Aria bug
      mysql-test/suite/maria/t/small_blocksize.test:
        Test case for Aria bug
      storage/maria/ha_maria.cc:
        Fixed comment
      storage/maria/ma_bitmap.c:
        Fixed wrong variable usage in find_where_to_split_row() where we allocated too little memory for head page.
        We did not take into account space for head extents (long VARCHAR) when trying to split row on head page. This caused us to allocate too little space from bitmap which lead to ASSERT failures later.
      storage/maria/ma_blockrec.c:
        Made some argument const (to ensure they was not accidently changed)
        Removed wrong DBUG_ASSERT()
      storage/maria/ma_blockrec.h:
        Removed not used variable
      storage/maria/ma_delete.c:
        Added my_afree() in case of error
        More comments and DBUG_ASSERT() for underflow()
      storage/maria/ma_open.c:
        Make keyinfo->underflow_block_length smaller for packed keys. This has to be done as for long packed keys, underflow() otherwise generates a key page where all keys didn't fit.
      storage/maria/ma_page.c:
        New DBUG_ASSERT()
      storage/maria/ma_write.c:
        Fixed comment
      storage/maria/maria_def.h:
        We have to have space for at least 3 keys on a key page.
        (Otherwise the underflow() code doesn't work for packed keys, even when we have an underflow() for an empty key page)
      b95d2778
  14. 12 Aug, 2011 2 commits
  15. 10 Aug, 2011 2 commits
    • Michael Widenius's avatar
      Fixed bug lp:814054 'Assertion `block->hash_link == hash_link &&... · b5ef802f
      Michael Widenius authored
      Fixed bug lp:814054 'Assertion `block->hash_link == hash_link && hash_link->block == block' in ma_pagecache.c:2275 with Aria'
      - Replaced old DBUG_ASSERT with a new correct one + a comment.
      
      storage/maria/ma_pagecache.c:
        Replaced old DBUG_ASSERT with a new correct one + a comment.
      b5ef802f
    • Michael Widenius's avatar
      Fixes MySQL bug#48972: mysqldump --insert-ignore leaves set unique_checks=0. · 397fc34f
      Michael Widenius authored
      This fixes a bug that when you use mysqldump --no-create-info to generate a dump that you want to merge with an existing table,
      you can get an innodb table with duplicated unique keys.
      Patch orignally by Eric Bergen.
      
      
      client/mysqldump.c:
        Only use UNIQUE_CHECKS=0 for tables that are created.
        This solves the issue that you can't get duplicate unique keys when merging two dumps.
      mysql-test/r/mysqldump.result:
        Test for mysqldump --no-create-info
      397fc34f
  16. 08 Aug, 2011 1 commit
    • Michael Widenius's avatar
      Optimize mutex usage. · cfd2725d
      Michael Widenius authored
      storage/maria/ma_blockrec.c:
        Unlock bitmaps earlier (no reason to have them unlocked over _ma_write_clr())
      storage/maria/ma_extra.c:
        Don't lock THR_LOCK_maria for HA_EXTRA_PREPARE_FOR_RENAME (upper level ensures that we are not opening the same table during this call)
        We don't need to have share->intern_lock locked over _ma_flush_table_files()
      storage/maria/ma_open.c:
        Update comment
      cfd2725d
  17. 01 Aug, 2011 1 commit
  18. 31 Jul, 2011 2 commits
    • unknown's avatar
      Automerge 5.1->5.2 · 0b56ae29
      unknown authored
      0b56ae29
    • unknown's avatar
      Speed up mysql-test-run.pl. · 47c23a11
      unknown authored
      Problem was the parsing of test suite files for various tags and options.
      This was done inefficiently, and include files were re-parsed for every
      place they were included. This caused a delay of 20 seconds or so before
      the first test started to run.
      
      By parsing more efficiently and re-using first parse for subsequent
      inclusion of the same file, time spent parsing is reduced to less than
      1 second, and start appears instantaneous.
      
      (With this patch, full ./mtr runs in 3 minutes on my laptop (release
      build.)
      
      mysql-test/suite/innodb_plugin/t/innodb_bug52663.test:
        Test is fairly slow, so try to avoid getting stuck with it at the end
        while other workers are idle.
      47c23a11
  19. 26 Jul, 2011 1 commit
    • Michael Widenius's avatar
      Merge with 5.1 · 1d61f713
      Michael Widenius authored
      Fixed lp:814237: Wrong mutex usage in Aria
      
      
      storage/maria/ma_bitmap.c:
        Added call to _ma_bitmap_mark_file_changed() when flushing bitmap. This fixes lp:814237
      1d61f713
  20. 24 Jul, 2011 2 commits
    • Michael Widenius's avatar
      Ensure that the last --datadir option is used from the my.cnf files. · db9291fa
      Michael Widenius authored
      scripts/mysqldumpslow.sh:
        Remove not used --basedir option
        Ensure that the last --datadir option is used from the my.cnf files.
      db9291fa
    • Michael Widenius's avatar
      Fixes lp:805930 Sysbench breaks on multiple table test with MariaDB 5.2.7 + Aria · 10065404
      Michael Widenius authored
      The bug happens when one uses MAX_ROWS=# with Aria & row_format=page and one insert more than # rows.
      
      
      mysql-test/mysql-test-run.pl:
        Ignore table is full error messages
      mysql-test/suite/maria/r/max_length.result:
        Test case for 'Table is full'
      mysql-test/suite/maria/t/max_length.test:
        Test case for 'Table is full'
      storage/maria/ma_bitmap.c:
        Ensure that we don't allocate bits outside of max_data_file_size.
        Adjust max_data_file_size based on bitmap alignments.
        Backport fix to adjust wrong first_bitmap_with_space.
      storage/maria/ma_blockrec.c:
        Calculate value of max_data_file_length
      storage/maria/ma_blockrec.h:
        Updated prototype for _ma_bitmap_init()
      storage/maria/ma_check.c:
        Give warnings if file sizes are above max file sizes.
        Give more warnings in case of errors.
        Have maria_chk write if table is recreated.
      storage/maria/ma_create.c:
        Better calculation of max_data_file_length and thus data pointer length.
        Fixes some wrong pointer lengths when using MAX_ROWS=#
      storage/maria/ma_open.c:
        Removed duplicate assigment.
        Use block size from file instead of global variable.
      storage/maria/maria_chk.c:
        Remove -1 from printed file length
      storage/maria/maria_def.h:
        Update struct st_maria_file_bitmap
      10065404
  21. 21 Jul, 2011 3 commits