An error occurred fetching the project authors.
  1. 08 Jul, 2009 1 commit
    • inaam's avatar
      branches/zip rb://133 · 6e6d1e86
      inaam authored
      This patch introduces heuristics based flushing rate of dirty pages to
      avoid IO bursts at checkpoint.
      
      1) log_capacity / log_generated per second gives us number of seconds
      in which ALL dirty pages need to be flushed. Based on this rough
      assumption we can say that
      n_dirty_pages / (log_capacity / log_generation_rate) = desired_flush_rate
      
      2) We use weighted averages (hard coded to 20 seconds) of
      log_generation_rate to avoid resonance.
      
      3) From the desired_flush_rate we subtract the number of pages that have
      been flushed due to LRU flushing. That gives us pages that we should
      flush as part of flush_list cleanup. And that is the number (capped by
      maximum io_capacity) that we try to flush from the master thread.
      
      Knobs:
      ======
      
      innodb_adaptive_flushing: boolean, global, dynamic, default TRUE.
      Since this heuristic is very experimental and has the potential to
      dramatically change the IO pattern I think it is a good idea to leave a
      knob to turn it off.
      
      Approved by: Heikki
      
      6e6d1e86
  2. 07 Jul, 2009 1 commit
    • inaam's avatar
      branches/zip rb://126 · a1955cd2
      inaam authored
      Based on contribution from Google Inc.
      This patch introduces a new parameter innodb_io_capacity to control the
      rate at which master threads performs various tasks. The default value
      is 200 and higher values imply more aggressive flushing and ibuf merges
      from within the master thread.
      This patch also changes the ibuf merge from synchronous to asynchronous.
      Another minor change is not to force the master thread to wait for a
      log flush to complete every second.
      
      Approved by: Heikki
      a1955cd2
  3. 30 Jun, 2009 1 commit
    • inaam's avatar
      branches/zip · 1d2964d3
      inaam authored
      Non functional change. s/Percona/Percona Inc./
      1d2964d3
  4. 11 Jun, 2009 1 commit
    • inaam's avatar
      branches/zip rb://131 · 5dbf1ce6
      inaam authored
      This patch changes the following defaults:
      
      max_dirty_pages_pct: default from 90 to 75. max allowed from 100 to 99
      additional_mem_pool_size: default from 1 to 8 MB
      buffer_pool_size: default from 8 to 128 MB
      log_buffer_size: default from 1 to 8 MB
      read_io_threads/write_io_threads: default from 1 to 4
      
      The log file sizes are untouched because of upgrade issues
      
      Reviewed by: Heikki
      5dbf1ce6
  5. 08 Jun, 2009 1 commit
    • inaam's avatar
      branches/zip · c59be561
      inaam authored
      Non functional change:
      
      Added legal notices acknowledging percona contribution to the multiple
      IO helper threads patch i.e.: r5262
      c59be561
  6. 05 Jun, 2009 2 commits
    • vasil's avatar
      branches/zip: · 5f79ed02
      vasil authored
      Enable functionality to have multiple background io helper threads.
      This patch is based on percona contributions.
      
      More details about this patch will be written at:
      https://svn.innodb.com/innobase/MultipleBackgroundThreads
      
      The patch essentially does the following:
      
      expose following knobs:
      innodb_read_io_threads = [1 - 64] default 1
      innodb_write_io_threads = [1 - 64] default 1
      
      deprecate innodb_file_io_threads (this parameter was relevant only on windows)
      
      Internally it allows multiple segments for read and write IO request arrays
      where one thread works on one segement.
      
      Submitted by:	Inaam (rb://124)
      Approved by:	Heikki (rb://124)
      5f79ed02
    • 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
  7. 01 Jun, 2009 1 commit
  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. 20 May, 2009 1 commit
  11. 19 May, 2009 1 commit
  12. 14 May, 2009 1 commit
    • marko's avatar
      branches/zip: Merge revisions 4976:4994 from branches/5.1: · 5f4aa7f7
      marko authored
        ------------------------------------------------------------------------
        r4994 | marko | 2009-05-14 15:04:55 +0300 (Thu, 14 May 2009) | 18 lines
      
        branches/5.1: Prevent a race condition in innobase_commit() by ensuring
        that innodb_commit_concurrency>0 remains constant at run time. (Bug #42101)
      
        srv_commit_concurrency: Make this a static variable in ha_innodb.cc.
      
        innobase_commit_concurrency_validate(): Check that innodb_commit_concurrency
        is not changed from or to 0 at run time.  This is needed, because
        innobase_commit() assumes that innodb_commit_concurrency>0 remains constant.
        Without this limitation, the checks for innodb_commit_concurrency>0
        in innobase_commit() should be removed and that function would have to
        acquire and release commit_cond_m at least twice per invocation.
        Normally, innodb_commit_concurrency=0, and introducing the mutex operations
        would mean significant overhead.
      
        innodb_bug42101.test, innodb_bug42101-nonzero.test: Test cases.
      
        rb://123 approved by Heikki Tuuri
        ------------------------------------------------------------------------
      5f4aa7f7
  13. 07 Apr, 2009 1 commit
    • inaam's avatar
      branches/zip · 78fe990b
      inaam authored
      Enable atomics on solaris (using the libc functions as defined in
      atomic.h) if GCC atomic builtins are not present.
      
      There still remains some work to be done (by Vasil?). This patch
      makes changes to plug.in to check pthread_t size and presence of
      atomic functions when running on solaris. The same has to become
      a part of the generated Makefile.in when we bake our source.
      
      Reviewed by: Heikki rb://106
      78fe990b
  14. 02 Apr, 2009 1 commit
  15. 24 Mar, 2009 1 commit
  16. 20 Mar, 2009 1 commit
  17. 25 Feb, 2009 1 commit
    • marko's avatar
      branches/zip: Correct the initialization of the memory subsystem once · 22bfdb3b
      marko authored
      again, to finally put Issue #181 to rest.
      
      Revert some parts of r4274.  It is best not to call ut_malloc() before
      srv_general_init().
      
      mem_init(): Do not call ut_mem_init().
      
      srv_general_init(): Initialize the memory subsystem in two phases:
      first ut_mem_init(), then mem_init().  This is because os_sync_init()
      and sync_init() depend on ut_mem_init() and mem_init() depends on
      os_sync_init() or sync_init().
      
      srv_parse_data_file_paths_and_sizes(),
      srv_parse_log_group_home_dirs(): Remove the output parameters.  Assign
      to the global variables directly.  Allocate memory with malloc()
      instead of ut_malloc(), because these functions will be called before
      srv_general_init().
      
      srv_free_paths_and_sizes(): New function, for cleaning up after
      srv_parse_data_file_paths_and_sizes() and
      srv_parse_log_group_home_dirs().
      
      rb://92 approved by Sunny Bains
      22bfdb3b
  18. 23 Feb, 2009 1 commit
    • marko's avatar
      branches/zip: Fix bugs in the fix of Issue #181. Tested inside and · e2059457
      marko authored
      outside Valgrind, with innodb_use_sys_malloc set to 0 and 1.
      
      mem_init(): Invoke ut_mem_init() before mem_pool_create(), because
      the latter one will invoke ut_malloc().
      
      srv_general_init(): Do not initialize the memory subsystem (mem_init()).
      
      innobase_init(): Initialize the memory subsystem (mem_init()) before
      calling srv_parse_data_file_paths_and_sizes(), which needs ut_malloc().
      Call ut_free_all_mem() in error handling to clean up after the mem_init().
      e2059457
  19. 20 Feb, 2009 1 commit
  20. 17 Feb, 2009 1 commit
    • vasil's avatar
      branches/zip: · ddf5d071
      vasil authored
      To the files touched by the Google patch from c4144 (excluding
      include/os0sync.ic because later we removed Google code from that file):
      
      * Remove the Google license
      * Remove old Innobase copyright lines
      * Add a reference to the Google license and to the GPLv2 license at the top,
      as recommended by the lawyers at Oracle Legal.
      
      ddf5d071
  21. 09 Feb, 2009 1 commit
    • inaam's avatar
      branches/zip rb://30 · dec9a351
      inaam authored
      This patch changes the innodb mutexes and rw_locks implementation.
      On supported platforms it uses GCC builtin atomics. These changes
      are based on the patch sent by Mark Callaghan of Google under BSD
      license. More technical discussion can be found at rb://30
      
      Approved by: Heikki
      dec9a351
  22. 02 Jan, 2009 2 commits
  23. 10 Dec, 2008 1 commit
    • calvin's avatar
      branches/zip: fix Mantis issue #138 InnoDB fails if · 372f2d34
      calvin authored
      innodb_buffer_pool_size >= 4096M on x64 Windows
      
      All three srv_buf_pool related variables are defined as ulong, which is
      32-bit on 64-bit Windows. They are changed to 64-bit ulint. Also
      system_info.dwPageSize appears to be 32-bit only. Casting to 64-bit
      is required.
      
      Approved by:	Marko (on IM)
      372f2d34
  24. 09 Dec, 2008 1 commit
    • vasil's avatar
      branches/zip: · 7b6cda4d
      vasil authored
      Merge 2929:3458 from branches/5.1 (resolving conflict in c3257,
      note also that r3363 reverted r2933 so there are not changes in
      mysql-test/innodb-autoinc.result with the current merge):
      
        ------------------------------------------------------------------------
        r2933 | calvin | 2008-10-30 02:57:31 +0200 (Thu, 30 Oct 2008) | 10 lines
        Changed paths:
           M /branches/5.1/mysql-test/innodb-autoinc.result
        
        branches/5.1: correct the result file innodb-autoinc.result
        
        Change the followings:
          auto_increment_increment
          auto_increment_offset
        
        to
          auto-increment-increment
          auto-increment-offset
        
        ------------------------------------------------------------------------
        r2981 | marko | 2008-11-07 14:54:10 +0200 (Fri, 07 Nov 2008) | 5 lines
        Changed paths:
           M /branches/5.1/row/row0mysql.c
        
        branches/5.0: row_mysql_store_col_in_innobase_format(): Correct a misleading
        comment. In the UTF-8 encoding, ASCII takes 1 byte per character, while
        the "latin1" character set (normally ISO-8859-1, but in MySQL it actually
        refers to the Windows Code Page 1252 a.k.a. CP1252, WinLatin1)
        takes 1 to 3 bytes (1 to 2 bytes for the ISO-8859-1 subset).
        ------------------------------------------------------------------------
        r3114 | calvin | 2008-11-14 20:31:48 +0200 (Fri, 14 Nov 2008) | 8 lines
        Changed paths:
           M /branches/5.1/handler/ha_innodb.cc
        
        branches/5.1: fix bug#40386: Not flushing query cache after truncate
        
        ha_statistics.records can not be 0 unless the table is empty, set to
        1 instead. The original problem of bug#29507 is fixed in the server.
        
        Additional test was done with the fix of bug#29507 in the server.
        
        Approved by: Heikki (on IM)
        ------------------------------------------------------------------------
        r3257 | inaam | 2008-11-24 22:06:50 +0200 (Mon, 24 Nov 2008) | 13 lines
        Changed paths:
           M /branches/5.1/handler/ha_innodb.cc
           M /branches/5.1/srv/srv0srv.c
           M /branches/5.1/trx/trx0trx.c
        
        branches/5.1 bug#40760
        
        The config param innodb_thread_concurrency is dynamically set and is
        read when a thread enters/exits innodb. If the value is changed between
        the enter and exit time the behaviour becomes erratic.
        The fix is not to use srv_thread_concurrency when exiting, instead use
        the flag trx->declared_to_be_inside_innodb.
        
        rb://57
        
        Approved by: Marko
        
        
        ------------------------------------------------------------------------
        r3363 | calvin | 2008-12-04 19:00:20 +0200 (Thu, 04 Dec 2008) | 13 lines
        Changed paths:
           M /branches/5.1/mysql-test/innodb-autoinc.result
        
        branches/5.1: revert the changes in r2933
        
        The changes in r2933 causes test failure on Linux.
        More investigation is needed for Windows.
        
        Change the followings in innodb-autoinc.result:
          auto-increment-increment
          auto-increment-offset
        
        back to:
          auto_increment_increment
          auto_increment_offset
        
        ------------------------------------------------------------------------
        r3412 | vasil | 2008-12-05 10:46:18 +0200 (Fri, 05 Dec 2008) | 7 lines
        Changed paths:
           M /branches/5.1/trx/trx0undo.c
        
        branches/5.1:
        
        Add the traditional 2 spaces after the timestamp so the message does
        not look like:
        
        070223 13:26:01InnoDB: Warning: canno....
        
        ------------------------------------------------------------------------
        r3458 | vasil | 2008-12-09 11:21:08 +0200 (Tue, 09 Dec 2008) | 51 lines
        Changed paths:
           M /branches/5.1/mysql-test/innodb_bug34300.test
        
        branches/5.1:
        
        Merge a change from MySQL to fix the failing innodb_bug34300 mysql-test:
        
          main.innodb_bug34300           [ fail ]
          
          mysqltest: At line 11: query 'SET @@max_allowed_packet=16777216' failed: 1621: SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
          
          Aborting: main.innodb_bug34300 failed in default mode. 
        
        The changeset is this:
        
          ------------------------------------------------------------
          revno: 2709.1.10
          committer: Staale Smedseng <staale.smedseng@sun.com>
          branch nick: b22891-51-bugteam
          timestamp: Thu 2008-11-20 08:51:48 +0100
          message:
            A fix for Bug#22891 "session level max_allowed_packet can be
            set but is ignored".
          
            This patch makes @@session.max_allowed_packed and
            @@session.net_buffer_length read-only as suggested in the bug
            report. The user will have to use SET GLOBAL (and reconnect)
            to alter the session values of these variables.
          
            The error string ER_VARIABLE_IS_READONLY is introduced.
          
            Tests are modified accordingly.
          modified:
            mysql-test/r/func_compress.result
            mysql-test/r/max_allowed_packet_basic.result
            mysql-test/r/max_allowed_packet_func.result
            mysql-test/r/net_buffer_length_basic.result
            mysql-test/r/packet.result
            mysql-test/r/union.result
            mysql-test/r/variables.result
            mysql-test/t/func_compress.test
            mysql-test/t/innodb_bug34300.test
            mysql-test/t/max_allowed_packet_basic.test
            mysql-test/t/max_allowed_packet_func.test
            mysql-test/t/net_buffer_length_basic.test
            mysql-test/t/packet.test
            mysql-test/t/union.test
            mysql-test/t/variables.test
            sql/set_var.cc
            sql/set_var.h
            sql/share/errmsg.txt
          ------------------------------------------------------------
        
        
        ------------------------------------------------------------------------
      7b6cda4d
  25. 29 Oct, 2008 1 commit
    • marko's avatar
      branches/zip: Merge revisions 2854:2929 from branches/5.1, · 9d2fe138
      marko authored
      except r2924, which was merged from branches/zip r2866 to branches/5.1
      and except r2879 which was merged separately by Calvin:
      
        ------------------------------------------------------------------------
        r2902 | vasil | 2008-10-28 12:10:25 +0200 (Tue, 28 Oct 2008) | 10 lines
      
        branches/5.1:
      
        Fix Bug#38189 innodb_stats_on_metadata missing
      
        Make the variable innodb_stats_on_metadata visible to the users and
        also settable at runtime. Previously it was only "visible" as a command
        line startup option to mysqld.
      
        Approved by:    Marko (https://svn.innodb.com/rb/r/36)
        ------------------------------------------------------------------------
        r2929 | marko | 2008-10-29 21:26:14 +0200 (Wed, 29 Oct 2008) | 13 lines
      
        branches/5.1: dtype_get_sql_null_size(): return the correct storage
        size of a SQL NULL column. (Bug #40369)
      
        When MySQL Bug #20877 was fixed in r834, this function was
        accidentally modified to return 0 or 1. Apparently, the only impact of
        this bug is that fixed-length columns cannot be updated in-place from
        or to SQL NULL, even in ROW_FORMAT=REDUNDANT.  After this fix,
        fixed-length columns in ROW_FORMAT=REDUNDANT will have a constant
        storage size as they should, no matter if NULL or non-NULL.  The bug
        caused fixed-length NULL columns to occupy 1 byte.
      
        rb://37 approved by Heikki over IM.
        ------------------------------------------------------------------------
      9d2fe138
  26. 14 Oct, 2008 1 commit
  27. 03 Oct, 2008 1 commit
    • marko's avatar
      branches/zip: Make innodb_lock_wait_timeout a settable session variable · 4d6c1573
      marko authored
      (Bug #36285, rb://9).
      
      innodb-index.test, innodb-index.result: Set innodb_lock_wait_timeout as
      a session variable instead of relying on the global value.
      
      innodb-index-master.opt: Remove.
      
      innodb-timeout.test: Test that setting the innodb_lock_wait_timeout
      works as advertised.
      
      thd_lock_wait_timeout(): New function, to retrieve the lock wait timeout
      for a given MySQL client connection (thd), or the global value (thd==NULL).
      
      srv_lock_wait_timeout, innobase_lock_wait_timeout: Remove.
      
      Replace MYSQL_SYSVAR_LONG(lock_wait_timeout)
      with MYSQL_THDVAR_ULONG(lock_wait_timeout).  
      4d6c1573
  28. 07 Aug, 2008 1 commit
    • vasil's avatar
      branches/zip: · 48216724
      vasil authored
      The cardinality of every index (the number of different key values) is
      calculated when the table is opened, at SHOW TABLE STATUS,
      ANALYZE TABLE and on other circumstances (like when the table has
      changed too much). Note that if the mysql client is running with the
      auto-rehash setting turned on (default) this causes all tables to be
      opened when it starts.
      
      Previously InnoDB sampled 8 random pages from the index to get an
      estimate of the cardinality. Now the number of sampled pages can be
      changed via the global parameter innodb_stats_sample_pages which can
      be tuned at runtime. The default value for this parameter is 8.
      
      If the value of this parameter is changed, there may be serious problems:
      
      - small values (say, 1) can cause an error in table stats;
      - values much larger than 8 (say, 100), can cause a big slowdown in
        table opening time, SHOW TABLE status, etc.
      - query plans may be different from the old ones.
      
      Approved by:	Heikki
      48216724
  29. 06 Jun, 2008 1 commit
    • vasil's avatar
      branches/zip: Merge 2437:2485 from branches/5.1: · dde455e8
      vasil authored
      (r2478 was skipped for the obvious reason)
      
        ------------------------------------------------------------------------
        r2464 | vasil | 2008-05-19 17:59:42 +0300 (Mon, 19 May 2008) | 9 lines
        
        branches/5.1:
        
        Fix Bug#36600 SHOW STATUS takes a lot of CPU in buf_get_latched_pages_number
        
        by removing the Innodb_buffer_pool_pages_latched variable from
        SHOW STATUS output in non-UNIV_DEBUG compilation.
         
        Approved by:	Heikki
        
        ------------------------------------------------------------------------
        r2466 | calvin | 2008-05-20 01:37:14 +0300 (Tue, 20 May 2008) | 12 lines
        
        branches/5.1:
        
        Fix Bug#11894 innodb_file_per_table crashes w/ Windows .sym symbolic
        link hack
        
        The crash was due to un-handled error 3 (path not found). In the case
        of file per table, change the call to os_file_handle_error_no_exit()
        from os_file_handle_error(). Also, checks for full path pattern during
        table create (Windows only), which is used in symbolic link and temp
        table creation.
        
        Approved by:	Heikki
        ------------------------------------------------------------------------
        r2478 | sunny | 2008-05-23 08:29:08 +0300 (Fri, 23 May 2008) | 3 lines
        
        branches/5.1: Fix for bug# 36793. This is a back port from branches/zip. This
        code has been tested on a big-endian machine too.
        
        ------------------------------------------------------------------------
        r2480 | vasil | 2008-05-27 11:40:07 +0300 (Tue, 27 May 2008) | 11 lines
        
        branches/5.1:
        
        Fix Bug#36819 ut_usectime does not handle errors from gettimeofday
        
        by retrying gettimeofday() several times if it fails in ut_usectime().
        If it fails on all calls then return error to the caller to be handled
        at higher level.
        
        Update the variable innodb_row_lock_time_max in SHOW STATUS output only
        if ut_usectime() was successful.
        
        ------------------------------------------------------------------------
        r2482 | sunny | 2008-05-28 12:18:35 +0300 (Wed, 28 May 2008) | 5 lines
        
        branches/5.1: Fix for Bug#35602, "Failed to read auto-increment value from
        storage engine". The test for REPLACE was an error of ommission since it's
        classified as a simple INSERT. For REPLACE statements we don't acquire
        the special AUTOINC lock for AUTOINC_NEW_STYLE_LOCKING with this fix.
        
        ------------------------------------------------------------------------
        r2485 | vasil | 2008-05-28 16:01:14 +0300 (Wed, 28 May 2008) | 9 lines
        
        branches/5.1:
        
        Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"
        
        Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
        if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.
        
        Discussed with:	Sunny (via IM)
        
        ------------------------------------------------------------------------
      dde455e8
  30. 06 May, 2008 1 commit
    • calvin's avatar
      branches/zip: · 61a33895
      calvin authored
      Implement the system tablespace tagging described on the wiki:
      https://svn.innodb.com/innobase/InnoDB_version_and_feature_compatibility
      
      A brief description of the changes:
      
      * The file format tag will be saved in the trx system page, starting at
        (UNIV_PAGE_SIZE - 16) for 8 bytes.
      * The configuration parameter innodb_file_format_check is introduced.
        This variable can be set to on/off and any of the supported file
        formats in the configuration file, but can only be set to any of
        the supported file formats during runtime. The default is on.
      * During table create/open, check the current file format against
        the max in file_format_max. If the current file format is newer,
        update file_format_max and tag the system tablespace with the
        newer one in a normal mtr.
      * During startup, write the tag to the error log and check it against
        DICT_TF_FORMAT_MAX. Refuse to start with error, if
        -- DICT_TF_FORMAT_MAX < the tag, and
        -- innodb_file_format_check is ON
        Print out a warning , if
        -- DICT_TF_FORMAT_MAX < the tag, but
        -- innodb_file_format_check is off
      * The system tablespace tag is re-settable using:
        set innodb_file_format_check = <file_format>
      
      Approved by:	Sunny
      61a33895
  31. 10 Apr, 2008 1 commit
    • calvin's avatar
      branches/zip: Implementation of using animal names for innodb_file_format, · ff014f21
      calvin authored
      described in Mantis#30. Specifically:
      
      - Allow innodb_file_format to take string arguments
      - Make innodb_file_format system variable a string instead of a number
      - Implement the callback functions
      - Update warning messages
      
      Three new functions are implemented:
      
      file_format_name_lookup(): Validate the file format name and return
      its corresponding id.
      
      innodb_file_format_check(): Check if it is a valid file format. This
      function is registered as a callback with MySQL.
      
      innodb_file_format_update(): Update the global variable using the
      "saved" value. This functions is registered as a callback with MySQL.
      ff014f21
  32. 17 Mar, 2008 2 commits
  33. 10 Mar, 2008 1 commit
    • marko's avatar
      branches/zip: Implement the configuration parameter and settable global · a9ae7311
      marko authored
      variable innodb_file_format.  Implement file format version stamping of
      *.ibd files and SYS_TABLES.TYPE.
      
      This change breaks introduces an incompatible change for for
      compressed tables.  We can do this, as we have not released yet.
      
      innodb-zip.test: Add tests for stricter KEY_BLOCK_SIZE and ROW_FORMAT
      checks.
      
      DICT_TF_COMPRESSED_MASK, DICT_TF_COMPRESSED_SHIFT: Replace with
      DICT_TF_ZSSIZE_MASK, DICT_TF_ZSSIZE_SHIFT.
      
      DICT_TF_FORMAT_MASK, DICT_TF_FORMAT_SHIFT, DICT_TF_FORMAT_51,
      DICT_TF_FORMAT_ZIP: File format version, stored in table->flags,
      in the .ibd file header, and in SYS_TABLES.TYPE.
      
      dict_create_sys_tables_tuple(): Write the table flags to SYS_TABLES.TYPE
      if the format is at least DICT_TF_FORMAT_ZIP.  For old formats
      (DICT_TF_FORMAT_51), write DICT_TABLE_ORDINARY as the table type.
      
      DB_TABLE_ZIP_NO_IBD: Remove the error code.  The error handling is done
      in ha_innodb.cc; as a failsafe measure, dict_build_table_def_step() will
      silently clear the compression and format flags instead of returning this
      error.
      
      dict_mem_table_create(): Assert that no extra bits are set in the flags.
      
      dict_sys_tables_get_zip_size(): Rename to dict_sys_tables_get_flags().
      Check all flag bits, and return ULINT_UNDEFINED if the combination is
      unsupported.
      
      dict_boot(): Document the SYS_TABLES columns N_COLS and TYPE.
      
      dict_table_get_format(), dict_table_set_format(),
      dict_table_flags_to_zip_size(): New accessors to table->flags.
      
      dtuple_convert_big_rec(): Introduce the auxiliary variables
      local_len, local_prefix_len.  Store a 768-byte prefix locally
      if the file format is less than DICT_TF_FORMAT_ZIP.
      
      dtuple_convert_back_big_rec(): Restore the columns.
      
      srv_file_format: New variable: innodb_file_format.
      
      fil_create_new_single_table_tablespace(): Replace the parameter zip_size
      with table->flags.
      
      fil_open_single_table_tablespace(): Replace the parameter zip_size_in_k
      with table->flags.  Check the flags.
      
      fil_space_struct, fil_space_create(), fil_op_write_log():
      Replace zip_size with flags.
      
      fil_node_open_file(): Note a TODO item for InnoDB Hot Backup.
      Check that the tablespace flags match.
      
      fil_space_get_zip_size(): Rename to fil_space_get_flags().  Add a
      wrapper for fil_space_get_zip_size().
      
      fsp_header_get_flags(): New function.
      
      fsp_header_init_fields(): Replace zip_size with flags.
      
      FSP_SPACE_FLAGS: New name for the tablespace flags.  This field used
      to be called FSP_PAGE_ZIP_SIZE, or FSP_LOWEST_NO_WRITE.  It has always
      been written as 0 in MySQL/InnoDB versions 4.1 to 5.1.
      
      MLOG_ZIP_FILE_CREATE: Rename to MLOG_FILE_CREATE2.  Add a 32-bit
      parameter for the tablespace flags.
      
      ha_innobase::create(): Check the table attributes ROW_FORMAT and
      KEY_BLOCK_SIZE.  Issue errors if they are inappropriate, or warnings
      if the inherited attributes (in ALTER TABLE) will be ignored.
      
      PAGE_ZIP_MIN_SIZE_SHIFT: New constant: the 2-logarithm of PAGE_ZIP_MIN_SIZE.
      a9ae7311
  34. 07 Mar, 2008 1 commit
    • marko's avatar
      branches/zip: Make innodb_file_per_table a settable global variable. · 9f962b0d
      marko authored
      There is one consideration: fil_init() chooses the tablespace hash size
      based on the initial value of srv_file_per_table.  However, this is nothing
      new: InnoDB could be started with innodb_file_per_table=0 even though
      *.ibd files exist.
      
      srv_file_per_table: Declare as my_bool instead of ibool, because
      MYSQL_SYSVAR_BOOL() expects a pointer to my_bool.  Document the
      variable also in srv0srv.h.
      
      innobase_start_or_create_for_mysql(): Note why it is OK to temporarily
      clear srv_file_per_table.
      
      innobase_file_per_table: Remove.
      9f962b0d
  35. 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