that were accidentally committed in r2971:
univ.i, ha_innobase::create(): Reduce the uncompressed page size from
16 to 4 kilobytes.
btr_cur_search_to_nth_level(): Print a diagnostic message when the
leaf page of a secondary index is being requested from the disk.
buf_read_ahead_random(), buf_read_ahead_linear(): Disable.
Invoke ibuf_get_volume_buffered_count() as many times as
ibuf_rec_get_volume(rec), so that *n_recs will be updated as appropriate.
This fixes Issue #82: some deletes will be buffered in purge.
pages becoming empty. Remove work-arounds for empty pages. This fixes
Issue #82.
ibuf_get_volume_buffered(): Add the output parameter n_recs, for returning
the minimum number of records on the page.
ibuf_insert_low(): Refuse to buffer IBUF_OP_DELETE if the page could
become empty.
btr_page_get_father_node_ptr(): Remove the work-around for the page
being empty.
page_zip_dir_delete(): Revert to the version from branches/zip.
Always invoke page_zip_clear_rec().
------------------------------------------------------------------------
r2838 | vasil | 2008-10-21 12:49:27 +0300 (Tue, 21 Oct 2008) | 61 lines
branches/zip:
Merge 2744:2837 from branches/5.1 (skipping r2782 and r2826):
------------------------------------------------------------------------
r2832 | vasil | 2008-10-21 10:08:30 +0300 (Tue, 21 Oct 2008) | 10 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
branches/5.1:
In ha_innobase::info():
Replace sql_print_warning() which prints to mysqld error log with
push_warning_printf() which sends the error message to the client.
Suggested by: Marko, Sunny, Michael
Objected by: Inaam
------------------------------------------------------------------------
r2837 | vasil | 2008-10-21 12:07:44 +0300 (Tue, 21 Oct 2008) | 32 lines
Changed paths:
M /branches/5.1/mysql-test/innodb-semi-consistent.result
M /branches/5.1/mysql-test/innodb-semi-consistent.test
M /branches/5.1/mysql-test/innodb.result
M /branches/5.1/mysql-test/innodb.test
branches/5.1:
Merge a change from MySQL (this fixes the failing innodb and
innodb-semi-consistent tests):
revno: 2757
committer: Georgi Kodinov <kgeorge@mysql.com>
branch nick: B39812-5.1-5.1.29-rc
timestamp: Fri 2008-10-03 15:24:19 +0300
message:
Bug #39812: Make statement replication default for 5.1 (to match 5.0)
Make STMT replication default for 5.1.
Add a default of MIXED into the config files
Fix the tests that needed MIXED replication mode.
modified:
mysql-test/include/mix1.inc
mysql-test/r/innodb-semi-consistent.result
mysql-test/r/innodb.result
mysql-test/r/innodb_mysql.result
mysql-test/r/tx_isolation_func.result
mysql-test/t/innodb-semi-consistent.test
mysql-test/t/innodb.test
mysql-test/t/tx_isolation_func.test
sql/mysqld.cc
support-files/my-huge.cnf.sh
support-files/my-innodb-heavy-4G.cnf.sh
support-files/my-large.cnf.sh
support-files/my-medium.cnf.sh
support-files/my-small.cnf.sh
------------------------------------------------------------------------
------------------------------------------------------------------------
r2847 | marko | 2008-10-22 10:07:37 +0300 (Wed, 22 Oct 2008) | 6 lines
branches/zip: page_zip_rec_needs_ext(): Fix a bug that was introduced
in the fix of Mantis issue #73. With key_block_size=16, we will also
have to check the available space on the uncompressed page.
Otherwise, the clustered index record can be almost 16 kilobytes in
size, and the undo log record will not fit.
------------------------------------------------------------------------
r2850 | marko | 2008-10-22 13:52:12 +0300 (Wed, 22 Oct 2008) | 2 lines
branches/zip: ibuf_insert_to_index_page(): Discard the local variable block.
page_cur is always positioned on block, the function parameter.
------------------------------------------------------------------------
r2853 | sunny | 2008-10-23 01:52:09 +0300 (Thu, 23 Oct 2008) | 2 lines
branches/zip: Add missing UNIV_INTERN.
------------------------------------------------------------------------
r2855 | sunny | 2008-10-23 09:29:46 +0300 (Thu, 23 Oct 2008) | 36 lines
branches/zip:
Merge revisions 2837:2852 from branches/5.1:
------------------------------------------------------------------------
r2849 | sunny | 2008-10-22 12:01:18 +0300 (Wed, 22 Oct 2008) | 8 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/include/row0mysql.h
M /branches/5.1/row/row0mysql.c
branches/5.1: Return the actual error code encountered when allocating
a new autoinc value. The change in behavior (bug) was introduced in 5.1.22
when we introduced the new AUTOINC locking model.
rb://31
Bug#40224 New AUTOINC changes mask reporting of deadlock/timeout errors
------------------------------------------------------------------------
r2852 | sunny | 2008-10-23 01:42:24 +0300 (Thu, 23 Oct 2008) | 9 lines
Changed paths:
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/handler/ha_innodb.h
branches/5.1: Backport r2724 from branches/zip
Check column value against the col max value before updating the table's
global autoinc counter value. This is part of simplifying the AUTOINC
sub-system. We extract the type info from MySQL data structures at runtime.
This fixes Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
------------------------------------------------------------------------
------------------------------------------------------------------------
r2856 | sunny | 2008-10-23 10:07:05 +0300 (Thu, 23 Oct 2008) | 1 line
Reverting test file changes from r2855
------------------------------------------------------------------------
r2857 | sunny | 2008-10-23 10:24:33 +0300 (Thu, 23 Oct 2008) | 30 lines
branches/zip:
Merge revisions 2852:2854 from branches/5.1:
------------------------------------------------------------------------
r2854 | sunny | 2008-10-23 08:30:32 +0300 (Thu, 23 Oct 2008) | 13 lines
Changed paths:
M /branches/5.1/dict/dict0dict.c
M /branches/5.1/dict/dict0mem.c
M /branches/5.1/handler/ha_innodb.cc
M /branches/5.1/handler/ha_innodb.h
M /branches/5.1/include/dict0dict.h
M /branches/5.1/include/dict0mem.h
M /branches/5.1/row/row0mysql.c
branches/5.1: Backport changes from branches/zip r2725
Simplify the autoinc initialization code. This removes the
non-determinism related to reading the table's autoinc value for the first
time. This change has also reduced the sizeof dict_table_t by sizeof(ibool)
bytes because we don't need the dict_table_t::autoinc_inited field anymore.
Bug#39830 Table autoinc value not updated on first insert.
Bug#35498 Cannot get table test/table1 auto-inccounter value in ::info
Bug#36411 Failed to read auto-increment value from storage engine" in 5.1.24 auto-inc
rb://16
------------------------------------------------------------------------
------------------------------------------------------------------------
r2858 | vasil | 2008-10-23 11:33:43 +0300 (Thu, 23 Oct 2008) | 4 lines
branches/zip:
Update the ChangeLog
------------------------------------------------------------------------
r2861 | marko | 2008-10-23 12:27:15 +0300 (Thu, 23 Oct 2008) | 24 lines
branches/zip: Clean up the file format stamping.
trx_sys_file_format_max_upgrade(): Rename from
trx_sys_file_format_max_update(). Improve the documentation. Add a
const qualifier to the parameter "name". Replace the parameter
"flags" with "format_id", because this function should deal with file
format identifiers, not with table flags.
trx_sys_file_format_max_write(), trx_sys_file_format_max_set(): Add a
const qualifier to the parameter "name".
ha_innodb.cc: Correct the spelling in some comments: "side effect".
Remove redundant prototypes for some static callback functions.
innodb_file_format_name_update(), innodb_file_format_check_update():
Correct the function signature. Use appropriate pointer type conversions.
MYSQL_SYSVAR_STR(file_format), MYSQL_SYSVAR_STR(file_format_check):
Remove the type conversions from the callback function pointers. When
the function signatures match, no type conversion is needed. The type
conversions would only prevent compilation warnings for any mismatch.
Approved by Sunny in rb://25.
------------------------------------------------------------------------
r2862 | marko | 2008-10-23 12:37:42 +0300 (Thu, 23 Oct 2008) | 8 lines
branches/zip: Non-functional changes:
ibuf_get_volume_buffered(): Declare with static linkage.
This function is private to ibuf0ibuf.c.
btr_cur_pessimistic_delete(): Use the cached result of
btr_cur_get_index(cursor).
------------------------------------------------------------------------
------------------------------------------------------------------------
r2781 | marko | 2008-10-13 13:40:57 +0300 (Mon, 13 Oct 2008) | 1 line
branches/zip: page_cur_delete_rec(): Call page_zip_validate_low().
------------------------------------------------------------------------
r2783 | vasil | 2008-10-13 18:34:34 +0300 (Mon, 13 Oct 2008) | 9 lines
branches/zip:
Remove mysql-test/patches/bug37312.diff because MySQL "fixed"
Bug#37312 by removing the test.
http://bugs.mysql.com/37312http://lists.mysql.com/commits/54462
------------------------------------------------------------------------
r2784 | marko | 2008-10-13 21:35:30 +0300 (Mon, 13 Oct 2008) | 1 line
branches/zip: Add missing NULL check to the assertion added in r2781.
------------------------------------------------------------------------
r2785 | marko | 2008-10-13 22:29:12 +0300 (Mon, 13 Oct 2008) | 2 lines
branches/zip: page_cur_delete_rec(): Remove the bogus page_zip_validate_low()
assertion that was added in r2781 and explain why it was bogus.
------------------------------------------------------------------------
r2786 | calvin | 2008-10-14 19:14:47 +0300 (Tue, 14 Oct 2008) | 7 lines
branches/zip: fix Mantis issue #96 Problem compiling ha_innodb.cc
on 64-bit Windows
Change the definition of srv_replication_delay from ulint to ulong.
ulint is 64-bit on Win64.
Approved by: Heikki (on IM)
------------------------------------------------------------------------
r2787 | calvin | 2008-10-14 19:19:41 +0300 (Tue, 14 Oct 2008) | 7 lines
branches/zip: fix compiler warning
Change the definition of add_on from ulint to ullint, to eliminate
the warning in .\btr\btr0cur.c:
conversion from 'ullint' to 'ulint', possible loss of data
Approved by: Heikki (on IM)
------------------------------------------------------------------------
r2793 | marko | 2008-10-15 10:00:06 +0300 (Wed, 15 Oct 2008) | 2 lines
branches/zip: row_create_table_for_mysql(), row_create_index_for_mysql():
Note that the dictionary object will be freed.
------------------------------------------------------------------------
r2794 | marko | 2008-10-15 10:32:40 +0300 (Wed, 15 Oct 2008) | 9 lines
branches/zip: When invoking page_zip_copy_recs(), update the lock table
and the adaptive hash index. This should fix Issue #95 and Issue #87.
page_zip_copy_recs(): Copy PAGE_MAX_TRX_ID as well, to have similar behavior
to page_copy_rec_list_start() and page_copy_rec_list_end().
btr_root_raise_and_insert(), btr_page_split_and_insert(), btr_lift_page_up():
Update the lock table and the adaptive hash index.
------------------------------------------------------------------------
r2797 | marko | 2008-10-15 13:21:54 +0300 (Wed, 15 Oct 2008) | 3 lines
branches/zip: Introduce UNIV_ZIP_COPY for invoking page_zip_copy_recs()
more often in B-tree operations.
------------------------------------------------------------------------
r2799 | marko | 2008-10-15 14:27:42 +0300 (Wed, 15 Oct 2008) | 25 lines
branches/zip: When the server crashes while freeing an externally stored
column of a compressed table, the BTR_EXTERN_LEN field in the BLOB pointer
will be written as 0. Tolerate this in the functions that deal with
externally stored columns. This fixes Issue #80 and was posted at rb://26.
Note that the clustered index record is always deleted or purged last,
after any secondary index records referring to it have been deleted.
btr_free_externally_stored_field(): On an uncompressed table, zero out
the BTR_EXTERN_LEN, so that half-deleted BLOBs can be detected after
crash recovery.
btr_copy_externally_stored_field_prefix(): Return 0 if the BLOB has been
half-deleted.
row_upd_ext_fetch(): Assert that the externally stored column exists.
row_ext_cache_fill(): Allow btr_copy_externally_stored_field_prefix()
to return 0.
row_sel_sec_rec_is_for_blob(): Return FALSE if the BLOB has been half-deleted.
This is correct, because the clustered index record would have been deleted
or purged last, after any secondary index records referring to it had been
deleted.
------------------------------------------------------------------------
when encountering an empty leaf page, we should advance to the right
siblings until a non-empty page is found. Move the initialization of
cursor->ibuf_cnt to a better place.
error. In r2324, when changes were merged from branches/fts, the
assignment guess = NULL was accidentally removed after height--.
The assignment is in that place in branches/fts since r990.
from branches/zip.
btr_cur_optimistic_delete(): Split a too long line in the way it is
split in branches/zip.
buf_page_get_gen(): Add missing space in the function comment.
buf_print_io(): Restoer a removed space to the printout.
univ.i: Remove C++-style (or C99-style) comments.
buf0buf.h: Undo the white-space changes to the wrapper macros of
buf_page_get_gen().
ibuf_update_free_bits_low(): Revert the changes. Restore the assertion
that this function must not be invoked on compressed pages. The function
ibuf_update_free_bits_zip() is for compressed pages.
ibuf_insert_to_index_page(): Undo a white-space change.
btr0cur.c: Undo changes to white space that make the code differ from
branches/zip.
btr_cur_del_unmark_for_ibuf(): Remove this unused function.
btr_cur_set_deleted_flag_for_ibuf(): Add missing UNIV_INTERN specifier.
Correct the function comment. Call btr_rec_set_deleted_flag() instead
of rec_set_deleted_flag_new(), so that delete buffering will actually
work on ROW_FORMAT=REDUNDANT tables.
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"
Fix Bug#25640:
Introduce an user visible parameter innodb_stats_sample (default 8,
min 1, max 1000) and use that parameter instead of the
BTR_KEY_VAL_ESTIMATE_N_PAGES macro. Remove this macro.
Approved by: Heikki
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.
btr_cur_pessimistic_update(): Note why the externally stored columns
of a record on a latched page cannot have been purged.
trx_undo_get_undo_rec(): Clarify that the stack of versions is locked
all the way down to the purge view.
trx_undo_prev_version_build(): Set *old_vers = NULL also when the record
could have been purged already. Add some clarifying comments.
is not indexed.
btr_search_update_hash_ref(), btr_search_drop_page_hash_index(),
btr_search_build_page_hash_index(), btr_search_update_hash_on_delete(),
btr_search_update_hash_node_on_insert(), btr_search_update_hash_on_insert(),
btr_search_validate():
Assert that hashed blocks do not belong to the insert buffer tree.
btr_search_move_or_delete_hash_entries():
When invoked on the insert buffer tree, assert that neither block is hashed.
to the undo log, also store the original length of the column, so that the
changes will be correctly undone in transaction rollback or when fetching
previous versions of the row.
innodb-zip.test: New file, for tests of the compression.
upd_field_t: Add orig_len, the original length of new_val.
btr_push_update_extern_fields(): Restore the original prefix of the column.
Add the parameter heap where memory will be allocated if necessary.
trx_undo_rec_get_col_val(): Add the output parameter orig_len.
trx_undo_page_report_modify_ext(): New function: Write an externally
stored column to the undo log. This is only called from
trx_undo_page_report_modify(), and this is the only caller of
trx_undo_page_fetch_ext().
trx_undo_update_rec_get_update(): Read the original length of the column
prefix to upd_field->orig_len.
btr_page_get_sure_split_rec(): Remove the check if insert_size
exceeds free_space.
btr_page_split_and_insert(): If a compressed page has already been split,
avoid further splits by inserting the record to an empty page. As a
performance optimization, avoid invoking btr_page_insert_fits() on
compressed tables.
stored columns (BLOBs).
btr_copy_blob_prefix(), btr_copy_zblob_prefix(),
btr_copy_externally_stored_field_prefix_low(),
btr_copy_externally_stored_field_prefix(),
btr_copy_externally_stored_field(),
btr_rec_copy_externally_stored_field():
Note that the page containing the clustered index record that points to
the BLOB must be latched.
btr_copy_zblob_prefix(): Note that there is no latch on the page, and thus
all accesses to a given page via this function must be covered by the same
set of locks or latches.
btr_copy_zblob_prefix(): Note that the block acquired by
buf_page_get_zip() is protected by an exclusive table lock or
or by a latch on the clustered index record.
row_build(), row_upd_index_replace_new_col_vals_index_pos(), and
row_upd_index_replace_new_col_vals() are safe.
btr_cur_optimistic_update(), btr_cur_pessimistic_update(): Note that
the B-tree page of the clustered index record is latched in mtr.
trx_undo_prev_version_build(): Add const qualifiers to index_rec
and rec. Note that the page of index_rec is latched in index_mtr.
row_vers_impl_x_locked_off_kernel(), row_vers_old_has_index_entry():
Note that the stack of versions is locked by mtr and thus it is
safe to call row_build().
buf_pool->mutex: Rename to buf_pool_mutex, so that the wrappers will have
to be used when changes are merged from other source trees.
buf_pool->zip_mutex: Rename to buf_pool_zip_mutex.
buf_pool_mutex_own(), buf_pool_mutex_enter(), buf_pool_mutex_exit():
Wrappers for buf_pool_mutex.
btr_copy_blob_prefix(), btr_copy_externally_stored_field_prefix_low():
Document the return value as "number of bytes written", not "bytes written".
trx_undo_page_fetch_ext(): Explain the assertion ut_a(ext_len).
row_build_index_entry(): Explain the assertion ut_a(!ext).
mutex is temporarily released.
buf_LRU_free_block(), buf_buddy_alloc_clean(): Add an output parameter that
will be assigned TRUE when the buffer pool mutex is released.
This bug was spotted by and fix provided by Sunny.
univ.i: Do not define UNIV_DEBUG, UNIV_ZIP_DEBUG.
btr_cur_del_unmark_for_ibuf(): Use the same comment in both btr0cur.c and
btr0cur.h. Wrap long lines.
contents end up with conflicting versions of a record's state. The zipped
page record was not being marked as "(un)deleted" because we were not
passing the zipped page contents to the (un)delete function, which first
(un)delete marks the uncompressed version and then based on whether
page_zip is NULL or not (un)delete marks the record in the compressed page.
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.
btr_cur_optimistic_insert(), pass big_rec to it, so that
the field references of externally stored columns (BLOB pointers)
will not be left uninitialized after a successful optimistic insert.
This bug was spotted by Sunny.
column prefix of an externally stored column.
row_upd_ext_fetch(): New function.
row_upd_index_replace_new_col_vals(),
row_upd_index_replace_new_col_vals_index_pos(): Fetch prefixes of
externally stored columns when they are needed for column prefix
indexes. For memory allocation, add the parameter ext_heap. Avoid
repeating the inner loop after finding a matching upd_field->field_no.