1. 27 May, 2010 1 commit
  2. 26 May, 2010 2 commits
  3. 25 May, 2010 7 commits
    • Ramil Kalimullin's avatar
      Manual merge. · 442e0f01
      Ramil Kalimullin authored
      442e0f01
    • Alexey Kopytov's avatar
      Bug #53830: !table || (!table->read_set || · 8fabbdd7
      Alexey Kopytov authored
                   bitmap_is_set(table->read_set, field_index))
      
      UPDATE on an InnoDB table modifying the same index that is used
      to satisfy the WHERE condition could trigger a debug assertion
      under some circumstances.
      
      Since for engines with the HA_PRIMARY_KEY_IN_READ_INDEX flag
      set results of an index scan on a secondary index are appended
      by the primary key value, if a query involves only columns from
      the primary key and a secondary index, the latter is considered
      to be covering.
      
      That tricks mysql_update() to mark for reading only columns
      from the secondary index when it does an index scan to retrieve
      rows to update in case a part of that key is also being
      updated. However, there may be other columns in WHERE that are
      part of the primary key, but not the secondary one.
      
      What we actually want to do in this case is to add index
      columns to the existing WHERE columns bitmap rather than
      replace it.
      8fabbdd7
    • Ramil Kalimullin's avatar
      Automerge. · 422621a4
      Ramil Kalimullin authored
      422621a4
    • Ramil Kalimullin's avatar
      Fix for bug #53907: Table dump command can be abused to dump arbitrary tables. · edfea7d5
      Ramil Kalimullin authored
      Problem: one with SELECT privilege on some table may dump other table
      performing COM_TABLE_DUMP command due to missed check of the table name.
      
      Fix: check the table name.
      edfea7d5
    • Davi Arnaut's avatar
      Bug#53908: compile failure with embedded enabled · 5f5e23fe
      Davi Arnaut authored
      This fixes a recently introduced regression, where a variable is
      not defined for the embedded server. Although the embedded server
      is not supported in 5.0, make it at least compile.
      5f5e23fe
    • Jonathan Perkin's avatar
      bug#49968: Properly define HAVE_ERRNO_AS_DEFINE for the appropriate · baa8f012
      Jonathan Perkin authored
      OpenBSD releases.
      
      Apply patch from Brad Smith, thanks!
      baa8f012
    • 's avatar
      Postfix BUG#49741 · 69c9dbab
      authored
      69c9dbab
  4. 24 May, 2010 1 commit
    • 's avatar
      Bug #49741 test files contain explicit references to bin/relay-log positions · cc054408
      authored
      Some of the test cases reference to binlog position and
      these position numbers are written into result explicitly.
      It is difficult to maintain if log event format changes. 
      
      There are a couple of cases explicit position number appears, 
      we handle them in different ways
      A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options
         Use --replace_result to mask them.
      B. 'SHOW BINLOG EVENT ...'
         Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. 
         show_binlog_events.inc file's function is enhanced by given
         $binlog_file and $binlog_limit.
      C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc'
         For the test cases just care a few items in the result of 'SHOW SLAVE STATUS',
         only the items related to each test case are showed.
         'show_slave_status.inc' is rebuild, only the given items in $status_items
         will be showed.
         'check_slave_is_running.inc' and 'check_slave_no_error.inc'
         and 'check_slave_param.inc' are auxiliary files helping
         to show running status and error information easily.
      cc054408
  5. 23 May, 2010 1 commit
  6. 21 May, 2010 2 commits
  7. 20 May, 2010 2 commits
    • Sven Sandberg's avatar
      BUG#52987: mysqldump fails if umask=0077 · 836bb54c
      Sven Sandberg authored
      Problem: The test case mysqldump reads a file that must
      be world-readable. The test did not force the file to be
      world-readable, so if the tree was branched with a umask
      of 0077, the test would fail.
      Fix: chmod the file.
      836bb54c
    • Sergey Glukhov's avatar
      Bug#52884 mysql-test-run does not work with --debug option · 7132ccd7
      Sergey Glukhov authored
      Server crashes on 64bit linux with 'double free or corruption'
      message, on 32bit mysql-test-run silently fails on bootstrap
      stage. The problem is that FreeState() is called twice
      for init_settings struct in _db_end_ function.
      The fix is to remove superfluous FreeState() call.
      Additional fix:
      fixed discrepancy of result file when
      debug & valgrind options are enabled
      for MTR.
      7132ccd7
  8. 19 May, 2010 4 commits
  9. 18 May, 2010 1 commit
  10. 16 May, 2010 3 commits
  11. 14 May, 2010 1 commit
    • Gleb Shchepa's avatar
      Bug #53450: Crash / assertion "virtual int · 09b6efcc
      Gleb Shchepa authored
                  ha_myisam::index_first(uchar*)") at assert.c:81
      
      Single-table DELETE crash/assertion similar to single-table
      UPDATE bug 14272.
      
      Same resolution as for the bug 14272:
      Don't run index scan when we should use quick select.
      This could cause failures because there are table handlers (like federated)
      that support quick select scanning but do not support index scanning.
      09b6efcc
  12. 13 May, 2010 1 commit
  13. 12 May, 2010 3 commits
    • Ramil Kalimullin's avatar
      Fix for bug#52051: Aggregate functions incorrectly returns · a882f7e6
      Ramil Kalimullin authored
            NULL from outer join query
            
            Problem: optimising MIN/MAX() queries without GROUP BY clause
            by replacing the aggregate expression with a constant, we may set it
            to NULL disregarding the fact that there may be outer joins involved.
            
            Fix: don't replace MIN/MAX() with NULL if there're outer joins.
            
            Note: the fix itself is just
            - if (!count)
            + if (!count && !outer_tables)
                set to NULL
            
            The rest of the patch eliminates repeated code to improve speed
            and for easy maintenance of the code.
      a882f7e6
    • Staale Smedseng's avatar
      Bug #49756 Rows_examined is always 0 in the slow query log for · 44fe4c70
      Staale Smedseng authored
      update statements
            
      Only SELECT statements report any examined rows in the slow
      log. Slow UPDATE, DELETE and INSERT statements report 0 rows
      examined, unless the statement has a condition including a
      SELECT substatement.
            
      This patch adds counting of examined rows for the UPDATE and
      DELETE statements. An INSERT ... VALUES statement will still 
      not report any rows as examined.
      44fe4c70
    • Sven Sandberg's avatar
      BUG#50410: rpl_ndb tests should run with binlog_format=row · b0b0000d
      Sven Sandberg authored
      Problem: The rpl_ndb did not set binlog_format explicitly. Since
      the default is binlog_format=statement, it means that the suite
      ran with that. ndb does not support binlog_format=statement,
      and many tests were skipped because they sourced
      include/have_binlog_format_row_or_mixed.inc
      Fix: set binlog_format=row explicitly in the configuration file
      for the rpl_ndb suite.
      b0b0000d
  14. 11 May, 2010 2 commits
    • Martin Hansson's avatar
      6549653f
    • Martin Hansson's avatar
      Bug#48157: crash in Item_field::used_tables · 27ac666f
      Martin Hansson authored
            
      MySQL handles the join syntax "JOIN ... USING( field1,
      ... )" and natural joins by building the same parse tree as
      a corresponding join with an "ON t1.field1 = t2.field1 ..."
      expression would produce. This parse tree was not cleaned up
      properly in the following scenario. If a thread tries to
      lock some tables and finds that the tables were dropped and
      re-created while waiting for the lock, it cleans up column
      references in the statement by means a per-statement free
      list. But if the statement was part of a stored procedure,
      column references on the stored procedure's free list
      weren't cleaned up and thus contained pointers to freed
      objects.
            
      Fixed by adding a call to clean up the current prepared
      statement's free list.
      
      This is a backport from MySQL 5.1
      27ac666f
  15. 10 May, 2010 3 commits
    • Mattias Jonsson's avatar
      merge · af2de573
      Mattias Jonsson authored
      af2de573
    • Martin Hansson's avatar
      Bug#50939: Loose Index Scan unduly relies on engine to · 1c5200f6
      Martin Hansson authored
      remember range endpoints
      
      The Loose Index Scan optimization keeps track of a sequence
      of intervals. For the current interval it maintains the
      current interval's endpoints. But the maximum endpoint was
      not stored in the SQL layer; rather, it relied on the
      storage engine to retain this value in-between reads. By
      coincidence this holds for MyISAM and InnoDB. Not for the
      partitioning engine, however.
      
      Fixed by making the key values iterator 
      (QUICK_RANGE_SELECT) keep track of the current maximum endpoint.
      This is also more efficient as we save a call through the
      handler API in case of open-ended intervals.
      
      The code to calculate endpoints was extracted into 
      separate methods in QUICK_RANGE_SELECT, and it was possible to
      get rid of some code duplication as part of fix.
      1c5200f6
    • Jim Winstead's avatar
      Using an initial command with mysql_options(..., MYSQL_INIT_COMMAND, ...) · bea06832
      Jim Winstead authored
      that generated multiple result sets (such as a stored procedure or a
      multi-statement command) would leave the connection unusable. (Bug #42373)
      
      A side-effect of this bug fix is to make MYSQL_INIT_COMMAND settings ignored
      when connecting from within the server, but none of the existing mechanisms
      for connecting from within the server use or need to set the initial command.
      bea06832
  16. 09 May, 2010 1 commit
  17. 08 May, 2010 1 commit
  18. 07 May, 2010 3 commits
    • Luis Soares's avatar
      BUG#49522: Replication problem with mixed MyISAM/InnoDB · 60ff8469
      Luis Soares authored
      When using a non-transactional table (t1) on the master 
      and with autocommit disabled, no COMMIT is recorded 
      in the binary log ending the statement. Therefore, if 
      the slave has t1 in a transactional engine, then it will 
      be as if a transaction is started but never ends. This is
      actually BUG#29288 all over again.
      
      We fix this by cherrypicking the cset for BUG#29288 which
      was pushed to a later mysql version. The revision picked
      was: mats@sun.com-20090923094343-bnheplq8n95opjay .
      
      Additionally, a test case for covering the scenario depicted
      in the bug report is included in this cset.
      60ff8469
    • Martin Hansson's avatar
      Merge of fix for Bug#52357 · 31a79ec3
      Martin Hansson authored
      31a79ec3
    • Sergey Glukhov's avatar
      Bug#53334 Incorrect result for InnoDB in LEFT JOIN with impossible condition · 2c83fc62
      Sergey Glukhov authored
      The fix actually reverts the change introduced
      by the patch for bug 51494.
      The fact is that patches for bugs 52177&48419
      fix bugs 51194&50575 as well.
      2c83fc62
  19. 06 May, 2010 1 commit
    • Gleb Shchepa's avatar
      Bug #53088: mysqldump with -T & --default-character-set set · c4021e2d
      Gleb Shchepa authored
                  truncates text/blob to 766 chars
      
      mysqldump and SELECT ... INTO OUTFILE truncated long BLOB/TEXT
      values to size of 766 bytes (MAX_FIELD_WIDTH or 255 * 3 + 1).
      
      The select_export::send_data method has been modified to
      reallocate a conversion buffer for long field data.
      c4021e2d