Commit graph

257 commits

Author SHA1 Message Date
marko
58d342c90a branches/innodb+: Revert some debugging-related changes
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.
2008-11-07 12:16:36 +00:00
marko
7c37bc941f branches/innodb+: ibuf_get_volume_buffered():
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.
2008-11-06 12:41:18 +00:00
marko
4a7bd430ba branches/innodb+: Refuse to buffer deletes if that could lead to B-tree
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().
2008-10-23 10:22:46 +00:00
marko
70f1128619 branches/innodb+: Merge revisions 2835:2862 from branches/zip:
------------------------------------------------------------------------
  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).
  ------------------------------------------------------------------------
2008-10-23 10:03:20 +00:00
marko
a980b544cd branches/innodb+: Merge revisions 2774:2799 from branches/zip:
------------------------------------------------------------------------
  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/37312
  http://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.
  ------------------------------------------------------------------------
2008-10-15 12:09:17 +00:00
marko
d6d6f656ee branches/innodb+: btr_cur_search_to_nth_level(): Add a TODO comment that
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.
2008-10-15 10:18:28 +00:00
marko
f7e76f23c1 branches/innodb+: Merge revisions 2678:2774 from branches/zip. 2008-10-11 19:37:21 +00:00
marko
99d6926335 branches/innodb+: page_zip_dir_delete(): Do not clear the last record on
a secondary index leaf page, because that could break delete buffering.

btr_page_get_father_node_ptr(): Remove a TODO comment regarding this.
2008-09-30 11:21:39 +00:00
marko
7ec0b7180a branches/innodb+: btr_cur_search_to_nth_level(): Correct a merge
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.
2008-09-25 10:31:45 +00:00
marko
211417e27e branches/innodb+: Merge revisions 2660:2676 from branches/zip. 2008-09-24 09:45:19 +00:00
marko
365402d771 branches/innodb+: Non-functional change:
ibuf_rec_get_counter(): Rename from ibuf_rec_get_fake_counter().  There is
nothing fake about the counter.  Also add const qualifiers to the pointers.
2008-09-22 10:38:51 +00:00
marko
dcbd036c00 branches/innodb+: Non-functional change: Use dict_index_is_ibuf()
instead of accessing index->type directly.
2008-09-22 10:31:18 +00:00
marko
56d28f1c57 branches/innodb+: Merge 2637:2660 from branches/zip. 2008-09-22 07:57:34 +00:00
marko
93fdc0e4ac branches/innodb+: Undo another white-space change that makes the code
differ from branches/zip.
2008-09-19 13:34:12 +00:00
marko
0c4879da3d branches/innodb+: Revert some changes that make the code differ
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.
2008-09-18 07:01:13 +00:00
marko
e5833be894 branches/innodb+: btr_page_get_father_node_ptr(): Add TODO comments about
accessing a freed record on a compressed page.
2008-09-18 06:56:32 +00:00
marko
8638150c6c branches/innodb+: Merge 2579:2637 from branches/zip. 2008-09-17 19:52:30 +00:00
marko
24f1b3a91e branches/innodb+: Minor cleanup.
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.
2008-09-17 19:31:42 +00:00
sunny
d0e8003b2f branches/innodb+: Merge revisions 2460:2579 from branches/zip
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"
2008-08-09 00:15:46 +00:00
sunny
093fb51fb4 branches/innodb+: Fix typo in comment. 2008-06-16 03:11:30 +00:00
inaam
c5dacc2914 branches/innodb+: Merge revisions 2344:2454 from branches/zip 2008-05-14 15:43:19 +00:00
marko
0c5b8df908 branches/innodb+: Merge revisions 2340:2343 from branches/zip 2008-03-03 12:57:07 +00:00
marko
5cf58ce919 branches/innodb+: Merge revisions 2322:2340 from branches/zip 2008-03-03 10:25:27 +00:00
sunny
fceb78e698 branches/innodb+: Delete buffer port from branches/fts:r2283 2008-02-27 07:03:34 +00:00
vasil
fb30a2032b branches/innodb+:
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
2008-02-19 14:21:05 +00:00
marko
36a5b2cd37 branches/zip: Merge 2263:2295 from branches/5.1. 2008-02-18 20:09:03 +00:00
marko
1d1dc31a06 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
c9087d7d90 branches/zip: Apply some fixes suggested by Heikki.
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.
2008-02-04 12:47:00 +00:00
marko
993c02cf04 branches/zip: Assert in the adaptive hash that the insert buffer B-tree
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.
2008-01-25 14:37:11 +00:00
marko
0a63ed9c4e branches/zip: Introduce the accessor function dict_index_is_ibuf()
for determining if an index is the insert buffer B-tree.
2008-01-25 08:13:12 +00:00
marko
8958f06278 branches/zip: Introduce the page type code FIL_PAGE_TYPE_ZBLOB2 for
continuation pages containing compressed BLOBs.  The first compressed
BLOB page will be of type FIL_PAGE_TYPE_ZBLOB.
2008-01-24 08:12:02 +00:00
marko
b52a30e09d branches/zip: When storing a longer prefix of an externally stored column
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.
2008-01-23 13:46:45 +00:00
marko
0d59bf8ee6 branches/zip: Avoid infinite page splits on compressed tables.
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.
2008-01-17 12:29:03 +00:00
marko
b060f8baad branches/zip: btr_page_get_sure_split_rec(): Return NULL when the record
is not guaranteed to fit on a compressed page, instead of letting
an assertion fail.
2008-01-16 14:14:36 +00:00
marko
e693d5170d branches/zip: Add comments about the lock and latch protection of externally
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.
2008-01-16 10:45:14 +00:00
marko
44340b6e8e branches/zip: Add comments that clarify why the remaining calls to
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().
2008-01-14 10:04:45 +00:00
marko
1cbf67cdbf branches/zip: btr_copy_zblob_prefix(): Print d_stream->msg on decompression
failure.
2008-01-10 11:06:01 +00:00
marko
cdb5b46445 branches/zip: Implement wrappers for all operations on the buffer pool mutex.
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.
2008-01-10 09:37:13 +00:00
marko
02819f3e55 branches/zip: btr_cur_mark_extern_inherited_fields():
Add a call to rec_offs_any_extern() as an optimization.
2008-01-04 14:01:45 +00:00
vasil
1ae59d9e65 branches/zip:
Change the output format of transaction ids from 2 32bit numbers separated
by space to a single hex number.

