1. 29 Jun, 2010 1 commit
    • Konstantin Osipov's avatar
      A fix for Bug#54811 "Assert in mysql_lock_have_duplicate()". · 52f361ec
      Konstantin Osipov authored
      Remove mysql_lock_have_duplicate(), since now we always
      have TABLE_LIST objects for MyISAMMRG children
      in lex->query_tables and keep it till the end of the
      statement (sub-statement).
      
      
      mysql-test/r/merge.result:
        Update results (Bug#54811).
      mysql-test/t/merge-big.test:
        Update to new wait state.
      mysql-test/t/merge.test:
        Add a test case for Bug#54811.
      sql/lock.cc:
        Remove a function that is now unused.
      sql/lock.h:
        Remove a function that is now unused.
      sql/sql_base.cc:
        Don't try to search for duplicate table among THR_LOCK objects, TABLE_LIST list contains all used tables.
      52f361ec
  2. 26 Jun, 2010 1 commit
    • Jon Olav Hauglid's avatar
      Bug #49891 View DDL breaks REPEATABLE READ · 349b34b3
      Jon Olav Hauglid authored
      The problem was that if a query accessing a view was blocked due to
      conflicting locks on tables in the view definition, it would be possible
      for a different connection to alter the view definition before the view
      query completed. When the view query later resumed, it used the old view
      definition. This meant that if the view query was later repeated inside
      the same transaction, the two executions of the query would give different
      results, thus breaking repeatable read. (The first query used the old
      view definition, the second used the new view definition).
      
      This bug is no longer repeatable with the recent changes to the metadata
      locking subsystem (revno: 3040). The view query will no longer back-off
      and release the lock on the view definiton. Instead it will wait for
      the conflicting lock(s) to go away while keeping the view definition lock.
      This means that it is no longer possible for a concurrent connection to
      alter the view definition. Instead, any such attempt will be blocked.
      
      In the case from the bug report where the same view query was executed
      twice inside the same transaction, any ALTER VIEW from other connections
      will now be blocked until the transaction has completed (or aborted).
      The view queries will therefore use the same view definition and we will
      have repeatable read.
      
      Test case added to innodb_mysql_lock.test.
      This patch contains no code changes.
      349b34b3
  3. 25 Jun, 2010 2 commits
  4. 23 Jun, 2010 3 commits
    • Jon Olav Hauglid's avatar
      Backport from mysql-6.0-codebase of: · a1c6a39a
      Jon Olav Hauglid authored
      ------------------------------------------------------------
      revno: 3672
      committer: lars-erik.bjork@sun.com
      branch nick: 48067-mysql-6.0-codebase-bugfixing
      timestamp: Mon 2009-10-26 13:51:43 +0100
      message:
        This is a patch for bug#48067
        "A temp table with the same name as an existing table, makes drop
        database fail"
              
        When dropping the database, mysql_rm_known_files() reads the contents
        of the database directory, and creates a TABLE_LIST object, for each
        .frm file encountered. Temporary tables, however, are not associated 
        with any .frm file.
              
        The list of tables to drop are passed to mysql_rm_table_part2().
        This method prefers temporary tables over regular tables, so if
        there is a temporary table with the same name as a regular, the
        temporary is removed, leaving the regular table intact.
        Regular tables are only deleted if there are no temporary tables
        with the same name.
              
        This fix ensures, that for all TABLE_LIST objects that are created
        by mysql_rm_known_files(), 'open_type' is set to 'OT_BASE_ONLY', to
        indicate that this is a regular table. In all cases in
        mysql_rm_table_part2() where we prefer a temporary table to a
        non-temporary table, we chek if 'open_type' equals 'OT_BASE_ONLY'.
      
      
      mysql-test/r/temp_table.result:
        The expected result of the test.
      mysql-test/t/temp_table.test:
        Test based on the bug report.
      sql/sql_db.cc:
        For all TABLE_LIST objects that are created by mysql_rm_known_files(),
        'open_type' is set to 'OT_BASE_ONLY', to indicate that these are
        regular tables.
      sql/sql_table.cc:
        Check if 'open_type' is set to 'OT_BASE_ONLY, every place a temporary table is
        preferred to a non-temporary table.
      a1c6a39a
    • sunanda's avatar
      Updated the version number · f54b3042
      sunanda authored
      f54b3042
    • sunanda's avatar
  5. 22 Jun, 2010 2 commits
  6. 21 Jun, 2010 3 commits
  7. 20 Jun, 2010 1 commit
    • Magne Mahre's avatar
      Post-push fixup for WL#5349 · 240afacf
      Magne Mahre authored
      InnoDB came in a new version "simultanously" with the
      commit.  This patch is a minor change to the new innodb
      regression test suite. 
      240afacf
  8. 18 Jun, 2010 3 commits
    • Konstantin Osipov's avatar
      A new implementation for the TABLE_SHARE cache in MDL · 429454f7
      Konstantin Osipov authored
      subsystem. Fix a number of caveates that the previous
      implementation suffered from, including unprotected
      access to shared data and lax resource accounting
      (share->ref_count) that could lead to deadlocks.
      
      The new implementation still suffers from a number
      of potential deadlocks in some edge cases, and this is 
      still not enabled by default. Especially since performance
      testing has shown that it gives only marginable (not even 
      exceeding measuring accuracy) improvements.
      
      @todo: 
      - Remove calls to close_cached_tables() with REFRESH_FAST,
      and have_lock, because they break the MDL cache. 
      - rework FLUSH TABLES <list> to not use close_cached_tables()
      - make sure that whenever we set TABLE_SHARE::version to
      0 we free MDL cache references to it.
      
      
      sql/mdl.cc:
        We may cache references to TABLE_SHARE objects in 
        MDL_lock objects for tables. Create a separate
        MDL_lock class to represent a table.
      sql/mdl.h:
        Adjust the MDL caching API to avoid races.
      sql/sql_base.cc:
        Move all caching functionality close together.
        Implement a solution for deadlocks caused by 
        close_cached_tables() when MDL cache is enabled (incomplete).
      sql/sql_yacc.yy:
        Adjust FLUSH rule to do the necessary initialization of
        TABLE_LIST elements used in for FLUSH TABLES <list>, and thus
        work OK with flush_mdl_cache() function.
      429454f7
    • Daniel Fischer's avatar
      merge · 073943cd
      Daniel Fischer authored
      073943cd
    • Joerg Bruehe's avatar
      Automerge from parent copy. · e194e983
      Joerg Bruehe authored
      e194e983
  9. 17 Jun, 2010 19 commits
  10. 16 Jun, 2010 3 commits
  11. 15 Jun, 2010 2 commits
    • Joerg Bruehe's avatar
      Fix bug#27072: RPM autostarts the server · 766f6a76
      Joerg Bruehe authored
      This is the fix for 5.5, where the behaviour on both installation
      and upgrade is changed:
      On installation, we do not start the server, to allow automated
      installs (which happen in some indeterminate machine status).
      If the server was stopped when the upgrade begins, we assume the
      administrator is taking manual action, so we do not start the (new)
      server at the end of the upgrade.
      We still install the start/stop script, so it will be started on reboot.
      
      
      support-files/mysql.spec.sh:
        In the "pre" section of the spec file, check the server status, and write
        the result to a file.
        In the "post" section, evaluate the status file, and start the server if
        it was running during status analysis.
        In 5.5, we do *not* start the server if there is no status file (which will happen on first installation, when there is no data directory yet).
      766f6a76
    • Joerg Bruehe's avatar
      Fix bug#27072: RPM autostarts the server · b3eac87c
      Joerg Bruehe authored
      This is the fix for 5.1, where only the behaviour on upgrade is changed:
      If the server was stopped when the upgrade begins, we assume the
      administrator is taking manual action, so we do not start the (new)
      server at the end of the upgrade.
      We still install the start/stop script, so it will be started on reboot.
      
      
      support-files/mysql.spec.sh:
        In the "pre" section of the spec file, check the server status, and write
        the result to a file.
        In the "post" section, evaluate the status file, and start the server if
        it was running during status analysis.
        In 5.1, we start the server if there is no status file (which will happen
        on first installation, when there is no data directory yet).
      b3eac87c