Commit graph

25 commits

Author SHA1 Message Date
marko
c3e2a8d45f branches/zip: dtuple_convert_big_rec(): Shorten the locally stored part
of externally stored columns to 108 bytes when possible.

This will unmask a bug in the handling of BLOBs on compressed tablespaces,
especially of small page sizes.  Apparently, the locally stored part must
be less than 235 bytes in size for the bug to occur.

dict_col_struct: Add field min_prefix.

dict_index_build_internal_non_clust(): Adjust min_prefix.
2006-08-31 11:00:02 +00:00
marko
d8aa49be04 branches/zip: Merge revisions 765:767 from trunk. 2006-08-29 12:17:50 +00:00
marko
38e09b2fea branches/zip: Merge revisions 720:765 from trunk and reindent the code
as per revisions r763:765.
2006-08-29 09:30:31 +00:00
marko
f4f5606fb6 branches/zip: Merge revisions 634:713 from trunk. 2006-08-11 11:49:38 +00:00
marko
d97b448b22 branches/zip: dict_check_tablespaces_and_store_max_id():
Determine zip_size in kilobytes, pass on in bytes.
2006-08-04 12:35:43 +00:00
marko
b355bd0fbc branches/zip: Fix some crash recovery bugs.
dict_load_table(): Initialize table->flags with zip_size.

mlog_parse_nbytes(), mlog_parse_string(): Add parameter page_zip and
write the changes also to the compressed page if one is specified.
Assert that these functions are not called on FIL_PAGE_INDEX pages.

buf_page_io_complete(): Replace block->frame with frame where appropriate.

recv_parse_or_apply_log_rec_body(): Add ut_a(!page_zip) where appropriate.

page_parse_delete_rec_list(): Add parameter page_zip.
2006-08-02 05:49:15 +00:00
marko
143aa19a1b branches/zip: dict_build_table_def_step(): Refuse to create a compressed
table in the system tablespace.
2006-07-06 19:24:53 +00:00
marko
7f8cb7aab9 branches/zip: Merge revisions 583:634 from trunk. 2006-06-13 20:23:26 +00:00
marko
1dd4d56863 branches/zip: Write compressed pages to disk.
os_aio_simulated_handle(): Temporarily disable os_file_check_page_trailers(),
which cannot be invoked on compressed pages.

dict_table_add_system_columns(): New function, split from
dict_table_add_to_cache().

mlog_parse_index(): Add system columns to the dummy table and identify
DB_TRX_ID and DB_ROLL_PTR in the dummy index.

buf_LRU_get_free_block(): Note that page_zip->data should be allocated from
an aligned memory pool.

buf_flush_buffered_writes(): Write compressed pages to disk.

buf_flush_post_to_doublewrite_buf(): Copy compressed pages to the
doublewrite buffer.  Zero fill any excess space.

buf_flush_init_for_writing(): Treat all compressed pages the same.

buf_read_page_low(): Read compressed pages from disk.

buf_page_io_complete(): Process compressed pages.

trx_sys_doublewrite_init_or_restore_page(): Process compressed pages.

mlog_write_initial_log_record_fast(): Enable a debug printout
#ifdef UNIV_LOG_DEBUG.

fsp_header_init(), fsp_fill_free_list(): Pass the compressed page size
to buf_page_create().

page_zip_compress_write_log(): Flatten the if-else if-else logic.

page_zip_parse_write_blob_ptr(): Do not test page_zip if page==NULL.

page_zip_parse_write_node_ptr(): Do not test page_zip if page==NULL.
Invoke mlog_close() correctly.

row_sel_store_row_id_to_prebuilt(): Add UNIV_UNLIKELY hint to an
assertion-like test.
2006-05-30 09:04:57 +00:00
marko
b15d26d6e2 branches/zip: Write the compressed page size to SYS_TABLES.TYPE and adjust
a few places accordingly.

os_aio_simulated_handle(): Add TODO comments about skipping the write
checks for compressed pages.

dict_create_sys_tables_tuple(): Write the compressed page size to
the TYPE column.

open_or_create_data_files(): Simplify the fil_node_create() call.

fil_node_create(): Do not touch space->zip_size.  It was already initialized
by fil_space_create().

fil_reset_too_high_lsns(), buf_flush_buffered_writes(): Add TODO comment
about compressed pages.

buf_flush_init_for_writing(): Handle pages of type FIL_PAGE_INODE,
FIL_PAGE_IBUF_BITMAP, and FIL_PAGE_TYPE_FSP_HDR as uncompressed ones.
2006-05-17 12:03:32 +00:00
marko
d30e44bc32 branches/zip: Merge revisions 465:532 from trunk. 2006-05-08 06:18:59 +00:00
marko
6dd1d8c4fe branches/zip: Write the compressed page size to SYS_TABLES.TYPE
and to the file space header (FSP_PAGE_ZIP_SIZE, renamed from
FSP_LOWEST_NO_WRITE).

