Commit graph

40 commits

Author SHA1 Message Date
marko
a8a3521b09 branches/zip: Merge 1556:1571 from trunk. 2007-06-12 10:59:01 +00:00
marko
ae0ae671da branches/zip: Correctly print the names of temporary tables and indexes
during fast index creation.

TEMP_TABLE_PREFIX: Move the definition from dict0dict.h to ut0ut.h.

ut_print_namel(): Check if the name starts with TEMP_TABLE_PREFIX.

innobase_rename_table(): Print all names with ut_print_name().

row_prebuilt_free(): Replace assert() with ut_a().
2007-06-12 07:06:36 +00:00
marko
99efc2aeff branches/zip: Initialize some uninitialized variables in order to avoid
comparing uninitialized values.

dict_mem_table_create(): Initialize table->version_number.

ins_node_create(): Initialize node->table_version_number.

row_create_prebuilt(): Initialize all fields.  Initialize most fields
by memset(), so that any fields that are added will be initialized
automatically.
2007-06-11 14:39:04 +00:00
marko
1a8a63d0cd branches/zip: Reimplement merge sort in fast index creation.
The creation of the primary key does not work.  We will have to flag
externally stored columns and copy the externally stored part from
the old table.

row_build_index_for_mysql(): Rename to row_merge_build_indexes().
Move from row0mysql.c to row0merge.c.

Remove private declarations from row0merge.h.  Make many functions static
in row0merge.c.

cmp_rec_rec_simple(): A new comparison function.

dict_index_get_min_size(): New function.

OS_FILE_FROM_FD(fd): A macro for converting from int to os_file_t.

rec_convert_dtuple_to_rec_comp(): Make the interface lower-level.

rec_get_converted_size_comp(): Return also extra_size.

UT_SORT_FUNCTION_BODY(): Remove reference to an obsolete test program.

row_rec_to_index_entry_low(): New function.

row0merge.c: Implement merge sort based on file streams instead of
fixed-size blocks.  Sort the small blocks as arrays of dfield_t*,
because it is faster than invoking rec_get_offsets() for every
comparison.
2007-06-08 07:37:07 +00:00
marko
b2c09f8a34 branches/zip: Minor cleanup.
row_merge_mark_prebuilt_obsolete(): Rename to row_prebuilt_table_obsolete()
and move from row0merge.c to row0mysql.c.  Remove the parameter trx.

row_merge_print_table(): Remove.
2007-06-04 07:51:10 +00:00
marko
eddd2aed6a branches/zip: Minor cleanup.
row_remove_indexes_for_mysql(): Rename to row_merge_drop_indexes(),
move from row0mysql.c to row0merge.c and make the return type void.

row_merge_remove_index(): Rename to row_merge_drop_index() and make
the return type void.
2007-06-04 07:49:31 +00:00
marko
ad0a869520 branches/zip: Correct the terminology: s/cluster index/clustered index/.
row_merge_read_clustered_index(): Simplify the loop that scans the
clustered index.
2007-05-22 06:48:53 +00:00
marko
88df83bb3b 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
a294481681 branches/zip: Make use of the function dict_index_is_unique(). 2007-04-16 09:21:39 +00:00
marko
7dd753edd8 branches/zip: Minor cleanup of merge_file_t and merge_block_header_t.
Replace byte offsets of type dulint with block offsets of type ulint.
Avoid references to MERGE_BLOCK_SIZE.

Improve the language of some comments.

row_merge_insert_index_tuples(), row_merge_sort_linked_list_in_disk():
Make the offset a ulint.

row_merge_read(), row_merge_write(): Helper functions.  Return the
status of os_file_read() and os_file_write().  TO DO: check the status
in the callers.
2007-04-12 10:32:16 +00:00
marko
5378db6e10 branches/zip: More cleanup of fast index creation.
innobase_create_temporary_tablename(): Add static qualifier.  Allocate
the memory from heap.  Return a fixed identifier.

ha_innobase::add_index(): Allocate all memory from a single heap.
Simplify error handling.  Use a fixed prefix for temporary table names,
because only one add_index() can be active for a given table.

mem_heap_empty_noninline(): New function, to be called from ha_innodb.cc.

