1. 28 Apr, 2011 1 commit
    • Michael Widenius's avatar
      Added option "AND DISABLE CHECKPOINT" to "FLUSH TABLES WITH READ LOCK" · 6da8ac5f
      Michael Widenius authored
      This makes it possible to do safe multi volume snapshots as long as one snapshots the volume with the transaction logs last.
      
      
      include/mysql_com.h:
        Added REFRESH_CHECKPOINT
      mysql-test/r/flush.result:
        Added test of new FLUSH TABLES syntax + calls to checkpoint_status handler calls
      mysql-test/t/flush.test:
        Added test of new FLUSH TABLES syntax + calls to checkpoint_status handler calls
      sql/handler.cc:
        Added code to call checkpoint_state for all handlertons that supports it
      sql/handler.h:
        Added new checkpoint_state() handlerton call to temporarly disable checkpoints.
      sql/lex.h:
        Added CHECKPOINT keyword
      sql/sql_yacc.yy:
        Added support for FLUSH TABLES WITH READ LOCK AND DISABLE CHECKPOINT
      storage/maria/ha_maria.cc:
        Added handlerton call to disable checkpoints.
      storage/maria/ma_checkpoint.c:
        Don't do checkpoint if checkpoints are disabled.
      storage/maria/ma_static.c:
        Added maria_checkpoint_disabled
      storage/maria/maria_def.h:
        Added maria_checkpoint_disabled
      storage/xtradb/handler/ha_innodb.cc:
        Added handlerton call to disable checkpoints.
      storage/xtradb/include/log0log.h:
        Added option to log_checkpoint() to allow one to ignore not critical checkpoints during the time checkpoints are disabled.
      storage/xtradb/log/log0log.c:
        Added code to allow one to disable checkpoints during a FLUSH TABLES ... DISABLE CHECKPOINT
        This was done by adding a new argument to log_checkpoint() which tells us when the checkpoint is called by srv_master_thread (which are safe to ignore)
      storage/xtradb/srv/srv0srv.c:
        Tell log_checkpoint() that checkpoints from srv_master_thread() are safe to ignore (will just delay recovery time a bit).
      6da8ac5f
  2. 27 Apr, 2011 2 commits
    • Igor Babaev's avatar
      Merge · 24edac22
      Igor Babaev authored
      24edac22
    • Igor Babaev's avatar
      Fixed LP bugs #717577, #724942. · 8d9dd21d
      Igor Babaev authored
      Both these two bugs happened due to the following problem.
      When a view column is referenced in the query an Item_direct_view_ref
      object is created that is refers to the Item_field for the column.
      All references to the same view column refer to the same Item_field.
      Different references can belong to different AND/OR levels and,
      as a result, can be included in different Item_equal object.
      These Item_equal objects may include different constant objects.
      If these constant objects are substituted for the Item_field created
      for a view column we have a conflict situation when the second
      substitution annuls the first substitution. This leads to
      wrong result sets returned by the query. Bug #724942 demonstrates
      such an erroneous behaviour.
      Test case of the bug #717577 produces wrong result sets because best
      equal fields of the multiple equalities built for different OR levels
      of the WHERE condition differs. The subsitution for the best equal field
      in the second OR branch overwrites the the substitution made for the
      first branch.
      
      To avoid such conflicts we have to substitute for the references
      to the view columns rather than for the underlying field items.
      To make such substitutions possible we have to include into
      multiple equalities references to view columns rather than 
      field items created for such columns.
      
      This patch modifies the Item_equal class to include references
      to view columns into multiple equality objects. It also performs
      a clean up of the class methods and adds more comments. The methods
      of the Item_direct_view_ref class that assist substitutions for
      references to view columns has been also added by this patch.
      8d9dd21d
  3. 20 Apr, 2011 1 commit
    • Igor Babaev's avatar
      Fixed LP bug #752353. · 79439d9a
      Igor Babaev authored
      In some cases the field max_part_no of the SEL_ARG structure
      was not initialized. That triggered a Valgrind complain.
      79439d9a
  4. 19 Apr, 2011 1 commit
    • Sergei Golubchik's avatar
      lp:730035 Handlersocket does not load · b315c62b
      Sergei Golubchik authored
      -fimplicit-termplates must be in CXXFLAGS not in handlersocket_la_CXXFLAGS.
      otehrwise automake puts it in the command line too early to override
      global -fno-implicit-templates
      b315c62b
  5. 14 Apr, 2011 2 commits
  6. 12 Apr, 2011 1 commit
  7. 11 Apr, 2011 2 commits
  8. 08 Apr, 2011 5 commits
  9. 07 Apr, 2011 6 commits
  10. 04 Apr, 2011 4 commits
  11. 03 Apr, 2011 3 commits
  12. 02 Apr, 2011 1 commit
    • Sergey Petrunya's avatar
      Make EXPLAIN better at displaying MRR/BKA: · 997445bc
      Sergey Petrunya authored
      - "Using MRR" is no longer shown with range access.
      - Instead, both range and BKA accesses will show one of the following:
        = "Rowid-ordered scan"
        = "Key-ordered scan"
        = "Key-ordered Rowid-ordered scan"
      depending on whether DS-MRR implementation will do scan keys in order, rowids in order,
      or both.
      - The patch also introduces a way for other storage engines/MRR implementations to
        pass information to EXPLAIN output about the properties of employed MRR scans.
      997445bc
  13. 01 Apr, 2011 4 commits
  14. 31 Mar, 2011 5 commits
    • Michael Widenius's avatar
      Automatic merge · ff650ab0
      Michael Widenius authored
      ff650ab0
    • Michael Widenius's avatar
      Fixed unlikely reference to freed memory in item->print(). · fc595325
      Michael Widenius authored
      
      sql/item.cc:
        If a item_ref is referenced by name, we have to reset it's ref in item_ref::cleanup() as the reference may be to a memory that is freed.
        This happens at least when you have 'HAVING MAX()' in a sub query and you execute 'cond_having->print()' which tries to access items before fix fields.
      sql/item.h:
        Added 'reference_trough_name' as a marker for Item_ref that needs to have ref reset during cleanup
      fc595325
    • unknown's avatar
      Merge MWL#116 after-review fixes. · 92dfbd42
      unknown authored
      92dfbd42
    • Michael Widenius's avatar
      Fixed all BUILD scripts to use g++ instead of gcc for linking · 1ee94dc2
      Michael Widenius authored
      Fixed memory leak from HEAP tables that was not deleted properly
      
      
      BUILD/compile-alpha-ccc:
        Use g++ instead of gcc for linking
      BUILD/compile-alpha-debug:
        Use g++ instead of gcc for linking
      BUILD/compile-pentium-pgcc:
        Use g++ instead of gcc for linking
      BUILD/compile-solaris-sparc:
        Use g++ instead of gcc for linking
      BUILD/compile-solaris-sparc-debug:
        Use g++ instead of gcc for linking
      BUILD/compile-solaris-sparc-purify:
        Use g++ instead of gcc for linking
      sql/item.cc:
        Safety fixes for expr_cache
        Call Item_result:field::cleanup() in Item_cache_wrapper::cleanup()
        More DBUG_PRINT
      sql/sql_base.cc:
        Simple optimization for setup_wild
        More DBUG_PRINT
      sql/sql_expression_cache.cc:
        Added header
        Removed not needed initialization
      sql/sql_lex.cc:
        More DBUG_PRINT
      sql/sql_select.cc:
        More DBUG_PRINT
        Fixed memory leak from HEAP tables that was not deleted properly
      storage/heap/hp_create.c:
        More DBUG_PRINT
      1ee94dc2
    • unknown's avatar
      MWL#116: After-review fixes. · bc9f6021
      unknown authored
      bc9f6021
  15. 30 Mar, 2011 2 commits
    • Vladislav Vaintroub's avatar
      merge LP BUG#68606 · f2f5fd36
      Vladislav Vaintroub authored
      f2f5fd36
    • Vladislav Vaintroub's avatar
      LP686006 : maria recovery tests fail. · 1d8cfe3c
      Vladislav Vaintroub authored
      All failing cases were attempts to use connection after
      the server was brought down and restarted. Connections 
      used client reconnect option.
      
      The reason for failures is the behavior of sockets on Windows:
      for a short period after crash (short enough to make the error 
      not reproducible under debugger), write to socket on client
      side would succeed but subsequent read would fail. 
      
      MYSQL_OPT_RECONNECT does not really help in this case ,
      because  in the case given here ,as  mysql_real_query() 
      (which can handle reconnect option)  succeeds and 
      mysql_read_results() (can't handle reconnect) fails.
      
      The fix is adding --include wait_until_connected_again.inc to 
      appropriate places in test. This ensures that read errors are 
      caught and connection is recreated.
      1d8cfe3c