fil_space_struct: Add zip_size.

dict_table_struct: Embed zip_size in flags.

dict_table_zip_size(): Infer zip_size from table->flags.

dict_sys_tables_get_zip_size(): Read zip_size from SYS_TABLES.TYPE.

fil_space_get_zip_size(): Read zip_size from the file space header.

Add the redo log entry type MLOG_ZIP_FILE_CREATE.
2006-04-25 07:12:32 +00:00
marko
802c09ad0a branches/zip: Merge revisions 459:465 from trunk. 2006-04-12 12:39:58 +00:00
marko
0c4dfda3be branches/zip: Merge revisions 265:459 from trunk. 2006-04-12 09:32:17 +00:00
marko
a1661efb8d branches/zip: Initial steps towards disk-based storage of compressed pages.
dict_mem_table_create(): Account for DICT_TF_COMPRESSED in a debug assertion.

btr_store_big_rec_extern_fields(), btr_free_externally_stored_field(),
btr_copy_externally_stored_field(): Implement the disk format for
compressed BLOB pages.

btr_copy_externally_stored_field(): Improve error reporting and handling
when decompressing BLOB pages.

buf_flush_init_for_writing(), buf_page_is_corrupted(), buf_page_print():
Account for compressed BLOB pages (FIL_PAGE_TYPE_ZBLOB).

buf_calc_zblob_page_checksum(): New function.
2006-04-05 13:41:12 +00:00
marko
e8e9fb28b4 branches/zip: Note that TRX_ID and ROLL_PTR only exist on B-tree leaf pages
of clustered indexes.  Previously, parts of the code assumed that these
columns would exist on all leaf pages.  Simplify the update-in-place of
these columns.

Add inline function dict_index_is_clust() to replace all tests
index->type & DICT_CLUSTERED.

Remove the redo log entry types MLOG_ZIP_WRITE_TRX_ID and
MLOG_ZIP_WRITE_ROLL_PTR, because the modifications to these columns
are covered by logical logging.

Fuse page_zip_write_trx_id() and page_zip_write_roll_ptr() into
page_zip_write_trx_id_and_roll_ptr().

page_zip_dir_add_slot(), page_zip_available(): Add flag "is_clustered",
so that no space will be reserved for TRX_ID and ROLL_PTR on leaf pages
of secondary indexes.

page_zip_apply_log(): Flag an error when val==0 is encoded with two bytes.

page_zip_write_rec(): Add debug assertions that there is enough space
available for the entry before copying the data bytes of the record.
2006-03-09 17:26:02 +00:00
marko
b965f460ac branches/zip: Merge table->zip to table->flags. Add dict_table_is_zip(). 2006-03-03 08:39:20 +00:00
marko
40b0bf7807 branches/zip: Merge revisions 236:247 from trunk. 2006-02-27 09:33:26 +00:00
marko
747c8fad44 branches/zip: Merge revisions 200:236 from trunk. 2006-02-23 19:25:29 +00:00
marko
03a6c35b09 branches/zip: Remove temporary hooks for testing BLOB compression.
dict_mem_table_create(): Initialize table->zip.

btr0cur.c: Distinguish compressed BLOBs based on page_zip or table->zip.
2006-02-21 14:43:23 +00:00
marko
dcfc19c47c branches/zip: Merge revisions 79:200 from trunk. 2006-02-17 14:19:39 +00:00
marko
12050c5c1c branches/zip: Prepare for in-place updates of B-tree node pointers,
BLOB pointers, trx_id, and roll_ptr.

btr_empty(), btr_create(), page_create(): Add parameter "index", as some
index information will be encoded on the compressed page.

Define REC_NODE_PTR_SIZE as 4.

Allow btr_page_reorganize() and btr_page_reorganize_low() to fail.

Define the error code DB_ZIP_OVERFLOW.

Make row_ins_index_entry_low() static.

page0zip: Encode the index, log reorganized records, and store uncompressed
fields separately from the compressed data stream.
2006-02-10 15:06:17 +00:00
marko
d5f33dafd8 branches/zip: Prepare for upcoming implementation of page_zip_compress()
that will require complete index information.

dict_create_index_step(): invoke dict_index_add_to_cache() before btr_create()

dict_index_remove_from_cache(): make public

dict_index_get_if_in_cache_low(): new function, for holding dict_sys->mutex

buf_flush_init_for_writing(): remove the temporary hook to page_zip_compress()

page_create(): add temporary hook to page_zip_compress()
2006-02-03 14:44:29 +00:00
marko
0bf7f4bd1d branches/zip: Merge revisions 9:72 from trunk. 2005-11-29 12:30:46 +00:00
osku
2903c72469 Import 5.0 code. 2005-10-27 07:29:40 +00:00