Suggested by:	Heikki
Approved by:	Heikki
2007-12-20 14:08:16 +00:00
marko
8c852371e5 branches/zip: Add some clarifying comments.
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).
2007-12-20 09:10:42 +00:00
marko
33e082be24 branches/zip: buf_buddy_alloc(): Assign *lru = TRUE whenever the buffer pool
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.
2007-12-10 09:48:28 +00:00
marko
c440688147 branches/zip: btr_cur_pessimistic_update(), btr_cur_pessimistic_delete():
Use rec_offs_any_extern() as a condition for freeing externally stored
columns.  This is only a performance optimization.
2007-12-05 09:49:09 +00:00
marko
71cf1edf8d branches/zip: btr_store_big_rec_extern_fields(): Note that the page number
of the record containing the field reference may change.
2007-12-03 10:25:20 +00:00
marko
962ed52317 branches/zip: Clean up after r2129:
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.
2007-11-29 12:36:53 +00:00
sunny
eca3cb2378 branches/zip: Fix a bug where the zipped page and the uncompressed page
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.
2007-11-29 12:23:48 +00:00
marko
06299dddd4 branches/zip: In purge, avoid dereferencing unset BLOB pointers of freshly
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.
2007-11-27 09:11:45 +00:00
marko
110781a39e branches/zip: btr_cur_pessimistic_insert(): When calling
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.
2007-11-27 07:57:03 +00:00
marko
36874d65f0 branches/zip: Fix a bug in the updates of index records that contain a
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.
2007-11-23 12:40:19 +00:00
marko
404d94b38c branches/zip: btr_store_big_rec_extern_fields(),
btr_free_externally_stored_field(): Add some page type assertions
that were suggested by Sunny.
2007-11-22 10:02:50 +00:00