row_build_index_for_mysql(): Remove the parameter new_primary.
2007-04-12 05:14:41 +00:00
marko
d33e525a08 branches/zip: Initial clean up of the merge sort subsystem.
Define the merge_rec_ structures in row0merge.c instead of
row0merge.h.  They are not used in the interface defined in row0merge.h.

row_merge_create_file_structure(): Rename to row_merge_file_create().
Input a pointer to a pre-allocated block of memory.

row_merge_read_clustered_index(): Replace merge_file_t** with merge_file_t*.

row_merge_sort_and_insert_thread(): Remove the declaration.
This function was never defined or called.

row_merge_is_index_usable(): Correct the formatting.

row_build_index_for_mysql(): Allocate an array of merge_file_t instead
of an array of pointers to merge_file_t.
2007-04-11 08:16:14 +00:00
marko
fc65b08f53 branches/zip: Merge branches/fast-index-creation -r1413.
Fix some bugs.  The tests innodb and innodb-index fail, but that might
be due to an old MySQL source tree being used.
2007-04-04 11:05:33 +00:00
marko
4d6805f2a8 branches/zip: Merge revisions 1322:1402 from trunk. 2007-04-02 05:39:41 +00:00
marko
d753d3e83c 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
5fc003b65d branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. 2007-01-18 18:29:12 +00:00
marko
8f65d7a661 branches/zip: Merge revisions 1165:1206 from trunk. 2007-01-18 12:58:39 +00:00
marko
229d901921 branches/zip: Fix compilation errors when UNIV_HOTBACKUP is defined. 2006-11-30 15:25:52 +00:00
marko
329a29c2fb 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
7593a465db 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
d9e1e326cb branches/zip: Port r973 from trunk.
Do not break the latching order in TRUNCATE TABLE.

dict_truncate_index_tree(): Replace parameter rec_t* rec with
btr_pcur_t* pcur.  Reposition pcur before calling btr_create().

sync_thread_add_level(): Remove the relaxation of the assertion added in r968.
2006-10-30 13:44:00 +00:00
marko
438cb8a6c1 branches/zip: Remove all buf_block_align() calls from lock0lock.c.
Replace all page_t* parameters with buf_block_t*, and replace many
rec_t* parameters with heap_no.  This eliminates also many
rec_get_heap_no() calls, which became more expensive with the
introduction of ROW_FORMAT=COMPACT in MySQL/InnoDB 5.0.3.

page_rec_get_heap_no(), lock_get_min_heap_no(): New functions.
2006-10-24 06:45:52 +00:00
marko
fbe4fe6022 branches/zip: Remove the casts introduced in r920 and r925. Replace the
accessors returning pointers with macros that preserve const qualifiers.
In UNIV_DEBUG builds, retain the accessors and cast away constness there.

dfield_get_type(), dfield_get_data(), dtuple_get_nth_field(),
dict_table_get_nth_col(), dict_table_get_sys_col(): Implement as macro
unless #ifdef UNIV_DEBUG.

rec_get_nth_field(): Replace with rec_get_nth_field_offs() that does not
do pointer arithmetics.  Implement rec_get_nth_field() as a macro.
2006-10-19 07:27:26 +00:00
marko
8f07794024 branches/zip: Introduce const qualifiers to many read-only parameters
and modify some functions to return const pointers.  Add const qualifiers
to local variable declarations or casts to remove the const qualifier
in those places where write access is needed.
2006-10-17 12:24:13 +00:00
marko
68a65c142c branches/zip: Merge revisions 804:838 from trunk. 2006-09-19 10:14:07 +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
ec6213a7c4 branches/zip: Merge revisions 713:720 from trunk. 2006-08-15 11:55:06 +00:00
marko
f4f5606fb6 branches/zip: Merge revisions 634:713 from trunk. 2006-08-11 11:49:38 +00:00
marko
7f8cb7aab9 branches/zip: Merge revisions 583:634 from trunk. 2006-06-13 20:23:26 +00:00
marko
80915cdf91 branches/zip: Merge revisions 560:583 from trunk. 2006-05-22 09:30:34 +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
0c4dfda3be branches/zip: Merge revisions 265:459 from trunk. 2006-04-12 09:32:17 +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
3cdf3e1c6c branches/zip: Merge revisions 247:265 from trunk. 2006-03-03 14:43:05 +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
dcfc19c47c branches/zip: Merge revisions 79:200 from trunk. 2006-02-17 14:19:39 +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