1. 13 Jan, 2013 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-4019. · 7d5c56cb
      Igor Babaev authored
      The bug could cause a crash when several connections needed
      persistent statistics for the same table.
      
      Also added a missing call of set_statistics_for_table() in the code
      of the function mysql_update.
      7d5c56cb
  2. 08 Jan, 2013 2 commits
    • Igor Babaev's avatar
      Merge 5.5 -> mwl248 · 7d9df807
      Igor Babaev authored
      7d9df807
    • Igor Babaev's avatar
      Fixed bug mdev-3979. · 01dca17a
      Igor Babaev authored
      Made allocation of memory for statistical data in a table share to be thread safe.
      This memory is now allocated in a special MEM_ROOT that is created for each
      table share.  
      01dca17a
  3. 05 Jan, 2013 1 commit
  4. 01 Jan, 2013 1 commit
  5. 30 Dec, 2012 1 commit
  6. 28 Dec, 2012 1 commit
    • Elena Stepanova's avatar
      storage_engine tests and upstream engines/* suites went out of sync with... · 2371b6df
      Elena Stepanova authored
      storage_engine tests and upstream engines/* suites went out of sync with current MariaDB code. Reasons:
        - as of 5.5.27, YEAR(2) is deprecated, hence the new warning;
        - MDEV-553 - different error code/message on out-of-range autoincrement;
        - INSERT IGNORE now produces a warning if a duplicate was encountered (change pushed along with MDEV-553)
      
      2371b6df
  7. 14 Dec, 2012 2 commits
    • Igor Babaev's avatar
      Merge 5.5 -> mwl248 · e44253a1
      Igor Babaev authored
      e44253a1
    • Igor Babaev's avatar
      Addressed all remaining issues from the review of the patch · a06224bd
      Igor Babaev authored
      that introduced engine independent persistent statistics.
      In particular:
      - added an enumeration type for possible values of the system
        variable use_stat_tables
      - renamed KEY::real_rec_per_key to KEY::actual_rec_per_key
      - optimized the collection of statistical data for any primary
        key defined only on one column.
        
      a06224bd
  8. 13 Dec, 2012 1 commit
    • Igor Babaev's avatar
      Fixed bug mdev-3891. · 65820439
      Igor Babaev authored
      If a query referenced some system statistical tables, but not all of them,
      then executing an ANALYZE command simultaneously with this query could
      lead to a deadlock.
      The fix prohibited reading statistics from system statistical tables
      for such queries.
      
      Removed the function unlock_tables_n_open_system_tables_for_write()
      as not used anymore.
      Performed some minor refactoring of the code in sql_statistics.cc. 
      65820439
  9. 10 Dec, 2012 1 commit
  10. 08 Dec, 2012 1 commit
    • Igor Babaev's avatar
      Addressed the following issue from the review of the patch for · 2447bc4c
      Igor Babaev authored
      engine-independent statistics.
      When the primary key was dropped or changed statistics on secondary
      indexes for the prefixes that included components of the primary 
      key was not removed from the table mysql.index_stats.
      
      Also fixed: in the some cases when a column was changed statistics
      on the indexes that included this column was not removed from the
      table mysql.index_stats.
      
      Also disabled the test mdev-504 for --ps-protocol.
      2447bc4c
  11. 06 Dec, 2012 2 commits
  12. 21 Dec, 2012 1 commit
  13. 20 Dec, 2012 2 commits
    • Vladislav Vaintroub's avatar
      MDEV-3945 - do not hold LOCK_thread_count when freeing THD. · 21b4fda3
      Vladislav Vaintroub authored
        
      The patch decreases the duration of LOCK_thread_count, so it is not hold during THD destructor and freeing memory.
      This mutex  now only protects the integrity of threads list, when removing THD from it,  and thread_count variable.
        
      The add_to_status() function that updates global status during client disconnect,  is now correctly protected by the LOCK_status mutex.
      
      Benchmark : in a  "non-persistent" sysbench test (oltp_ro with reconnect after each query),  ~ 25% more connects/disconnects were measured
      21b4fda3
    • unknown's avatar
      MDEV-3899 Valgrind warnings (blocks are definitely lost) in filesort on IN... · 1b2692d0
      unknown authored
      MDEV-3899  Valgrind warnings (blocks are definitely lost) in filesort on IN subquery with SUM and DISTINCT
        
      Analysys:
      In the beginning of JOIN::cleanup there is code that is supposed to
      free all filesort buffers. The code assumes that the table being sorted
      is the first non-constant table. To get this table it calls:
      first_top_level_tab(this, WITHOUT_CONST_TABLES)
        
      However, first_top_level_tab() instead returned the wrong table - the first
      one in the plan, instead of the first non-constant table. There is no other
      place outside filesort() where sort buffers may be freed. As a result, the
      sort buffer was not freed, and there was a memory leak.
        
      Solution:
      Change first_top_level_tab(), to test for WITH_CONST_TABLES instead of
      WITHOUT_CONST_TABLES.
      1b2692d0
  14. 19 Dec, 2012 1 commit
    • Michael Widenius's avatar
      Fixed some compiler warnings · 35b60208
      Michael Widenius authored
      client/mysqldump.c:
        Removed compiler warning
      extra/yassl/taocrypt/include/pwdbased.hpp:
        Removed compiler warning (iterations is always unsigned)
      support-files/compiler_warnings.supp:
        Ignore warnings from groff
      35b60208
  15. 18 Dec, 2012 1 commit
  16. 17 Dec, 2012 2 commits
    • Michael Widenius's avatar
      Fixed the CREATE TABLE IF EXIST generates warnings instead of errors · 2dbce3d0
      Michael Widenius authored
      mysql-test/r/create.result:
        Updated test results
      mysql-test/t/create.test:
        Updated test
      sql/sql_base.cc:
        Use push_internal_handler/pop_internal_handler to avoid errors & warnings instead of clear_error
        Give a warnings instead of an error for CREATE TABLE IF EXISTS
      sql/sql_parse.cc:
        Check if we failed because of table exists (can only happen from create)
      sql/sql_table.cc:
        Check if we failed because of table exists (can only happen from create)
      2dbce3d0
    • unknown's avatar
      MDEV-3818: Query against view over IS tables worse than equivalent query without view · d7a01487
      unknown authored
      Analysis:
      The reason for the suboptimal plan when querying IS tables through a view
      was that the view columns that participate in an equality are wrapped by
      an Item_direct_view_ref and were not recognized as being direct column
      references.
      
      Solution:
      Use the original Item_field objects via the real_item() method.
      d7a01487
  17. 16 Dec, 2012 4 commits
  18. 14 Dec, 2012 1 commit
  19. 06 Dec, 2012 1 commit
    • Igor Babaev's avatar
      Addressed the following issues from the review of the patch: · dd119466
      Igor Babaev authored
      1. The PERSISTENT FOR clause of the ANALYZE command overrides
      the setting of the system variable use_stat_tables: 
      with this clause ANALYZE unconditionally collects persistent
      statistics.
      2. ANALYZE collects persistent statistics only for tables of
      the USER category. So it never collects persistent statistics
      for system tables.  
      dd119466
  20. 05 Dec, 2012 4 commits
    • Igor Babaev's avatar
      Adjusted results for a test. · 81563081
      Igor Babaev authored
      The adjustment was supposed to be done in the previous commit.
      81563081
    • Igor Babaev's avatar
      Changed the names of the system tables for statistical data: · b1101325
      Igor Babaev authored
        table_stat  -> table_stats
        column_stat -> column_stats
        index_stat  -> index_stats
      to be in line with the names of innodb statistical tables 
      from mysql-5.6: innodb_table_stats and innodb_index_stats.
      b1101325
    • Igor Babaev's avatar
      Merge 5.5->mwl248 · f8bfb65b
      Igor Babaev authored
      f8bfb65b
    • Igor Babaev's avatar
      Fixed bug mdev-3888. · 5e345281
      Igor Babaev authored
      When inserting a record with update on duplicate keys the server calls
      the ha_index_read_idx_map handler function to look for the record
      that violates unique key constraints. The third parameter of this call
      should mark only the base components of the index where the server is
      searched for the record. Possible hidden components of the primary key
      are to be unmarked.
      5e345281
  21. 01 Dec, 2012 2 commits
  22. 27 Nov, 2012 3 commits
  23. 26 Nov, 2012 3 commits
  24. 22 Nov, 2012 1 commit