Commit graph

69 commits

Author SHA1 Message Date
marko
c12d8601e3 branches/zip: fil_node_open_file(): In InnoDB Hot Backup,
determine the page size of single-file tablespaces before computing
the file node size.  Otherwise, the space->size of compressed tablespaces
would be computed with UNIV_PAGE_SIZE instead of key_block_size.
This should fix Issue #313.
2009-09-23 18:44:52 +00:00
calvin
75fbaa78d5 branches/zip: fix a type in r5935
Should be innodb_open_files, spotted by Michael.
2009-09-21 13:53:22 +00:00
calvin
411864293e branches/zip: fix bug#44338; minor non-functional changes
Bug#44338 innodb has message about non-existing option 
innodb_max_files_open. Change the option to innodb_open_files.
The fix was committed into 6.0 branch.
2009-09-18 20:08:02 +00:00
vasil
8d57fae29c branches/zip: Merge r5341:5497 from branches/5.1, skipping:
c5419 because it is merge from branches/zip into branches/5.1
c5466 because the source code has been adjusted to match the MySQL
  behavior and the innodb-autoinc test does not fail in branches/zip,
  if c5466 is merged, then innodb-autoinc starts failing, Sunny suggested
  not to merge c5466.
and resolving conflicts in c5410, c5440, c5488:

  ------------------------------------------------------------------------
  r5410 | marko | 2009-06-24 22:26:34 +0300 (Wed, 24 Jun 2009) | 2 lines
  Changed paths:
     M /branches/5.1/include/trx0sys.ic
     M /branches/5.1/trx/trx0purge.c
     M /branches/5.1/trx/trx0sys.c
     M /branches/5.1/trx/trx0undo.c
  
  branches/5.1: Add missing #include "mtr0log.h" to avoid warnings
  when compiling with -DUNIV_MUST_NOT_INLINE.
  ------------------------------------------------------------------------
  r5419 | marko | 2009-06-25 16:11:57 +0300 (Thu, 25 Jun 2009) | 18 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/mysql-test/innodb_bug42101-nonzero.result
     M /branches/5.1/mysql-test/innodb_bug42101-nonzero.test
     M /branches/5.1/mysql-test/innodb_bug42101.result
     M /branches/5.1/mysql-test/innodb_bug42101.test
  
  branches/5.1: Merge r5418 from branches/zip:
  
    ------------------------------------------------------------------------
    r5418 | marko | 2009-06-25 15:55:52 +0300 (Thu, 25 Jun 2009) | 5 lines
    Changed paths:
       M /branches/zip/ChangeLog
       M /branches/zip/handler/ha_innodb.cc
       M /branches/zip/mysql-test/innodb_bug42101-nonzero.result
       M /branches/zip/mysql-test/innodb_bug42101-nonzero.test
       M /branches/zip/mysql-test/innodb_bug42101.result
       M /branches/zip/mysql-test/innodb_bug42101.test
    
    branches/zip: Fix a race condition caused by
    SET GLOBAL innodb_commit_concurrency=DEFAULT. (Bug #45749)
    When innodb_commit_concurrency is initially set nonzero,
    DEFAULT would change it back to 0, triggering Bug #42101.
    rb://139 approved by Heikki Tuuri.
    ------------------------------------------------------------------------
  ------------------------------------------------------------------------
  r5440 | vasil | 2009-06-30 13:04:29 +0300 (Tue, 30 Jun 2009) | 8 lines
  Changed paths:
     M /branches/5.1/fil/fil0fil.c
  
  branches/5.1:
  
  Fix Bug#45814 URL reference in InnoDB server errors needs adjusting to match documentation
  
  by changing the URL from
  http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting.html to
  http://dev.mysql.com/doc/refman/5.1/en/innodb-troubleshooting-datadict.html
  
  ------------------------------------------------------------------------
  r5466 | vasil | 2009-07-02 10:46:45 +0300 (Thu, 02 Jul 2009) | 6 lines
  Changed paths:
     M /branches/5.1/mysql-test/innodb-autoinc.result
     M /branches/5.1/mysql-test/innodb-autoinc.test
  
  branches/5.1:
  
  Adjust the failing innodb-autoinc test to conform to the latest behavior
  of the MySQL code. The idea and the comment in innodb-autoinc.test come
  from Sunny.
  
  ------------------------------------------------------------------------
  r5488 | vasil | 2009-07-09 19:16:44 +0300 (Thu, 09 Jul 2009) | 13 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     A /branches/5.1/mysql-test/innodb_bug21704.result
     A /branches/5.1/mysql-test/innodb_bug21704.test
  
  branches/5.1:
  
  Fix Bug#21704 Renaming column does not update FK definition
  
  by checking whether a column that participates in a FK definition is being
  renamed and denying the ALTER in this case.
  
  The patch was originally developed by Davi Arnaut <Davi.Arnaut@Sun.COM>:
  http://lists.mysql.com/commits/77714
  and was later adjusted to conform to InnoDB coding style by me (Vasil),
  I also added some more comments and moved the bug specific mysql-test to
  a separate file to make it more manageable and flexible.
  
  ------------------------------------------------------------------------
2009-07-14 06:16:18 +00:00
marko
68a1ee9960 branches/zip: Add some Doxygen comments for many structs, typedefs,
#defines and global variables.  Many are still missing.
2009-05-26 12:28:49 +00:00
marko
11ff89d994 branches/zip: Add @file comments, and convert decorative
/*********************************
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
2009-05-25 09:52:29 +00:00
marko
d075e80c49 branches/zip: Split some long lines that were introduced in r5091. 2009-05-25 08:09:45 +00:00
marko
e49dee377b branches/zip: Convert the function comments to Doxygen format.
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.
2009-05-25 05:30:14 +00:00
marko
5a20c7a84a branches/zip: fil0fil.c: Correct some comments. 2009-05-20 07:37:08 +00:00
marko
c0d9e7b96a branches/zip: Add proper comments to some file page accessors. 2009-05-19 09:05:50 +00:00
marko
bd237c4b63 branches/zip: Distinguish temporary tables in MLOG_FILE_CREATE.
This addresses Mantis Issue #23 in InnoDB Hot Backup and some
of MySQL Bug #41609.

In MLOG_FILE_CREATE, we need to distinguish temporary tables, so that
InnoDB Hot Backup can work correctly.  It turns out that we can do this
easily, by using a bit of the previously unused parameter for page number.
(The page number parameter of MLOG_FILE_CREATE has been written as 0 
ever since MySQL 4.1, which introduced MLOG_FILE_CREATE.)

MLOG_FILE_FLAG_TEMP: A flag for indicating a temporary table in
the page number parameter of MLOG_FILE_ operations.

fil_op_write_log(): Add the parameter log_flags.

fil_op_log_parse_or_replay(): Add the parameter log_flags.
Do not replay MLOG_FILE_CREATE when MLOG_FILE_FLAG_TEMP is set in log_flags.
This only affects ibbackup --apply-log.  InnoDB itself never replays file
operations.

rb://117 approved by Heikki Tuuri
2009-04-29 19:23:27 +00:00
marko
a0714b182c branches/zip: univ.i: Define REFMAN as the base URL of the
MySQL Reference Manual and use it in every string.
This fixes Issue #221.
2009-04-16 12:02:27 +00:00
marko
d90bea085a branches/zip: Remove unneeded definitions and dependencies
from UNIV_HOTBACKUP builds.
2009-03-23 14:21:34 +00:00
marko
2225a61798 branches/zip: fil_init(): Add the parameter hash_size. 2009-03-20 13:47:17 +00:00
marko
4214453b03 branches/zip: fil0fil.c: Refer to fil_system directly, not via local vars.
This eliminates some "unused variable" warnings when building
InnoDB Hot Backup in such a way that all mutex operations are no-ops.
2009-03-20 11:51:35 +00:00
marko
cefeb59ade branches/zip: Replace fil_get_space_for_id_low() with fil_space_get_by_id(). 2009-03-20 11:24:06 +00:00
marko
ee2b2dc739 branches/zip: UT_LIST_VALIDATE(): Add the parameter ASSERTION and
adjust all callers.
2009-03-16 09:43:34 +00:00
vasil
4e0e5e1e53 branches/zip:
* 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 2/28]
2009-02-17 08:15:06 +00:00
marko
19a3033aac branches/zip: fil_write_lsn_and_arch_no_to_file(): Plug a memory leak. 2009-02-09 13:35:50 +00:00
marko
bef98e3442 branches/zip: Remove some redundant #include statements. 2009-01-23 09:04:49 +00:00
marko
2f7bcc7d99 branches/zip: In hash table lookups, assert that the traversed items
satisfy some conditions when UNIV_DEBUG is defined.

HASH_SEARCH(): New parameter: ASSERTION. All users will pass an appropriate
ut_ad() or nothing.

dict_table_add_to_columns(): Assert that the table being added to the data
dictionary cache is not already being pointed to by the name_hash and
id_hash tables.

HASH_SEARCH_ALL(): New macro, for use in dict_table_add_to_columns().

dict_mem_table_free(): Set ut_d(table->cached = FALSE), so that we can
check ut_ad(table->cached) when traversing the hash tables, as in
HASH_SEARCH(name_hash, dict_sys->table_hash, ...) and
HASH_SEARCH(id_hash, dict_sys->table_id_hash, ...).

dict_table_get_low(), dict_table_get_on_id_low(): Assert
ut_ad(!table || table->cached).

fil_space_get_by_id(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(hash, fil_system->spaces, ...).

fil_space_get_by_name(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(name_hash, fil_system->name_hash, ...).

buf_buddy_block_free(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->zip_hash, ...).

buf_page_hash_get(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->page_hash, ...).

get_share(), free_share(): Check ut_ad(share->use_count > 0) in
HASH_SEARCH(table_name_hash, innobase_open_tables, ...).

This was posted as rb://75 for tracking down errors similar to Issue #153.
2009-01-13 19:46:22 +00:00
marko
d32ffdd1a3 branches/zip: Clean up the insert buffer subsystem.
Originally, there were provisions in InnoDB for multiple insert buffer
B-trees, apparently one for each tablespace.

When Heikki implemented innodb_file_per_table (multiple InnoDB
tablespaces) in MySQL 4.1, he made the insert buffer live only in the
system tablespace (space 0) but left the provisions in the code.

When Osku Salerma implemented delete buffering, he also cleaned up the
insert buffer subsystem so that only one insert buffer B-tree exists.
This patch applies the clean-up to the InnoDB Plugin.

Having a separate patch of the insert buffer clean-up should help us
better compare the essential changes of the InnoDB Plugin and InnoDB+
and to track down bugs that are specific to InnoDB+.

IBUF_SPACE_ID: New constant, defined as 0.

ibuf_data_t: Remove.

ibuf_t: Add the applicable fields from ibuf_data_t.  There is only one
insert buffer tree from now on.

ibuf_page_low(), ibuf_page(): Merge to a single function ibuf_page().

fil_space_t: Remove ibuf_data.

fil_space_get_ibuf_data(): Remove.  There is only one ibuf_data, for
space IBUF_SPACE_ID.

fil_ibuf_init_at_db_start(): Remove.

ibuf_init_at_db_start(): Fuse with ibuf_data_init_for_space().

ibuf_validate_low(): Remove.  There is only one ibuf tree.

ibuf_free_excess_pages(), ibuf_header_page_get(),
ibuf_free_excess_pages(): Remove the parameter space, which was always
0.

ibuf_tree_root_get(): Remove the parameters space and data.  There is
only one ibuf tree, for space IBUF_SPACE_ID.

ibuf_data_sizes_update(): Rename to ibuf_size_update(), and remove the
parameter data.  There is only one ibuf data struct.

ibuf_build_entry_pre_4_1_x(): New function, refactored from
ibuf_build_entry_from_ibuf_rec().

ibuf_data_enough_free_for_insert(), ibuf_data_too_much_free(): Remove
the parameter data.  There is only one insert buffer tree.

ibuf_add_free_page(), ibuf_remove_free_page(): Remove the parameters
space and data.  There is only one insert buffer tree.

ibuf_get_merge_page_nos(): Add parenthesis, to reduce diffs to
branches/innodb+.

ibuf_contract_ext(): Do not pick an insert buffer tree at random.
There is only one.

ibuf_print(): Print the single insert buffer tree.

rb://19 approved by Heikki on IM
2008-12-12 14:08:23 +00:00
marko
7f703597ef branches/zip: fil_io(): Simplify an "else if" condition by reordering
conditions.
2008-09-22 06:43:28 +00:00
marko
75a60bc696 branches/zip: fil_io(): Remove an unnecessary #ifdef UNIV_SYNC_DEBUG
around a debug assertion.
2008-09-22 06:41:03 +00:00
inaam
18c421230e branches/zip:
Clean up the POSIX_ASYNC_IO code which is currently not used and is unlikely to be ever used.
2008-05-16 14:41:18 +00:00
marko
15c670988f branches/zip: Pass the tablespace flags correctly when creating or opening
single-table tablespaces.  This bug was reported by Sunny as Mantis issue #26.

fil_space_create(), fil_create_new_single_table_tablespace(),
fil_open_single_table_tablespace(), fsp_header_init_fields():
Add ut_a(flags != DICT_TF_COMPACT).

dict_build_table_def_step(), row_import_tablespace_for_mysql(),
row_truncate_table_for_mysql(): Pass correct flags to
fil_create_new_single_table_tablespace() or fil_open_single_table_tablespace().
2008-03-18 10:10:51 +00:00
marko
77d8c98735 branches/zip: Rename ib_ulonglong to ib_uint64_t and ib_longlong to ib_int64_t. 2008-03-17 14:19:04 +00:00
marko
86361e032b branches/zip: Implement the configuration parameter and settable global
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.
2008-03-10 11:05:32 +00:00
marko
2c2b06ad75 branches/zip: Introduce UNIV_INTERN, a linkage specifier for InnoDB-global
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.
2008-02-06 14:17:36 +00:00
marko
52a8928693 branches/zip: Simplify crash recovery in fast index creation.
trx_t: Remove dict_undo_list and dict_redo_list.

innobase_create_temporary_tablename(): Replace TEMP_TABLE_PREFIX with
a table name suffix "#1" or "#2".  In this way, the user can restore
precious data, should anything go wrong.  It is possible to reach an
inconsistent state, because the creation, deletion and renaming of
single-table tablespaces are not transactional.

ut_print_namel(), fil_make_ibd_name(), innobase_rename_table(): Remove
the special treatment of TEMP_TABLE_PREFIX.

Introduce TEMP_INDEX_PREFIX == 0xff for temporary indexes.  This byte
cannot occur in index names since MySQL 4.1.  However, it might have
been possible to use this byte in MySQL 4.0.

recv_recovery_from_checkpoint_finish(): Call the new function
row_merge_drop_temp_indexes(), to drop all indexes whose name starts
with the byte 0xff.

row_merge_rename_indexes(): Renamed from row_merge_rename_index().
Remove the parameter "index".

row_drop_table_for_mysql(): Unconditionally call trx_commit_for_mysql().

row_drop_table_for_mysql_no_commit(): Correct the function commit,
based on the corrected comment of row_drop_table_for_mysql().  Rely on
table->to_be_dropped instead of TEMP_TABLE_PREFIX.

ha_innobase::add_index(): Simplify the control flow.
2007-09-05 10:18:03 +00:00
marko
54113d6d9f branches/zip: HASH_SEARCH(): Add the parameter TYPE, for the type of DATA.
C++ requires explicit type casts when converting from void*, and *.ic files
are now inlined in ha_innodb.cc.

fil_space_get_by_id(), fil_space_get_by_name(): New inline functions, to
replace occurrences of the HASH_SEARCH() macro in fil0fil.c.  This should
improve readability.
2007-08-01 08:13:22 +00:00
marko
1cfcd4f2cf branches/zip: Create special single-table tablespace file names for
temporary tablespaces in fast index creation.  The tablespaces must
reside in the same directory as the persistent tablespaces, so that
they can be renamed without copying.  Namespace collisions are avoided
by replacing the ".ibd" file name suffix with ".ib1" or ".ib2".

fil_make_ibd_name(): Treat names starting with TEMP_TABLE_PREFIX
specially.  Document the dependence on
innobase_create_temporary_tablename().
2007-06-11 08:26:33 +00:00
marko
e7284367dc branches/zip: Merge revisions 1402:1493 from trunk.
Remove mysql.patch, because the configuration parameter interface has changed.
2007-05-14 09:07:15 +00:00
marko
3423833053 branches/zip: Make TRUNCATE TABLE recreate single-table tablespaces.
dict_truncate_index_tree(): Add the parameter space for specifying the
new tablespace identifier of a single-table tablespace that has been
recreated.  When SYS_INDEXES.PAGE_NO == FIL_NULL, do not abort but
create the index tree.

fil_discard_tablespace(): Pass the return code from fil_delete_tablespace().

row_truncate_table_for_mysql(): Attempt to discard and recreate
single-table tablespaces.  Reassign the tablespace identifier both in
the data dictionary (SYS_TABLES and SYS_INDEXES) and in the data
dictionary cache.
2007-03-29 08:51:13 +00:00
marko
d8536b0de8 branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. 2007-01-18 18:29:12 +00:00
marko
c712838401 branches/zip: Merge revisions 1165:1206 from trunk. 2007-01-18 12:58:39 +00:00
marko
fff329cd3d branches/zip: Remove the fil_space_get_zip_size() call from
buf_page_get_gen().  This saves one mutex operation per block request.

buf_page_get_gen(), various macros and functions: Add parameter zip_size.

btr_node_ptr_get_child(): Add parameter index.

fil_space_get_latch(): Add optional output parameter zip_size.

fil_space_get_zip_size(): Return 0 for space id==0, because the
system tablespace is never compressed.

fsp_header_init(): Remove the parameter zip_size.

ibuf_free_excess_pages(): Remove the parameter zip_size.

trx_rseg_t, trx_undo_t: Add field zip_size.

xdes_lst_get_next(): Remove, unused.
2007-01-18 09:59:00 +00:00
marko
81d1179f04 branches/zip: page_zip_des_t: Enclose m_start in #ifdef UNIV_DEBUG.
Add m_nonempty for facilitating the test in page_zip_alloc().  This
reduces the combined size of the bit-fields to 32 bits.  Thus,
sizeof(page_zip_des_t) == 2 machine words on 32-bit and wider systems.
2006-11-30 14:09:29 +00:00
marko
cf7b6e9153 branches/zip: Move all fields that are not needed in compression or
decompression from page_zip_des_t to buf_page_t, because the fields
needed in compression are modified without holding the block mutex.
All writes to bit-fields sharing a machine word must be protected
by the same mutex or rw-lock.
2006-11-30 10:33:35 +00:00
marko
5e9d893508 branches/zip: Replace ib_ulonglong with ib_uint64_t, since we want exactly
64 bits.  "long long" might be longer than 64 bits on some systems.
2006-11-29 14:52:16 +00:00
marko
82dfd0f6c7 branches/zip: page_zip_des_t: Rename "size" to "ssize" and reduce the
storage size from 16 to 3 bits.

page_zip_get_size(), page_zip_set_size(): New functions.

Replace direct references to page_zip_des_t:size with calls to
buf_block_get_zip_size(), page_zip_get_size(), and page_zip_set_size().
2006-11-27 13:44:32 +00:00
marko
109570b94a branches/zip: Introduce the unsigned 64-bit data type ib_ulonglong
for log sequence numbers, to replace dulint.
2006-11-24 13:05:01 +00:00
marko
dccaa03753 branches/zip: Introduce buf_page_t, a common structure for compressed-only
and uncompressed buffer pool pages.

buf_block_t: Replace page_zip, space, and offset with buf_page_t page.
Replace some integers with bit-fields.

enum buf_block_state: Rename to buf_page_state.  Add BUF_BLOCK_ZIP_PAGE.

page_zip_des_t: Add the field "state".  Make the integer fields bit-fields.

page_zip_copy(): Document which fields are copied.
2006-11-24 08:32:18 +00:00
marko
4574bdda81 branches/zip: Merge revisions 968:1009 from trunk. 2006-11-10 11:15:59 +00:00
marko
91b16c3c56 branches/zip: Prepare for buffer pool allocation in several chunks.
buf_pool_t: Remove n_frames, max_size, and blocks_of_frames.
The current buffer pool size is in curr_size.

buf_pool_init(): Remove parameter max_size.

buf_pool_get_max_size(), buf_pool_is_block(): Remove.

buf_block_align(): Do not assume that the buffer pool is allocated
in one chunk.  Replace dependency on buf_pool->blocks_of_frames
with a call to buf_page_hash_get().
2006-10-30 15:15:19 +00:00
marko
a3d72680f6 branches/zip: Add const qualifiers to read-only pointers.
rec_get_nth_field_offs_old(): Split from rec_get_nth_field_old().

rec_get_nth_field_old(): Reimplement as a constness-preserving macro.

dict_drop_index_tree(), dict_truncate_index_tree(): Note that rec is
an in/out parameter, as the B-tree root page number will be updated.
2006-10-26 08:52:14 +00:00
marko
91f8a3dde5 branches/zip: Remove many fil_space_get_zip_size() calls.
ibuf_page(), ibuf_page_low(), ibuf_free_excess_pages(), ibuf_insert(),
buf_read_page(), buf_read_ahead_linear(), buf_read_recv_pages():
Add parameter zip_size.
2006-10-19 11:07:50 +00:00
marko
223cb22210 branches/zip: Remove some more casts.
dict_index_get_nth_col_pos(), dict_index_get_sys_col_pos(),
dict_index_get_n_fields(), fil_page_get_type():
Add const qualifier to parameter.

dict_index_get_nth_field(): Implement as a macro unless #ifdef UNIV_DEBUG.
2006-10-19 07:52:28 +00:00
marko
606bd38428 branches/zip: Stamp (space_id, page_no) on buffer pool pages early on.
buf_flush_init_for_writing(): Remove parameters space, page_no.

fsp_init_file_page_low(): Wriet space_id and page_no to the page.

fil_create_new_single_table_tablespace(): Write space_id to the page.
2006-10-10 12:26:37 +00:00
marko
152fbb78a2 branches/zip: Remove compilation errors with -DUNIV_HOTBACKUP.
dict_load_foreigns(): Enclose in #ifndef UNIV_HOTBACKUP.

fil_extend_tablespaces_to_stored_len(): Pass zip_size to fil_read().

buf_page_init_for_backup_restore(): Add parameter zip_size.
Enclose the declaration in buf0buf.h in #ifdef UNIV_HOTBACKUP.

recv_apply_log_recs_for_backup(): Replace the local variable "page"
with the local variable "block".  Add local variable zip_size.
2006-10-06 11:23:19 +00:00