1. 08 Dec, 2009 1 commit
    • Magne Mahre's avatar
      Bug#35589 SET PASSWORD caused a crash · 4ad324db
      Magne Mahre authored
      Bug#35591 FLUSH PRIVILEGES caused a crash
      
      A race condition on the privilege hash tables (proc_priv_hash
      and func_priv_hash) caused one thread to try to delete elements
      that had already been deleted by another thread.
      
      The bug was caused by reading and saving the pointers to 
      the hash tables outside mutex protection.  This led to an
      inconsistency where a thread copied a pointer to a hash,
      another thread did the same, the first thread then deleted
      the hash, and the second then crashed when it in turn tried to
      delete the deleted hash.
      
      The fix is to ensure that operations on the shared hash structures
      happens under mutex protection (moving the locking up a little)
      
      
      4ad324db
  2. 07 Dec, 2009 2 commits
    • He Zhenxing's avatar
      Auto merge · 8ec8b076
      He Zhenxing authored
      8ec8b076
    • Alexander Barkov's avatar
      Bug#47756 Setting 2byte collation ID with 'set names' crashes the server · 6e7cffac
      Alexander Barkov authored
      The problem is not actually related to 2byte collation IDs.
      The same crash happens if you change the collation ID in
      mysql-test/str_data/Index.xml to a value smaller than 256.
      
      Crash happened in SQL parser, because the "ident_map" and "state_map"
      arrays were not initialized in loadable utf8 collations.
      
      Fix: adding proper initialization of the "ident_map" and "state_map"
      members for loadable utf8 collations.
      6e7cffac
  3. 05 Dec, 2009 2 commits
  4. 04 Dec, 2009 9 commits
  5. 03 Dec, 2009 2 commits
  6. 02 Dec, 2009 6 commits
  7. 01 Dec, 2009 6 commits
    • Evgeny Potemkin's avatar
      Bug#33546: Slowdown on re-evaluation of constant expressions. · ec1e4aa6
      Evgeny Potemkin authored
            
      Constant expressions in WHERE/HAVING/ON clauses aren't cached and evaluated
      for each row. This causes slowdown of query execution especially if constant
      UDF/SP function are used.
            
      Now WHERE/HAVING/ON expressions are analyzed in the top-bottom direction with
      help of the compile function. When analyzer meets a constant item it
      sets a flag for the tree transformer to cache the item and doesn't allow tree
      walker to go deeper. Thus, the topmost item of a constant expression if
      cached. This is done after all other optimizations were applied to
      WHERE/HAVING/ON expressions
            
      A helper function called cache_const_exprs is added to the JOIN class.
      It calls compile method with caching analyzer and transformer on WHERE,
      HAVING, ON expressions if they're present.
      The cache_const_expr_analyzer and cache_const_expr_transformer functions are
      added to the Item class. The first one check if the item can be cached and
      the second caches it if so.
      A new Item_cache_datetime class is derived from the Item_cache class.
      It caches both int and string values of the underlying item independently to
      avoid DATETIME aware int-to-string conversion. Thus it completely relies on
      the ability of the underlying item to correctly convert DATETIME value from
      int to string and vice versa.
      
      
      mysql-test/r/func_like.result:
        A test case result is corrected after fixing bug#33546.
      mysql-test/r/func_time.result:
        A test case result is corrected after fixing bug#33546.
      mysql-test/r/select.result:
        Added a test case for the bug#33546.
      mysql-test/r/subselect.result:
        A test case result is corrected after fixing bug#33546.
      mysql-test/r/udf.result:
        Added a test case for the bug#33546.
      mysql-test/t/select.test:
        Added a test case for the bug#33546.
      mysql-test/t/udf.test:
        Added a test case for the bug#33546.
      sql/item.cc:
        Bug#33546: Slowdown on re-evaluation of constant expressions.
        The cache_const_expr_analyzer and cache_const_expr_transformer functions are
        added to the Item class. The first one check if the item can be cached and
        the second caches it if so.
        Item_cache_datetime class implementation is added.
      sql/item.h:
        Bug#33546: Slowdown on re-evaluation of constant expressions.
        Item_ref and Item_cache classes now returns basic_const_item
        from underlying item.
        The cache_const_expr_analyzer and cache_const_expr_transformer functions are
        added to the Item class.
      sql/sql_select.cc:
        Bug#33546: Slowdown on re-evaluation of constant expressions.
                
        A helper function called cache_const_exprs is added to the JOIN class.
        It calls compile method with caching analyzer and transformer on WHERE,
        HAVING, ON expressions if they're present.
      sql/sql_select.h:
        Bug#33546: Slowdown on re-evaluation of constant expressions.
        A helper function called cache_const_exprs is added to the JOIN class.
      ec1e4aa6
    • Evgeny Potemkin's avatar
      Auto-merged fix for the bug#34384. · e901b910
      Evgeny Potemkin authored
      e901b910
    • Andrei Elkin's avatar
      Manual resolving for the following files · 92a09678
      Andrei Elkin authored
      Text conflict in mysql-test/collections/default.experimental
      Text conflict in mysql-test/r/show_check.result
      Text conflict in mysql-test/r/sp-code.result
      Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result
      Text conflict in mysql-test/suite/rpl/t/disabled.def
      Text conflict in mysql-test/t/show_check.test
      Text conflict in mysys/my_delete.c
      Text conflict in sql/item.h
      Text conflict in sql/item_cmpfunc.h
      Text conflict in sql/log.cc
      Text conflict in sql/mysqld.cc
      Text conflict in sql/repl_failsafe.cc
      Text conflict in sql/slave.cc
      Text conflict in sql/sql_parse.cc
      Text conflict in sql/sql_table.cc
      Text conflict in sql/sql_yacc.yy
      Text conflict in storage/myisam/ha_myisam.cc
      
      Corrected results for
       stm_auto_increment_bug33029.reject      2009-12-01
      		20:01:49.000000000 +0300
             <andrei> @@ -42,9 +42,6 @@
             <andrei>  RETURN i;
             <andrei>  END//
             <andrei>  CALL p1();
             <andrei> -Warnings:
             <andrei> -Note   1592    Statement may not be safe to log in statement
      		format.
             <andrei> -Note   1592    Statement may not be safe to log in statement
      		format.
      
      There should be indeed no Note present because there is in fact autoincrement 
      top-level query in sp() that triggers inserting in yet another auto-inc table.
      (todo: alert DaoGang to improve the test).
      92a09678
    • Alexander Nozdrin's avatar
      A patch for Bug#48915 (After having switched off the ipv6 support in OS, · d15ac975
      Alexander Nozdrin authored
      mysqld crashed in network_init()).
      
      The problem was that current_thd was not ready at that point in mysqld life,
      so ER() macro could not be used.
      
      The fix is to use ER_DEFAULT() macro, which is intented for such cases.
      d15ac975
    • Mattias Jonsson's avatar
      merge · 7dd93c37
      Mattias Jonsson authored
      7dd93c37
    • Marc Alff's avatar
      WL#2360 Performance schema · d7462fb7
      Marc Alff authored
      Part 1: Instrumentation interface
      d7462fb7
  8. 30 Nov, 2009 3 commits
  9. 28 Nov, 2009 1 commit
  10. 27 Nov, 2009 3 commits
  11. 30 Nov, 2009 1 commit
    • Tor Didriksen's avatar
      backport of: · 0d0edba0
      Tor Didriksen authored
              ------------------------------------------------------------
              revno: 2617.81.1
              revision-id: tor.didriksen@sun.com-20090924061133-qo02zotz3yypmfpk
              parent: davi.arnaut@sun.com-20090923203724-tvz7x8dauzp686v7
              committer: Tor Didriksen <tor.didriksen@sun.com>
              branch nick: 6.0-codebase-bf-opt
              timestamp: Thu 2009-09-24 08:11:33 +0200
              message:
                Bug#47511 Segmentation fault during cleanup in sql_union (events_bugs.test)
                
      
      
      sql/sql_lex.h:
        Ensure that fields used during cleanup() are always initialized by constructors.
      0d0edba0
  12. 29 Nov, 2009 1 commit
  13. 27 Nov, 2009 3 commits