An error occurred fetching the project authors.
  1. 29 Oct, 2009 1 commit
    • marko's avatar
      branches/zip: Fix corruption of buf_pool->LRU_old and improve debug assertions. · d5316754
      marko authored
      This was reported as Issue #381.
      
      buf_page_set_old(): Assert that blocks may only be set old if
      buf_pool->LRU_old is initialized and buf_pool->LRU_old_len is nonzero.
      Assert that buf_pool->LRU_old points to the block at the old/new boundary.
      
      buf_LRU_old_adjust_len(): Invoke buf_page_set_old() after adjusting
      buf_pool->LRU_old and buf_pool->LRU_old_len, in order not to violate
      the added assertions.
      
      buf_LRU_old_init(): Replace buf_page_set_old() with a direct
      assignment to bpage->old, because these loops that initialize all the
      blocks would temporarily violate the assertions about
      buf_pool->LRU_old.
      
      buf_LRU_remove_block(): When setting buf_pool->LRU_old = NULL, also
      clear all bpage->old flags and set buf_pool->LRU_old_len = 0.
      
      buf_LRU_add_block_to_end_low(), buf_LRU_add_block_low(): Move the
      buf_page_set_old() call later in order not to violate the debug
      assertions.  If buf_pool->LRU_old is NULL, set old=FALSE.
      
      buf_LRU_free_block(): Replace the UNIV_LRU_DEBUG assertion with a
      dummy buf_page_set_old() call that performs more thorough checks.
      
      buf_LRU_validate(): Do not tolerate garbage in buf_pool->LRU_old_len
      even if buf_pool->LRU_old is NULL.  Check that bpage->old is monotonic.
      
      buf_relocate(): Make the UNIV_LRU_DEBUG checks stricter.
      
      buf0buf.h: Revise the documentation of buf_page_t::old and
      buf_pool_t::LRU_old_len.
      d5316754
  2. 28 Oct, 2009 1 commit
  3. 14 Sep, 2009 1 commit
    • inaam's avatar
      branches/zip rb://159 · 75a00e01
      inaam authored
      In case of pages that are not made young the counter is incremented
      only when the page in question is 'old'. In case of pages that are
      made young the counter is incremented in case of all pages. For apple
      to apple comparison this patch changes the 'young-making' counter to
      consider only 'old' blocks.
      
      Approved by: Marko
      75a00e01
  4. 09 Sep, 2009 1 commit
    • vasil's avatar
      branches/zip: · 534560bf
      vasil authored
      Fix a bug in manipulating the variable innodb_old_blocks_pct:
      
      for any value assigned it got that value -1, except for 75. When
      assigned 75, it got 75.
      
        mysql> set global innodb_old_blocks_pct=15;
        Query OK, 0 rows affected (0.00 sec)
        
        mysql> show variables like 'innodb_old_blocks_pct';
        +-----------------------+-------+
        | Variable_name         | Value |
        +-----------------------+-------+
        | innodb_old_blocks_pct | 14    | 
        +-----------------------+-------+
        1 row in set (0.00 sec)
        
        mysql> set global innodb_old_blocks_pct=75;
        Query OK, 0 rows affected (0.00 sec)
        
        mysql> show variables like 'innodb_old_blocks_pct';
        +-----------------------+-------+
        | Variable_name         | Value |
        +-----------------------+-------+
        | innodb_old_blocks_pct | 75    | 
        +-----------------------+-------+
      
      After the fix it gets exactly what was assigned.
      
      Approved by:	Marko (via IM)
      534560bf
  5. 08 Sep, 2009 1 commit
  6. 27 Aug, 2009 2 commits
    • inaam's avatar
      branches/zip rb://147 · b7a0c6ac
      inaam authored
      Done away with following two status variables:
      
      innodb_buffer_pool_read_ahead_rnd
      innodb_buffer_pool_read_ahead_seq
      
      Introduced two new status variables:
      innodb_buffer_pool_read_ahead = number of pages read as part of
      readahead since server startup
      innodb_buffer_pool_read_ahead_evicted = number of pages that are read
      in as readahead but were evicted before ever being accessed since
      server startup i.e.: a measure of how badly our readahead is
      performing
      
      SHOW INNODB STATUS will show two extra numbers in buffer pool section:
      pages read ahead/sec and pages evicted without access/sec
      
      Approved by: Marko
      b7a0c6ac
    • marko's avatar
      branches/zip: Replace the constant 3/8 ratio that controls the LRU_old · 716e0769
      marko authored
      size with the settable global variable innodb_old_blocks_pct. The
      minimum and maximum values are 5 and 95 per cent, respectively. The
      default is 100*3/8, in line with the old behavior.
      
      ut_time_ms(): New utility function, to return the current time in
      milliseconds. TODO: Is there a more efficient timestamp function, such
      as rdtsc divided by a power of two?
      
      buf_LRU_old_threshold_ms: New variable, corresponding to
      innodb_old_blocks_time. The value 0 is the default behaviour: no
      timeout before making blocks 'new'.
      
      bpage->accessed, bpage->LRU_position, buf_pool->ulint_clock: Remove.
      
      bpage->access_time: New field, replacing bpage->accessed. Protected by
      buf_pool_mutex instead of bpage->mutex. Updated when a page is created
      or accessed the first time in the buffer pool.
      
      buf_LRU_old_ratio, innobase_old_blocks_pct: New variables,
      corresponding to innodb_old_blocks_pct
      
      buf_LRU_old_ratio_update(), innobase_old_blocks_pct_update(): Update
      functions for buf_LRU_old_ratio, innobase_old_blocks_pct.
      
      buf_page_peek_if_too_old(): Compare ut_time_ms() to bpage->access_time
      if buf_LRU_old_threshold_ms && bpage->old.  Else observe
      buf_LRU_old_ratio and bpage->freed_page_clock.
      
      buf_pool_t: Add n_pages_made_young, n_pages_not_made_young,
      n_pages_made_young_old, n_pages_not_made_young, for statistics.
      
      buf_print(): Display buf_pool->n_pages_made_young,
      buf_pool->n_pages_not_made_young.  This function is only for crash
      diagnostics.
      
      buf_print_io(): Display buf_pool->LRU_old_len and quantities derived
      from buf_pool->n_pages_made_young, buf_pool->n_pages_not_made_young.
      This function is invoked by SHOW ENGINE INNODB STATUS.
      
      rb://129 approved by Heikki Tuuri.  This addresses Bug #45015.
      716e0769
  7. 05 Jun, 2009 1 commit
    • vasil's avatar
      branches/zip: · b100a45f
      vasil authored
      Fix Mantis Issue#244 fix bug in linear read ahead (no check on access pattern)
      
      The changes are:
      
      1) Take into account access pattern when deciding whether or not to do linear
        read ahead.
      2) Expose a knob innodb_read_ahead_factor = [0-64] default (8), dynamic,
        global to control linear read ahead behvior
      3) Disable random read ahead. Keep the code for now.
      
      Submitted by:	Inaam (rb://122)
      Approved by:	Heikki (rb://122)
      b100a45f
  8. 26 May, 2009 1 commit
  9. 25 May, 2009 3 commits
    • marko's avatar
      branches/zip: Add @file comments, and convert decorative · 5727d980
      marko authored
      /*********************************
      comments to Doxygen /** style like this:
      /*****************************//**
      
      This conversion was performed by the following command:
      
      perl -i -e 'while(<ARGV>){if (m|^/\*{30}\**$|) {
      s|\*{4}$|//**| if ++$com>1; $_ .= "\@file $ARGV\n" if $com==2}
      print; if(eof){$.=0;undef $com}}' */*[ch] include/univ.i
      5727d980
    • marko's avatar
    • marko's avatar
      branches/zip: Convert the function comments to Doxygen format. · 8ab5601e
      marko authored
      This patch was created by running the following commands:
      
      for i in */*[ch]; do doxygenify.pl $i; done
      perl -i -pe 's#\*{3} \*/$#****/#' */*[ch]
      
      where doxygenify.pl is
      https://svn.innodb.com/svn/misc/trunk/tools/doxygenify.pl r510
      
      Verified the consistency as follows:
      
      (0) not too many /* in: */ or /* out: */ comments left in the code:
      grep -l '/\*\s*\(in\|out\)[,:/]' */*[ch]
      
      (1) no difference when ignoring blank lines, after stripping all
      C90-style /* comments */, including multi-line ones, before and after
      applying this patch:
      
      perl -i -e 'undef $/;while(<ARGV>){s#/\*(.*?)\*/##gs;print}' */*[ch]
      diff -I'^\s*$' --exclude .svn -ru TREE1 TREE2
      
      (2) after stripping @return comments and !<, generated a diff and omitted
      the hunks where /* out: */ function return comments were removed:
      
      perl -i -e'undef $/;while(<ARGV>){s#!<##g;s#\n\@return\t.*?\*/# \*/#gs;print}'\
       */*[ch]
      svn diff|
      perl -e 'undef $/;$_=<>;s#\n-\s*/\* out[:,]([^\n]*?)(\n-[^\n]*?)*\*/##gs;print'
      
      Some unintended changes were left.  These will be removed in a
      subsequent patch.
      8ab5601e
  10. 19 May, 2009 1 commit
  11. 18 Mar, 2009 1 commit
  12. 16 Mar, 2009 1 commit
  13. 17 Feb, 2009 1 commit
    • vasil's avatar
      branches/zip: · 27ef516b
      vasil authored
      * Remove old Innobase copyright lines from C source files
      * Add a reference to the GPLv2 license as recommended by the lawyers
      at Oracle Legal
      
      [Step 1/28]
      27ef516b
  14. 27 Jan, 2009 1 commit
  15. 15 Jan, 2009 2 commits
  16. 13 Jan, 2009 1 commit
  17. 17 Dec, 2008 1 commit
  18. 21 Nov, 2008 2 commits
  19. 19 Nov, 2008 1 commit
  20. 09 Oct, 2008 1 commit
    • marko's avatar
      branches/zip: Merge revisions 2722:2744 from branches/5.1: · c5f2c51d
      marko authored
        ------------------------------------------------------------------------
        r2742 | inaam | 2008-10-08 22:02:15 +0300 (Wed, 08 Oct 2008) | 11 lines
      
        branches/5.1:
      
        Fix Bug#39939 DROP TABLE/DISCARD TABLESPACE takes long time in
        buf_LRU_invalidate_tablespace()
      
        Improve implementation of buf_LRU_invalidate_tablespace by attempting
        hash index drop in batches instead of doing it one by one.
      
        Reviewed by: Heikki, Sunny, Marko
        Approved by: Heikki
        ------------------------------------------------------------------------
        r2744 | marko | 2008-10-09 10:53:09 +0300 (Thu, 09 Oct 2008) | 5 lines
      
        branches/5.1: ha_innobase::delete_all_rows(): In response to a user asking
        <http://forums.innodb.com/read.php?4,215,215> why DELETE FROM t is not
        mapped to TRUNCATE TABLE t as it is in MyISAM, note in a comment that
        DELETE is transactional while TRUNCATE is not.
        ------------------------------------------------------------------------
      c5f2c51d
  21. 18 Sep, 2008 1 commit
  22. 22 Aug, 2008 1 commit
  23. 18 Aug, 2008 2 commits
    • marko's avatar
      branches/zip: Introduce UNIV_LRU_DEBUG for debugging the LRU buffer pool · 3d3bd987
      marko authored
      cache, especially buf_pool->LRU_old and bpage->old.
      
      buf_LRU_old_adjust_len(), buf_LRU_remove_block(): Check that blocks in
      buf_pool->LRU_old have the "old" flag set and the blocks preceding
      buf_pool->LRU_old have the "old" flag clear.
      
      buf_LRU_add_block_low(), buf_relocate(): Check that buf_pool->LRU_old
      is the first block in the LRU list whose "old" flag is set.
      
      buf_LRU_free_block(): When replacing a control block in the LRU list
      with a control block for a compressed page, assert that the "old"
      flags in the neighboring LRU list entries grow monotonically.
      
      buf_page_set_old(): Assert that the "old" flags in the neighboring LRU
      list entries grow monotonically.
      3d3bd987
    • marko's avatar
      branches/zip: buf_page_set_old(): Add the assertion ut_ad(bpage->in_LRU_list). · 81ec8249
      marko authored
      Adjust the callers where necessary:
      buf_LRU_add_block_to_end_low() and buf_LRU_add_block_low().
      81ec8249
  24. 08 Aug, 2008 1 commit
    • marko's avatar
      branches/zip: buf_LRU_free_block(): When buf_page_is_old(b), we incremented · c976021e
      marko authored
      buf_pool->LRU_old_len.  However, we forgot to check if buf_pool->LRU_old
      happens to point to b's successor in the LRU list.  If it does, we must
      assign buf_pool->LRU_old = b.  The following invariants hold:
      
      In the LRU list, the "old" flag should grow monotonically, i.e., it is 0
      for the first few items and 1 from thereafter.
      
      If buf_pool->LRU_old != NULL, it must point to the first item with old=1
      in the LRU list, and there must be buf_pool->LRU_old_len old items in the list.
      
      This should fix Mantis issue#50 and issue#68.
      c976021e
  25. 06 Aug, 2008 2 commits
  26. 04 Aug, 2008 1 commit
  27. 03 Mar, 2008 1 commit
    • marko's avatar
      branches/zip: Improve the LRU algorithm with a separate unzip_LRU list of · 7c119c95
      marko authored
      blocks that contains uncompressed and compressed frames.  This patch was
      designed by Heikki and Inaam, implemented by Inaam, and refined and reviewed
      by Marko and Sunny.
      
      buf_buddy_n_frames, buf_buddy_min_n_frames, buf_buddy_max_n_frames: Remove.
      
      buf_page_belongs_to_unzip_LRU(): New predicate:
      bpage->zip.data && buf_page_get_state(bpage) == BUF_BLOCK_FILE_PAGE.
      
      buf_pool_t, buf_block_t: Add the linked list unzip_LRU.  A block in the
      regular LRU list is in unzip_LRU iff buf_page_belongs_to_unzip_LRU() holds.
      
      buf_LRU_free_block(): Add a third return value to refine the case
      "cannot free the block".
      
      buf_LRU_search_and_free_block(): Update the documentation to reflect the
      implementation.
      
      buf_LRU_stat_t, buf_LRU_stat_cur, buf_LRU_stat_sum, buf_LRU_stat_arr[]:
      Statistics for the unzip_LRU algorithm.
      
      buf_LRU_stat_update(): New function: Update the statistics.  Called once
      per second by srv_error_monitor_thread().
      
      buf_LRU_validate(): Validate the unzip_LRU list as well.
      
      buf_LRU_evict_from_unzip_LRU(): New predicate: Use the unzip_LRU before
      falling back to the regular LRU?
      
      buf_LRU_free_from_unzip_LRU_list(), buf_LRU_free_from_common_LRU_list():
      Subfunctions of buf_LRU_search_and_free_block().
      
      buf_LRU_search_and_free_block(): Reimplement.  Try to evict an uncompressed
      page from the unzip_LRU list before falling back to evicting an entire block
      from the common LRU list.
      
      buf_unzip_LRU_remove_block_if_needed(): New function.
      
      buf_unzip_LRU_add_block(): New function: Add a block to the unzip_LRU list.
      7c119c95
  28. 18 Feb, 2008 1 commit
    • marko's avatar
      branches/zip: Minor fixes. · da54bec7
      marko authored
      buf_LRU_old_adjust_len(): Replace a constant ut_ad() with a preprocessor check.
      
      buf_LRU_free_block(): Remove the check for the unlikely case
      buf_pool->LRU_old == prev_b in order to simplify the function.
      The check was implemented as part of r2306.
      da54bec7
  29. 16 Feb, 2008 1 commit
  30. 15 Feb, 2008 1 commit
    • marko's avatar
      branches/zip: buf0lru.c: Minor cleanup. · 17127565
      marko authored
      Use ut_d() in assignments to bpage->in_LRU_list instead of #ifdef UNIV_DEBUG.
      
      buf_LRU_remove_block(): Move an assertion to a more appropriate place.
      17127565
  31. 06 Feb, 2008 1 commit
    • marko's avatar
      branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global · 1d1dc31a
      marko authored
      symbols.  Use it for all definitions of non-static variables and functions.
      
      lexyy.c, make_flex.sh: Declare yylex as UNIV_INTERN, not static.  It is
      referenced from pars0grm.c.
      
      Actually, according to
      	nm .libs/ha_innodb.so|grep -w '[ABCE-TVXYZ]'
      the following symbols are still global:
      
      * The vtable for class ha_innodb
      * pars0grm.c: The function yyparse() and the variables yychar, yylval, yynerrs
      
      The required changes to the Bison-generated file pars0grm.c will be addressed
      in a separate commit, which will add a script similar to make_flex.sh.
      
      The class ha_innodb is renamed from class ha_innobase by a #define.  Thus,
      there will be no clash with the builtin InnoDB.  However, there will be some
      overhead for invoking virtual methods of class ha_innodb.  Ideas for making
      the vtable hidden are welcome.  -fvisibility=hidden is not available in GCC 3.
      1d1dc31a
  32. 24 Jan, 2008 1 commit
  33. 10 Jan, 2008 1 commit