------------------------------------------------------------------------
r2809 | marko | 2008-10-16 09:41:13 +0300 (Thu, 16 Oct 2008) | 18 lines
branches/zip: Skip the undo log size check on REDUNDANT and COMPACT tables.
In ROW_FORMAT=DYNAMIC and ROW_FORMAT=COMPRESSED, column prefix indexes
require that prefixes of externally stored columns be written to the
undo log. This may make the undo log record bigger than the record on
the B-tree page. The maximum size of an undo log record is the page
size. That must be checked for, in dict_index_add_to_cache().
dict_index_add_to_cache(): Skip the undo log size check for REDUNDANT
and COMPACT tables. These tables store prefixes of externally stored
columns locally within the clustered index record. There are no special
considerations for the undo log record size.
innodb-index.test: Ensure that the check exists for ROW_FORMAT=DYNAMIC,
but not for ROW_FORMAT=COMPACT.
This fixes issue #99. rb://28 approved by Sunny.
------------------------------------------------------------------------
r2810 | vasil | 2008-10-16 19:57:58 +0300 (Thu, 16 Oct 2008) | 12 lines
branches/zip:
Fix Mantis issue#61:
In row_undo_ins_parse_undo_rec(): if we find that a table has no indexes
(dict_table_get_first_index() returns NULL) do not try to call
trx_undo_rec_get_row_ref() with a NULL pointer because that would lead to
a crash. Instead, print a warning and set node->table to NULL just like
it is done if the .ibd file is missing.
Approved by: Heikki (via IM)
------------------------------------------------------------------------
r2824 | marko | 2008-10-20 09:58:01 +0300 (Mon, 20 Oct 2008) | 2 lines
branches/zip: rec_convert_dtuple_to_rec_comp(): Relax a too tight assertion.
Spotted by Sunny.
------------------------------------------------------------------------
r2825 | vasil | 2008-10-20 13:41:04 +0300 (Mon, 20 Oct 2008) | 6 lines
branches/zip:
Print the table name via ut_print_name() and add two spaces before InnoDB.
Suggested by: Marko
------------------------------------------------------------------------
r2833 | marko | 2008-10-21 10:16:45 +0300 (Tue, 21 Oct 2008) | 2 lines
branches/zip: ibuf_insert_low(): Avoid unnecessarily
acquiring and releasing ibuf_mutex.
------------------------------------------------------------------------
r2834 | marko | 2008-10-21 10:18:57 +0300 (Tue, 21 Oct 2008) | 1 line
branches/zip: ibuf_delete_rec(): Add debug assertions suggested by Heikki.
------------------------------------------------------------------------
r2835 | marko | 2008-10-21 11:04:06 +0300 (Tue, 21 Oct 2008) | 1 line
branches/zip: ibuf_insert_low(): Simplify a comparison.
------------------------------------------------------------------------
and add assertions to callers. Remove the added ibool* parameter and
return enum row_search_result instead of ibool, to reflect the four
different outcomes: record found, not found, buffered, and status unknown
(record not in the buffer pool).
rb://6
The followin mysql-tests failed (and they are known to fail):
main.information_schema [ fail ]
main.innodb_file_per_table_basic[ fail ]
main.type_bit_innodb [ fail ]
Tested against : MYSQL_SERVER_VERSION "5.1.28"
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.
inserted, uncommitted clustered index records when determining if a
secondary index record that contains a column prefix of an externally
stored column is referencing the clustered index record.
field_ref_zero[]: A BLOB pointer full of zero, for use in comparisons.
btr_copy_externally_stored_field_prefix(): Assert that the BLOB pointer is set.
row_ext_lookup_ith(), row_ext_lookup(), row_ext_lookup_low(): Document
that field_ref_zero is returned when the BLOB cannot be fetched.
row_ext_lookup_low(): Return field_ref_zero and *len = 0 when the
BLOB pointer is unset.
row_build_index_entry(): Return NULL when a needed BLOB pointer cannot
be dereferenced (row_ext_lookup returns field_ref_zero). Check the
return value for NULL in callers.
row_vers_impl_x_locked_off_kernel(): Avoid comparisons when
row_build_index_entry() returns NULL.
row_vers_old_has_index_entry(): Ignore records for which
row_build_index_entry() returns NULL. The entry should never be NULL
in rollback, but it may be NULL in purge.
row_merge_buf_add(): Assert that row_ext_lookup() does not return
field_ref_zero. The table will be locked during 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.
row_upd_index_is_referenced(), row_upd_check_references_constraints(),
row_purge_parse_undo_rec(): Remove duplicated code that calls
row_mysql_unfreeze_data_dictionary().
row_undo_ins_remove_clust_rec():
Assert that the data dictionary is X-latched. Do not attempt to re-latch
the data dictionary, because doing so introduces race conditions. This
re-latching was probably made unnecessary already in r1676, which keeps
the data dictionary X-latched in ha_innobase::add_index() for the complete
duration of the data dictionary operations.
row_undo_ins_parse_undo_rec(): Do not attempt to acquire the data dictionary
latch. The data dictionary should be already X-latched when a transaction
that modifies system tables is rolled back. This also holds in the rollback
during crash recovery: trx_rollback_active() will X-latch the data dictionary
when needed.
Replace row0merge.h with row0mysql.h.
Remove redundant test trx->dict_operation_lock_mode == 0.
Fix typos in comments.
row_undo_ins(): Make the function more similar to the one in trunk.
in the clustered index to be smaller than the indexed prefix in secondary
indexes.
row_ext_lookup(): Return NULL if the column is not stored externally.
trx_undo_rec_get_partial_row(): row_build(): Add parameter row_ext_t** ext.
row_build_index_entry(): Add the parameter row_ext_t* ext.
Invoke row_ext_lookup() to fetch prefixes of externally stored columns.
upd_node_t, undo_node_t, purge_node_t: Add the field row_ext_t* ext.