1. 12 Nov, 2009 1 commit
    • Magne Mahre's avatar
      Bug #37183 insert ignore into .. select ... hangs after · 6947ee37
      Magne Mahre authored
                 deadlock was encountered
      
      The bug is caused by an inconsistent handling of the IGNORE
      clause.  A read from a const table caused a lock timeout
      (ER_LOCK_TIMEOUT) in innodb.  Since the IGNORE clause was
      given, the timeout was converted into a warning instead of
      an error, thus not populating the diagnostics area.  When
      innodb subsequently marked the transaction for rollback,
      mysql asserted since the diag.area was empty.
      
      This patch consists of only a test case, as the bug itself
      was fixed by the patch for Bug #46539
      
      6947ee37
  2. 11 Nov, 2009 2 commits
    • Christopher Powers's avatar
      Merge · edfd29dd
      Christopher Powers authored
      edfd29dd
    • Anurag Shekhar's avatar
      Bug #47012 archive tables are not upgradeable, and server crashes · 862c422c
      Anurag Shekhar authored
             on any access
      
      Archive engine for 5.1 (and latter) version uses a modified 
      version of zlib (azlib). These two version are incompatible
      so a proper upgrade is needed before tables created in 5.0 
      can be used reliable.
      
      This upgrade can be performed using repair. But due to lack 
      of test its risky to allow upgrade for now. This patch addresses
      only the crashing issue. Any attempt to repair will be blocked.
      
      Eventually repair can be allowed to run through (which will also
      cause an upgrade from older version to newer) but only after a 
      thorough testing.
      862c422c
  3. 10 Nov, 2009 1 commit
    • Christopher Powers's avatar
      Bug#47382 'mysqladmin debug' crash on 64-bit Windows · 9bb40dc1
      Christopher Powers authored
      The crash occurs because SAFEMALLOC is defined for the MySQL server
      but not for the Archive or Federated engines, resulting in a 
      parameter mismatch between the function prototype and definition
      for functions using the CALLER_INFO macro.
      9bb40dc1
  4. 27 Oct, 2009 1 commit
    • Georgi Kodinov's avatar
      Bug #47930: MATCH IN BOOLEAN MODE returns too many results · 49a7e818
      Georgi Kodinov authored
        inside subquery
      
      Re-setting a fulltext index was a no-operation if not all
      the matches of a search were consumed by reading them.
      This was preventing a joined table using a fulltext index
      in a subquery that requires only 1 row of output (e.g. EXISTS) 
      from working correctly because the second execution of the 
      sub-query has the fulltext index cursor in a wrong state and
      was not finding results.
      Fixed by making the re-init code _ftb_init_index_search() 
      to re-set open cursors in addition to depleted ones.
      49a7e818
  5. 10 Nov, 2009 5 commits
  6. 09 Nov, 2009 3 commits
  7. 06 Nov, 2009 8 commits
    • Evgeny Potemkin's avatar
      Auto-merged fix for the bug#34384. · 47d850a8
      Evgeny Potemkin authored
      47d850a8
    • Evgeny Potemkin's avatar
      Bug#34384: Slow down on constant conversion. · 60d358af
      Evgeny Potemkin authored
      When values of different types are compared they're converted to a type that
      allows correct comparison. This conversion is done for each comparison and
      takes some time. When a constant is being compared it's possible to cache the
      value after conversion to speedup comparison. In some cases (large dataset,
      complex WHERE condition with many type conversions) query might be executed
      7% faster.
      
      A test case isn't provided because all changes are internal and isn't visible
      outside.
      
      The behavior of the Item_cache is changed to cache values on the first request
      of cached value rather than at the moment of storing item to be cached.
      A flag named value_cached is added to the Item_cache class. It's set to TRUE
      when cache holds the value of the last stored item.
      Function named cache_value() is added to the Item_cache class and derived classes.
      This function actually caches the value of the saved item.
      Item_cache_xxx::store functions now only store item to be cached and set
      value_cached flag to FALSE.
      Item_cache_xxx::val_xxx functions are changed to call cache_value function
      prior to returning cached value if value_cached is FALSE.
      The Arg_comparator::set_cmp_func function now calls cache_converted_constant
      to cache constants if they need a type conversion.
      The Item_cache::get_cache function is overloaded to allow setting of the
      cache type.
      The cache_converted_constant function is added to the Arg_comparator class.
      It checks whether a value can and should be cached and if so caches it.
      60d358af
    • Luis Soares's avatar
    • Alexey Kopytov's avatar
      Automerge. · 1a90c5f7
      Alexey Kopytov authored
      1a90c5f7
    • Alexey Kopytov's avatar
      Automerge. · 91829c0a
      Alexey Kopytov authored
      91829c0a
    • Alexey Kopytov's avatar
      Automerge. · 5d725601
      Alexey Kopytov authored
      5d725601
    • Alexey Kopytov's avatar
      Automerge. · 9674ef68
      Alexey Kopytov authored
      9674ef68
    • Alexey Kopytov's avatar
      Bug #48475: DISTINCT is ignored with GROUP BY WITH ROLLUP and · 9fff9acf
      Alexey Kopytov authored
                  only const tables
      
      The problem was caused by two shortcuts in the optimizer that
      are inapplicable in the ROLLUP case.
      
      Normally in a case when only const tables are involved in a
      query, DISTINCT clause can be safely optimized away since there
      may be only one row produced by the join. Similarly, we don't
      need to create a temporary table to resolve DISTINCT/GROUP
      BY/ORDER BY. Both of these are inapplicable when the WITH
      ROLLUP modifier is present.
      
      Fixed by disabling the said optimizations for the WITH ROLLUP
      case.
      9fff9acf
  8. 04 Nov, 2009 6 commits
    • Timothy Smith's avatar
      auto-merge · 2b87e80a
      Timothy Smith authored
      2b87e80a
    • Timothy Smith's avatar
      auto-merge · 377c1dc5
      Timothy Smith authored
      377c1dc5
    • Timothy Smith's avatar
      Fix for Bug#40700: aclocal warnings for missing cache-id's · 6d79f4a1
      Timothy Smith authored
      Just change mysql_foo to mysql_cv_foo for one cache-id variable name.  There
      was only one bad variable name, present in 5.0 and 5.1, but not in the -pe
      branch.
      6d79f4a1
    • Timothy Smith's avatar
      auto-merge · ed1b8829
      Timothy Smith authored
      ed1b8829
    • Timothy Smith's avatar
      auto-merge · 9a95a85c
      Timothy Smith authored
      9a95a85c
    • Georgi Kodinov's avatar
      Bug #46175: NULL read_view and consistent read assertion · 9ba74e5d
      Georgi Kodinov authored
      The SE API requires mysql to notify the storage engine that
      it's going to read certain tables at the beginning of the 
      statement (by calling start_stmt(), store_lock() or
      external_lock()).
      These are typically called by the lock_tables(). 
      However SHOW CREATE TABLE is not pre-locking the tables
      because it's not expected to access the data at all.
      But for some view definitions (that include comparing a
      date/datetime/timestamp column to a string returning
      scalar subquery) the JOIN::prepare may still access data
      when materializing the scalar non-correlated subquery
      in Arg_comparator::can_compare_as_dates().
      Fixed by not materializing the subquery when the function
      is called in a SHOW/EXPLAIN/CREATE VIEW
      9ba74e5d
  9. 05 Nov, 2009 2 commits
  10. 04 Nov, 2009 3 commits
    • Georgi Kodinov's avatar
      merge · c96baff6
      Georgi Kodinov authored
      c96baff6
    • Georgi Kodinov's avatar
    • Luis Soares's avatar
      BUG#47743: rpl.rpl_log_pos fails sporadically · 49fe3f5f
      Luis Soares authored
      BUG#47983: rpl_extraColmaster_myisam failed in PB2 with "Found
      warnings!!"
      
      BUG 45214 fixed the case when get_master_version_and_clock
      function, used by the slave, would not report errors. The slave
      now detects them and if related to transient network failures, it
      prints some warnings and retries to connect. On the other hand,
      if not network related, it just gives up and fails.
      
      As such, sometimes, in PB2, the slave comes across some transient
      communication issues between master and slave, while calling
      get_master_version_and_clock, causing warnings print outs to the
      error log. Nevertheless, in such cases slave retries to connect,
      in which it succeeds, and the test case continues as it normally
      would. But then, at the end of a successful test run, MTR checks
      the error log, finds the unexpected warnings and considers them
      harmful. This causes MTR to report error and, consequently, PB2
      to report a failing test.
      
      We fix this by adding to the global warnings suppress list the
      warnings related to transient network failures only, which are
      reported while in function get_master_version_and_clock.
      49fe3f5f
  11. 03 Nov, 2009 8 commits
    • Timothy Smith's avatar
    • Timothy Smith's avatar
      Bug#48031: mysql_secure_installation -- bash bug regarding passwords with · 3aff1e95
      Timothy Smith authored
        special chars
      
      This script failed when the user tried passwords with multiple spaces, \, # or
      ' characters.  Now proper escaping and quoting is used in all contexts.
      
      This problem occurs in the Perl version of this script, too, so fix it in both
      places.
      3aff1e95
    • Timothy Smith's avatar
      Bug#48086: mysql_secure_installation does NOT work on Solaris · 9e7cd0fb
      Timothy Smith authored
      Remove a bash-ism (if ! ...).
      9e7cd0fb
    • Davi Arnaut's avatar
      Automerge. · ca00c92d
      Davi Arnaut authored
      ca00c92d
    • Davi Arnaut's avatar
      fc55339e
    • Konstantin Osipov's avatar
      A fix and a test case for · 409160e4
      Konstantin Osipov authored
      Bug#41756 "Strange error messages about locks from InnoDB".
            
      In JT_EQ_REF (join_read_key()) access method, 
      don't try to unlock rows in the handler, unless certain that 
      a) they were locked
      b) they are not used.
      
      Unlocking of rows is done by the logic of the nested join loop,
      and is unaware of the possible caching that the access method may
      have. This could lead to double unlocking, when a row
      was unlocked first after reading into the cache, and then 
      when taken from cache, as well as to unlocking of rows which
      were actually used (but taken from cache).
            
      Delegate part of the unlocking logic to the access method,
      and in JT_EQ_REF count how many times a record was actually 
      used in the join. Unlock it only if it's usage count is 0.
      
      Implemented review comments.
      409160e4
    • Magnus Blåudd's avatar
      Merge bug#47867 to 5.1-bugteam · 273f9b63
      Magnus Blåudd authored
      273f9b63
    • Konstantin Osipov's avatar
      A fix and a test case for · d2babeaf
      Konstantin Osipov authored
      Bug#41756 "Strange error messages about locks from InnoDB".
      
      In JT_EQ_REF (join_read_key()) access method,
      don't try to unlock rows in the handler, unless certain that
      a) they were locked
      b) they are not used.
      
      Unlocking of rows is done by the logic of the nested join loop,
      and is unaware of the possible caching that the access method may
      have. This could lead to double unlocking, when a row
      was unlocked first after reading into the cache, and then
      when taken from cache, as well as to unlocking of rows which
      were actually used (but taken from cache).
      
      Delegate part of the unlocking logic to the access method,
      and in JT_EQ_REF count how many times a record was actually
      used in the join. Unlock it only if it's usage count is 0.
      
      Implemented review comments.
      d2babeaf