1. 17 Mar, 2010 1 commit
    • Mattias Jonsson's avatar
      Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with · 5a21306e
      Mattias Jonsson authored
      concurrent I_S query
      
      There were two problem:
      1) MYSQL_LOCK_IGNORE_FLUSH also ignored name locks
      2) there was a race between abort_and_upgrade_locks and
         alter_close_tables
         (i.e. remove_table_from_cache and
          close_data_files_and_morph_locks)
      
      Which allowed the table to be opened with MYSQL_LOCK_IGNORE_FLUSH flag
      resulting in renaming a partition that was already in use,
      which could cause the table to be unusable.
      
      Solution was to not allow IGNORE_FLUSH to skip waiting for
      a named locked table.
      
      And to not release the LOCK_open mutex between the
      calls to remove_table_from_cache and
      close_data_files_and_morph_locks by merging the functions
      abort_and_upgrade_locks and alter_close_tables.
      
      mysql-test/suite/parts/r/partition_debug_sync_innodb.result:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Added test result
      mysql-test/suite/parts/t/partition_debug_sync_innodb-master.opt:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Added test option
      mysql-test/suite/parts/t/partition_debug_sync_innodb.test:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Added test file
      sql/authors.h:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Time to be acknowledged :)
      sql/ha_partition.cc:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Added DEBUG_SYNC for deterministic testing
      sql/mysql_priv.h:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Renamed function since merging alter_close_tables into
        abort_and_upgrade_lock.
      sql/sql_base.cc:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Changed MYSQL_LOCK_IGNORE_FLUSH to not ignore name locks
        (open_placeholder).
        
        Merged alter_close_tables into abort_and_upgrade_locks
        (and added _and_close_table to the name)
        to not release LOCK_open between remove_table_from_cache
        and close_data_files_and_morph_locks.
        
        Added DEBUG_SYNC for deterministic testing.
      sql/sql_partition.cc:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Removed alter_close_tables, (merged it into
        abort_and_upgrad_lock) so that LOCK_open never is released
        between remove_table_from_cache and
        close_data_files_and_morph_locks.
      sql/sql_show.cc:
        Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
        concurrent I_S query
        
        Added DEBUG_SYNC for deterministic testing
      5a21306e
  2. 16 Mar, 2010 8 commits
  3. 15 Mar, 2010 1 commit
  4. 14 Mar, 2010 2 commits
    • Staale Smedseng's avatar
      Bug #49829 Many "hides virtual function" warnings with · 0c07d7c4
      Staale Smedseng authored
      SunStudio
            
      SunStudio compilers of late warn about methods that might hide
      methods in base classes due to the use of overloading combined
      with overriding. SunStudio also warns about variables defined
      in local socpe or method arguments that have the same name as
      a member attribute of the class.
            
      This patch renames methods that might hide base class methods,
      to make it easier both for humans and compilers to see what is
      actually called. It also renames variables in local scope.
      
      
      sql/field.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/item_cmpfunc.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/item_create.cc:
        Renaming base class create() to create_func().
      sql/item_create.h:
        Renaming base class create() to create_func().
      sql/protocol.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/sql_profile.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/sql_select.cc:
        Local scope variable or method argument same as class 
        attribute.
      sql/sql_yacc.yy:
        Renaming base class create() to create_func().
      storage/federated/ha_federated.cc:
        Local scope variable or method argument same as class 
        attribute.
      storage/myisammrg/ha_myisammrg.cc:
        Local scope variable or method argument same as class 
        attribute.
      0c07d7c4
    • Davi Arnaut's avatar
      6c5d8911
  5. 13 Mar, 2010 1 commit
  6. 12 Mar, 2010 5 commits
  7. 11 Mar, 2010 5 commits
  8. 10 Mar, 2010 11 commits
    • Martin Hansson's avatar
      Bug#50545: Single table UPDATE IGNORE crashes on · bc0addb3
      Martin Hansson authored
      join view in sql_safe_updates mode. 
      
      This bug was unexpectedly fixed along with bug 
      number 49534. This patch contains only the test
      case.
      bc0addb3
    • Sergey Vojtovich's avatar
    • Sergey Vojtovich's avatar
      An addition to fix for · 41bbf45a
      Sergey Vojtovich authored
      BUG#51342 - more xid crashing
      
      Restore autocommit variable by supplying explicit value.
      
      mysql-test/r/xa.result:
        Restore autocommit variable by supplying explicit value.
      mysql-test/t/xa.test:
        Restore autocommit variable by supplying explicit value.
      41bbf45a
    • Sergey Vojtovich's avatar
      Merge fix for BUG51307 to 5.1-bugteam. · 2841eb94
      Sergey Vojtovich authored
      2841eb94
    • Sergey Vojtovich's avatar
      Merge fix for BUG51342 to 5.1-bugteam. · 425c9ec6
      Sergey Vojtovich authored
      425c9ec6
    • Mattias Jonsson's avatar
      Bug#51830: Incorrect partition pruning on range partition · 61136c1d
      Mattias Jonsson authored
      (regression)
      
      Problem was that partition pruning did not exclude the
      last partition if the range was beyond it
      (i.e. not using MAXVALUE)
      
      Fix was to not include the last partition if the
      partitioning function value was not within the partition
      range.
      
      mysql-test/r/partition_innodb.result:
        Bug#51830: Incorrect partition pruning on range partition
        (regression)
        
        Updated result
      mysql-test/r/partition_pruning.result:
        Bug#51830: Incorrect partition pruning on range partition
        (regression)
        
        Updated result
      mysql-test/t/partition_innodb.test:
        Bug#51830: Incorrect partition pruning on range partition
        (regression)
        
        Added test for pruning in InnoDB, since it does not show
        for MyISAM due to 'Impossible WHERE noticed after reading
        const tables'.
      mysql-test/t/partition_pruning.test:
        Bug#51830: Incorrect partition pruning on range partition
        (regression)
        
        Added test
      sql/sql_partition.cc:
        Bug#51830: Incorrect partition pruning on range partition
        (regression)
        
        Also increase the partition id if not inside the last partition
        (and no MAXVALUE is defined).
        
        Added comments and DBUG_ASSERT.
      61136c1d
    • Sergey Vojtovich's avatar
      Merge fix for BUG51342 to 5.0-bugteam. · 25395164
      Sergey Vojtovich authored
      25395164
    • Sergey Vojtovich's avatar
      BUG#51342 - more xid crashing · ffc0137d
      Sergey Vojtovich authored
      SET autocommit=1 while XA transaction is active may
      cause various side effects, including memory corruption
      and server crash.
      
      The problem is that SET autocommit=1 and further queries
      attempt to commit local transaction, whereas XA transaction
      is still active.
      
      As local and XA transactions are mutually exclusive, this
      patch forbids enabling autocommit mode while XA transaction
      is active.
      
      mysql-test/r/xa.result:
        A test case for BUG#51342.
      mysql-test/t/xa.test:
        A test case for BUG#51342.
      sql/set_var.cc:
        Forbid enabling autocommit mode while XA transaction is
        active.
      ffc0137d
    • Georgi Kodinov's avatar
      merge · 14a14efc
      Georgi Kodinov authored
      14a14efc
    • Georgi Kodinov's avatar
      merge · 1fcc57a1
      Georgi Kodinov authored
      1fcc57a1
    • Georgi Kodinov's avatar
  9. 09 Mar, 2010 1 commit
    • Georgi Kodinov's avatar
      Bug #35250: readline check breaks when doing vpath build · 7668ca4d
      Georgi Kodinov authored
      MySQL uses two source layouts when building : the bzr 
      layout and the source package layout.
      The previous fix for bug 35250 contained 1 change that is
      valid for both modes and a number of changes that are valid
      only for the bzr source layout.
      The important thing was to fix the source package layout.
      And for this the change in configure.in was sufficient.
      It's not trivial (and not requested by this bug) to support 
      VPATH builds from the bzr trees.
      This is why the other changes are reverted and the change to
      fix the VPATH build for source distributions is left intact.
      7668ca4d
  10. 10 Mar, 2010 1 commit
  11. 09 Mar, 2010 2 commits
    • Luis Soares's avatar
      Post-push fix for BUG#51251. · 45a6d5ea
      Luis Soares authored
      The test case added in previous patch missed a RESET MASTER on
      test start up. Without it, showing binary log contents can
      sometimes show spurious entries from previously executed tests,
      ultimately causing test failure - result mismatch.
      
      The test file was added in:
      revid:luis.soares@sun.com-20100224190153-k0bpdx9abe88uoo2
      
      This patch also moves the test case into binlog_innodb_row.test
      file. This way we avoid having yet another test file,
      binlog_row_innodb_truncate.test, whose only purpose is to host
      one test case. This had been actually suggested during original
      patch review, but somehow the binlog_innodb_row was missed when
      searching for a file to host the test case.
      45a6d5ea
    • Davi Arnaut's avatar
      Bug#51770: UNINSTALL PLUGIN requires no privileges · 6de31427
      Davi Arnaut authored
      The problem was that UNINSTALL PLUGIN wasn't performing privilege
      checks before removing a plugin. Any user (including users without 
      any kind of privileges) could uninstall any plugin.
      
      The solution is to verify if the user has the DELETE privilege for
      the mysql.plugin table before uninstalling a plugin.
      
      mysql-test/r/plugin_not_embedded.result:
        Add test case result for Bug#51770.
      mysql-test/t/plugin_not_embedded-master.opt:
        Add example plugin path.
      mysql-test/t/plugin_not_embedded.test:
        Add test case for Bug#51770.
        Skip embedded as test relies on privileges checks.
      6de31427
  12. 12 Mar, 2010 1 commit
    • Sergey Glukhov's avatar
      Bug#41788 mysql_fetch_field returns org_table == table by a view · 8c3e381b
      Sergey Glukhov authored
      The problem is that Item_direct_view_ref which is inherited
      from Item_ident updates orig_table_name and table_name with
      the same values. The fix is introduction of new constructor
      into Item_ident and up which updates orig_table_name and
      table_name separately.
      
      
      mysql-test/r/metadata.result:
        test case
      mysql-test/t/metadata.test:
        test case
      sql/item.cc:
        new constructor which updates
        orig_table_name and table_name
        separately.
      sql/item.h:
        new constructor which updates
        orig_table_name and table_name
        separately.
      sql/table.cc:
        used new constructor
      8c3e381b
  13. 09 Mar, 2010 1 commit
    • Georgi Kodinov's avatar
      Bug #41057: mysql_update fails FATAL ERROR: Failed to create temporary file for defaults · c469a59b
      Georgi Kodinov authored
      mysql_upgrade was passing an non-initialized non-null tmpdir to create_temp_file() if no 
      --tmpdir was specified. This prevents create_temp_file() from taking the system 
      temporary file path and as a result mysql_upgrade was trying to open a file in a 
      directory that it may not have write access to.
      Fixed by making sure mysql_upgrade will pass a zero length temp dir string to 
      create_temp_file() if no --tmpdir is specified.
      c469a59b