1. 21 Apr, 2010 1 commit
    • Luis Soares's avatar
      BUG#52868: Wrong handling of NULL value during update, replication out · ddb5d633
      Luis Soares authored
                 of sync
      
      In RBR, sometimes the table->s->last_null_bit_pos can be zero. This
      has impact at the slave when it compares records fetched from the
      storage engine against records in the binary log event. If
      last_null_bit_pos is zero the slave, while comparing in
      log_event.cc:record_compare function, would set all bits in the last
      null_byte to 1 (assumed all 8 were unused) . Thence it would loose the
      ability to distinguish records that were similar in contents except
      for the fact that some field was null in one record, but not in the
      other. Ultimately this would cause wrong matches, and in the specific
      case depicted in the bug report the same record would be updated
      twice, resulting in a lost update.
      
      Additionally, in the record_compare function the slave was setting the
      X bit unconditionally. There are cases that the X bit does not exist
      in the record header. This could also lead to wrong matches between
      records.
      
      We fix both by conditionally resetting the bits: (i) unused null_bits
      are set if last_null_bit_pos > 0; (ii) X bit is set if
      HA_OPTION_PACK_RECORD is in use.
      ddb5d633
  2. 20 Apr, 2010 2 commits
  3. 19 Apr, 2010 1 commit
  4. 16 Apr, 2010 6 commits
    • Kristofer Pettersson's avatar
      Automerge · f3945431
      Kristofer Pettersson authored
      f3945431
    • Kristofer Pettersson's avatar
      Bug#50373 --secure-file-priv="" · 2a37d531
      Kristofer Pettersson authored
      The server variable opt_secure_file_priv wasn't
      normalized properly and caused the operations
      LOAD DATA INFILE .. INTO TABLE ..
      and
      SELECT load_file(..)
      to do different interpretations of the 
      --secure-file-priv option.
      
      The patch moves code to the server initialization
      routines so that the path always is normalized
      once and only once.
      
      It was also intended that setting the option
      to an empty string should be equal to 
      lifting all previously set restrictions. This
      is also fixed by this patch.
      2a37d531
    • Staale Smedseng's avatar
      Bug#51591 deadlock in the plugins+status+variables · 6156581e
      Staale Smedseng authored
            
      Potential deadlock situation involving LOCK_plugin,
      LOCK_global_system_variables and LOCK_status.
            
      This patch backports the fix from next-mr, unlocking
      LOCK_plugin before calling plugin->init() and
      add_status_vars().
      6156581e
    • Sergey Glukhov's avatar
      Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings · 0d242648
      Sergey Glukhov authored
      Arg_comparator initializes 'comparators' array in case of
      ROW comparison and does not free this array on destruction.
      It leads to memory leaks.
      The fix:
      -added Arg_comparator::cleanup() method which frees
       'comparators' array.
      -added Item_bool_func2::cleanup() method which calls 
       Arg_comparator::cleanup() method
      0d242648
    • Georgi Kodinov's avatar
      Bug #52629: memory leak from sys_var_thd_dbug in binlog.binlog_write_error · 51880686
      Georgi Kodinov authored
      When re-setting (SET GLOBAL debug='') the GLOBAL debug settings the 
      server was not freeing the data elements from the top (initial) frame 
      before setting them to 0 without freeing the underlying memory. As these 
      are global settings there's a chance that something is there already.
      Fixed by :
      1. making sure the allocated data are cleaned up before re-setting them
      while parsing a debug string
      2. making sure the stuff allocated in the global settings is freed on 
      shutdown.
      51880686
    • Luis Soares's avatar
      b5c258a8
  5. 15 Apr, 2010 1 commit
  6. 14 Apr, 2010 2 commits
    • Sergey Vojtovich's avatar
      Merge fix for BUG39053 to 5.1-bugteam. · 2fe70872
      Sergey Vojtovich authored
      2fe70872
    • Sergey Vojtovich's avatar
      BUG#39053 - UNISTALL PLUGIN does not allow the storage engine · b89feb5b
      Sergey Vojtovich authored
                  to cleanup open connections
      
      It was possible to UNINSTALL storage engine plugin when binding
      between THD object and storage engine is still active (e.g. in
      the middle of transaction).
      
      To avoid unclean deactivation (uninstall) of storage engine plugin
      in the middle of transaction, additional storage engine plugin
      lock is acquired by thd_set_ha_data().
      
      If ha_data is not null and storage engine plugin was not locked
      by thd_set_ha_data() in this connection before, storage engine
      plugin gets locked.
      
      If ha_data is null and storage engine plugin was locked by
      thd_set_ha_data() in this connection before, storage engine
      plugin lock gets released.
      
      If handlerton::close_connection() didn't reset ha_data, server does
      it immediately after calling handlerton::close_connection().
      
      Note that this is just a framework fix, storage engines must switch
      to thd_set_ha_data() from thd_ha_data() if they want to see fit.
      b89feb5b
  7. 12 Apr, 2010 2 commits
  8. 09 Apr, 2010 2 commits
    • Davi Arnaut's avatar
      Backport revision alik@sun.com-20100223131824-comthndat57kx8s5: · 9d59b270
      Davi Arnaut authored
      Add ignore pattern for valgrind messages.
      9d59b270
    • Georgi Kodinov's avatar
      Bug #47095: Can't open_files_limit really be larger than 65535? · 17a21c4f
      Georgi Kodinov authored
      Several problems addressed:
      
      1. The maximum value for --open_files_limit on non-windows boxes
      is now raised to UINT_MAX (the maximum possible without significant
      changes in the code). The maximum value on windows is kept to be
      2048 due to a known limitation (bug 24509).
      
      2. mysqld_safe now supports --open_files_limit=xx in addition to 
      --open-files-limit=xx
      
      3. mysqld_safe always passes through --open[_-]files[_-]limit
      to the underlying mysqld. It used to pass it through only if it 
      the user running the script has access to the root directory or
      there was an --user argument specified.
      
      4. Fixed a prototype in my_file.c to match its counterpart in 
      the other #ifdef branch.
      17a21c4f
  9. 07 Apr, 2010 1 commit
  10. 06 Apr, 2010 7 commits
  11. 05 Apr, 2010 1 commit
    • Sergey Glukhov's avatar
      Bug#52336 Segfault / crash in 5.1 copy_fields (param=0x9872980) at sql_select.cc:15355 · 416f3205
      Sergey Glukhov authored
      The problem is that we can not use make_cond_for_table().
      This function relies on used_tables() condition
      which is not set properly for subqueries.
      As result subquery is not filtered out.
      The fix is to use remove_eq_conds() function instead
      of make_cond_for_table() func. 'remove_eq_conds()'
      algorithm relies on const_item() value and it allows
      to handle subqueries in right way.
      416f3205
  12. 02 Apr, 2010 1 commit
    • Gleb Shchepa's avatar
      Bug #40625: Concat fails on DOUBLE values in a Stored · 99a0ace4
      Gleb Shchepa authored
                  Procedure, while DECIMAL works
      
      Selecting of the CONCAT(...<SP variable>...) result into
      a user variable may return wrong data.
      
      
      Item_func_concat::val_str contains a number of memory
      allocation-saving tricks. One of them concatenates
      strings inplace inserting the value of one string
      at the beginning of the other string. However,
      this trick didn't care about strings those points
      to the same data buffer: this is possible when
      a CONCAT() parameter is a stored procedure variable -
      Item_sp_variable::val_str() uses the intermediate
      Item_sp_variable::str_value field, where it may
      store a reference to an external buffer.
      
      
      The Item_func_concat::val_str function has been
      modified to take into account val_str functions
      (such as Item_sp_variable::val_str) that return
      a pointer to an internal Item member variable
      that may reference to a buffer provided.
      99a0ace4
  13. 01 Apr, 2010 13 commits
    • Anurag Shekhar's avatar
      Bug #47904 Incorrect results w/ table subquery, derived SQs, and LEFT JOIN · 92a41960
      Anurag Shekhar authored
             on index
      
      'my_decimal' class has two members which can be used to access the 
      value. The member variable buf (inherited from parent class decimal_t) 
      is set to member variable buffer so that both are pointing to same value.
      
      Item_copy_decimal::copy() uses memcpy to clone 'my_decimal'. The member
      buffer is declared as an array and memcpy results in copying the values
      of the array, but the inherited member buf, which should be pointing at
      the begining of the array 'buffer' starts pointing to the begining of 
      buffer in original object (which is being cloned). Further updates on 
      'my_decimal' updates only the inherited member 'buf' but leaves 
      buffer unchanged.
      
      Later when the new object (which now holds a inconsistent value) is cloned
      again using proper cloning function 'my_decimal2decimal' the buf pointer
      is fixed resulting in loss of the current value.
      
      Using my_decimal2decimal instead of memcpy in Item_copy_decimal::copy()
      fixed this problem.
      92a41960
    • Sergey Vojtovich's avatar
      645ee41e
    • Sergey Vojtovich's avatar
      c9ed4d0b
    • Sergey Vojtovich's avatar
      BUG#40980 - Drop table can remove another MyISAM table's · 4050910f
      Sergey Vojtovich authored
                  data and index files
      
      It was possible if DATA/INDEX DIRECTORY is pointing to
      symlinked MySQL data home directory.
      
      Do not allow to drop data/index files implicitly symlinked
      to data home directory. For such tables remove symlink only.
      4050910f
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · f770db51
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6900 | mmakela | 2010-03-29 13:54:57 +0300 (Mon, 29 Mar 2010) | 5 lines
      branches/zip: Merge c6899 from branches/innodb+:
      
      Add debug assertions to track down Bug #52360.
      hash_table_t::magic_n: Add HASH_TABLE_MAGIC_N checks, which were fully absent.
      ut_hash_ulint(): Assert table_size > 0 before division.
      f770db51
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 7324f762
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6897 | mmakela | 2010-03-29 11:36:19 +0300 (Mon, 29 Mar 2010) | 3 lines
      branches/zip: innodb_mutex_show_status(): Fix a condition
      that was accidentally negated in r6781, making SHOW ENGINE INNODB MUTEX STATUS
      display only locks with no OS waits.
      7324f762
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · a47cb8f0
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6891 | vdimov | 2010-03-26 16:19:01 +0200 (Fri, 26 Mar 2010) | 5 lines
      Non-functional change: update copyright year to 2010 of the files
      that have been modified after 2010-01-01 according to svn.
      
      for f in $(svn log -v -r{2010-01-01}:HEAD |grep "^   M " |cut -b 16- |sort -u) ; do sed -i "" -E 's/(Copyright \(c\) [0-9]{4},) [0-9]{4}, (.*Innobase Oy.+All Rights Reserved)/\1 2010, \2/' $f ; done
      a47cb8f0
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 905c3d99
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6875 | vdimov | 2010-03-25 18:18:15 +0200 (Thu, 25 Mar 2010) | 4 lines
      branches/zip:
      
      Wrap line at 78 column in ChangeLog.
      905c3d99
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · a244b1d3
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6874 | vdimov | 2010-03-25 17:17:52 +0200 (Thu, 25 Mar 2010) | 4 lines
      branches/zip:
      
      Wrap ChangeLog at 78th column
      a244b1d3
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · ca7e2803
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6873 | vdimov | 2010-03-25 17:06:56 +0200 (Thu, 25 Mar 2010) | 4 lines
      branches/zip:
      
      Use Bug#N instead of Bug #N to be consistent with the rest of the fil.
      ca7e2803
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 7b4858c1
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6872 | vdimov | 2010-03-25 17:03:17 +0200 (Thu, 25 Mar 2010) | 4 lines
      branches/zip:
      
      Fix ChangeLog - write only the bug title in bugs.mysql.com-related entires.
      7b4858c1
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · 0a5b19e5
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6871 | vdimov | 2010-03-25 16:39:44 +0200 (Thu, 25 Mar 2010) | 4 lines
      branches/zip:
      
      Whitespace fixup to be consistent with the rest of the file.
      0a5b19e5
    • Sergey Vojtovich's avatar
      Applying InnoDB snapshot · f2415eb4
      Sergey Vojtovich authored
      Detailed revision comments:
      
      r6868 | mmakela | 2010-03-25 13:03:08 +0200 (Thu, 25 Mar 2010) | 1 line
      branches/zip: page_validate(): Check the buf[] bounds.
      f2415eb4