Commit graph

183 commits

Author SHA1 Message Date
vasil
eebb00baf2 branches/zip:
Add ChangeLog entries for r5916.
2009-09-16 17:47:22 +00:00
vasil
354e4c9a64 branches/zip:
Whitespace cleanup in the ChangeLog.
2009-09-16 17:37:13 +00:00
sunny
17f5d18b5e branches/zip: Update ChangeLog with r5733 changes. 2009-09-02 06:08:45 +00:00
marko
1a9bfd68d0 branches/zip: dict_index_find_cols(): On column name lookup failure,
return DB_CORRUPTION (HA_ERR_CRASHED) instead of abnormally
terminating the server.  Also, disable the previously added diagnostic
output to the error log, because mysql-test-run does not like extra
output in the error log.  (Bug #44571)

dict_index_add_to_cache(): Handle errors from dict_index_find_cols().

mysql-test/innodb_bug44571.test: A test case for triggering the bug.

rb://135 approved by Sunny Bains.
2009-08-27 10:56:24 +00:00
marko
4e0ad39974 branches/zip: Fix a critical bug in fast index creation that could
corrupt the created indexes.

row_merge(): Make "half" an in/out parameter. Determine the offset of
half the output file. Copy the last blocks record-by-record instead of
block-by-block, so that the records can be counted. Check that the
input and output have matching n_rec.

row_merge_sort(): Do not assume that two blocks of size N are merged
into a block of size 2*N. The output block can be shorter than the
input if the last page of each input block is almost empty. Use an
accurate termination condition, based on the "half" computed by
row_merge().

row_merge_read(), row_merge_write(), row_merge_blocks(): Add debug output.

merge_file_t, row_merge_file_create(): Add n_rec, the number of records
in the merge file.

row_merge_read_clustered_index(): Update n_rec.

row_merge_blocks(): Update and check n_rec.

row_merge_blocks_copy(): New function, for copying the last blocks in
row_merge().  Update and check n_rec.

This bug was discovered with a user-supplied test case that creates an
index where the initial temporary file is 249 one-megabyte blocks and
the merged files become smaller. In the test, possible merge record
sizes are 10, 18, and 26 bytes.

rb://150 approved by Sunny Bains.  This addresses Issue #320.
2009-08-27 07:31:17 +00:00
marko
0f7895d477 branches/zip: Replace the constant 3/8 ratio that controls the LRU_old
size with the settable global variable innodb_old_blocks_pct. The
minimum and maximum values are 5 and 95 per cent, respectively. The
default is 100*3/8, in line with the old behavior.

ut_time_ms(): New utility function, to return the current time in
milliseconds. TODO: Is there a more efficient timestamp function, such
as rdtsc divided by a power of two?

buf_LRU_old_threshold_ms: New variable, corresponding to
innodb_old_blocks_time. The value 0 is the default behaviour: no
timeout before making blocks 'new'.

bpage->accessed, bpage->LRU_position, buf_pool->ulint_clock: Remove.

bpage->access_time: New field, replacing bpage->accessed. Protected by
buf_pool_mutex instead of bpage->mutex. Updated when a page is created
or accessed the first time in the buffer pool.

buf_LRU_old_ratio, innobase_old_blocks_pct: New variables,
corresponding to innodb_old_blocks_pct

buf_LRU_old_ratio_update(), innobase_old_blocks_pct_update(): Update
functions for buf_LRU_old_ratio, innobase_old_blocks_pct.

buf_page_peek_if_too_old(): Compare ut_time_ms() to bpage->access_time
if buf_LRU_old_threshold_ms && bpage->old.  Else observe
buf_LRU_old_ratio and bpage->freed_page_clock.

buf_pool_t: Add n_pages_made_young, n_pages_not_made_young,
n_pages_made_young_old, n_pages_not_made_young, for statistics.

buf_print(): Display buf_pool->n_pages_made_young,
buf_pool->n_pages_not_made_young.  This function is only for crash
diagnostics.

buf_print_io(): Display buf_pool->LRU_old_len and quantities derived
from buf_pool->n_pages_made_young, buf_pool->n_pages_not_made_young.
This function is invoked by SHOW ENGINE INNODB STATUS.

rb://129 approved by Heikki Tuuri.  This addresses Bug #45015.
2009-08-27 06:25:00 +00:00
marko
12352f3631 branches/zip: Document also the files affected by r5698 in the ChangeLog. 2009-08-27 06:03:15 +00:00
marko
ae08a59446 branches/zip: Document r5698 in the ChangeLog. 2009-08-27 06:01:42 +00:00
vasil
5bd19605b2 branches/zip:
ChangeLog:
Follow the convention from the rest of the ChangeLog: for bugfixes from
bugs.mysql.com only the bug number and title goes in the ChangeLog. Detailed
explanation on what is the problem and how it was fixed is present in
the bugs database.
2009-08-20 08:20:22 +00:00
vasil
1e4618803e branches/zip:
White-space fixup.
2009-08-20 08:15:05 +00:00
sunny
cb7c80c8a9 branches/zip: Update the ChangeLog with r5684 change. 2009-08-20 07:18:29 +00:00
marko
9e7705dbb8 branches/zip: ha_innobase::add_index(): Fix Bug #46557:
after a successful operation, read innodb_table->flags from
the newly created table object, not from the old one that was just freed.

Approved by Sunny.
2009-08-13 07:46:33 +00:00
vasil
b33535ef62 branches/zip:
Fixups in ChangeLog: sort filenames alphabetically and wrap to 78 chars per
line.
2009-07-21 08:31:26 +00:00
calvin
e51056a82d branches/zip: add ChangeLog entry for r5524. 2009-07-20 16:14:30 +00:00
vasil
17c8f39295 branches/zip:
Add ChangeLog entries for r5498 and r5519.
2009-07-20 07:51:47 +00:00
calvin
d6c4fcc2fa branches/zip: add ChangeLog entry for r5508. 2009-07-16 12:45:28 +00:00
inaam
ec40f5cd73 branches/zip rb://138 (REVERT)
Revert the flush neighbors patch as it shows regression in
the benchmarks run by Michael.
2009-07-13 14:48:45 +00:00
calvin
d7f9b01105 branches/zip: add ChangeLog entries for r5484-r5486. 2009-07-10 20:47:34 +00:00
vasil
50c053adfc branches/zip:
Add ChangeLog entry for 5489.
2009-07-10 08:04:20 +00:00
vasil
900f489a19 branches/zip:
Use PAUSE instruction inside spinloop if it is available.

The patch was originally developed by Mikael Ronstrom <mikael@mysql.com>
and can be found here:
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2768
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2771
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2772
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2774
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2777
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2799
http://bazaar.launchpad.net/%7Emysql/mysql-server/mysql-5.4/revision/2800

Approved by:	Heikki (rb://137)
2009-07-02 12:12:36 +00:00
marko
6bfbdb2d0d branches/zip: Do not crash on SET GLOBAL innodb_file_format=DEFAULT
or SET GLOBAL innodb_file_format_check=DEFAULT.

innodb_file_format.test: New test for innodb_file_format and
innodb_file_format_check.

innodb_file_format_name_validate(): Store the string in *save.
innodb_file_format_name_update(): Check the string again.

innodb_file_format_check_validate(): Store the string in *save.
innodb_file_format_check_update(): Check the string again.

Issue #282, rb://140 approved by Heikki Tuuri
2009-06-29 12:49:54 +00:00
marko
4a447cde2e branches/zip: lock_print_info_all_transactions(), buf_read_recv_pages():
Tolerate missing tablespaces (zip_size==ULINT_UNDEFINED).
buf_page_get_gen(): Add ut_ad(ut_is_2pow(zip_size)).

Issue #289, rb://136 approved by Sunny Bains
2009-06-29 08:54:53 +00:00
marko
17105a0ad9 branches/zip: buf_page_get_gen(): Fix a race condition when reading
buf_fix_count.  This could explain Issue #156.
Tested by Michael.
2009-06-29 08:24:27 +00:00
marko
3bc2b8f158 branches/zip: ha_innobase::add_index(), ha_innobase::final_drop_index():
Start prebuilt->trx before locking the table.  This should fix Issue #293
and could fix Issue #229.
Approved by Sunny (over IM).
2009-06-29 07:52:30 +00:00
calvin
95aaddbe70 branches/zip: Fix typos. 2009-06-26 19:52:52 +00:00
marko
bb0e1c34df branches/zip: Fix a race condition caused by
SET GLOBAL innodb_commit_concurrency=DEFAULT. (Bug #45749)
When innodb_commit_concurrency is initially set nonzero,
DEFAULT would change it back to 0, triggering Bug #42101.
rb://139 approved by Heikki Tuuri.
2009-06-25 11:55:52 +00:00
marko
dcd851bcbe branches/zip: dict_index_find_cols(): Print diagnostic on name mismatch.
This addresses Bug #44571 but does not fix it.
rb://135 approved by Sunny Bains.
2009-06-25 09:45:57 +00:00
marko
090cdcff6a branches/zip: row_merge_read_rec(): Fix a UNIV_DEBUG bug (Bug #45426) 2009-06-17 12:03:45 +00:00
vasil
86bc614628 branches/zip:
Add ChangeLog entry for r5342.
2009-06-17 11:56:12 +00:00
vasil
7b64532b20 branches/zip:
Add ChangeLog entries for r5283 and r5320.
2009-06-16 08:03:27 +00:00
vasil
2c89050122 branches/zip:
Add ChangeLog entry for r5262.
2009-06-05 15:34:11 +00:00
vasil
64f684621e branches/zip:
Add ChangeLog entry for r5261.
2009-06-05 15:26:58 +00:00
vasil
610ad5195a branches/zip:
Whitespace cleanup.
2009-06-05 15:19:37 +00:00
marko
a4401ad069 branches/zip: Merge revisions 5148:5233 from branches/5.1:
------------------------------------------------------------------------
  r5150 | vasil | 2009-05-27 18:56:03 +0300 (Wed, 27 May 2009) | 4 lines

  branches/5.1:

  Whitespace fixup.
  ------------------------------------------------------------------------
  r5191 | vasil | 2009-05-30 17:46:05 +0300 (Sat, 30 May 2009) | 19 lines

  branches/5.1:

  Merge a change from MySQL (this fixes the failing innodb_mysql test):

    ------------------------------------------------------------
    revno: 1810.3894.10
    committer: Sergey Glukhov <Sergey.Glukhov@sun.com>
    branch nick: mysql-5.0-bugteam
    timestamp: Tue 2009-05-19 11:32:21 +0500
    message:
      Bug#39793 Foreign keys not constructed when column has a '#' in a comment or default value
      Internal InnoDN FK parser does not recognize '\'' as quotation symbol.
      Suggested fix is to add '\'' symbol check for quotation condition
      (dict_strip_comments() function).
    modified:
      innobase/dict/dict0dict.c
      mysql-test/r/innodb_mysql.result
      mysql-test/t/innodb_mysql.test
  ------------------------------------------------------------------------
  r5233 | marko | 2009-06-03 15:12:44 +0300 (Wed, 03 Jun 2009) | 11 lines

  branches/5.1: Merge the test case from r5232 from branches/5.0:
    ------------------------------------------------------------------------
    r5232 | marko | 2009-06-03 14:31:04 +0300 (Wed, 03 Jun 2009) | 21 lines

    branches/5.0: Merge r3590 from branches/5.1 in order to fix Bug #40565
    (Update Query Results in "1 Row Affected" But Should Be "Zero Rows").

    Also, add a test case for Bug #40565.

    rb://128 approved by Heikki Tuuri
    ------------------------------------------------------------------------
  ------------------------------------------------------------------------
2009-06-03 11:26:41 +00:00
marko
8c0fad1c5f branches/zip: Add Doxyfile. 2009-05-27 06:01:40 +00:00
marko
9649c3e3b3 branches/zip: Write PAGE_MAX_TRX_ID to the redo log. Otherwise,
transactions that are started before the rollback of incomplete
transactions has finished may have an inconsistent view of the
secondary indexes.

dict_index_is_sec_or_ibuf(): Auxiliary function for controlling
updates and checks of PAGE_MAX_TRX_ID: check whether an index is a
secondary index or the insert buffer tree.

page_set_max_trx_id(), page_update_max_trx_id(),
lock_rec_insert_check_and_lock(),
lock_sec_rec_modify_check_and_lock(), btr_cur_ins_lock_and_undo(),
btr_cur_upd_lock_and_undo(): Add the parameter mtr.

page_set_max_trx_id(): Allow mtr to be NULL.  When mtr==NULL, do not
attempt to write to the redo log.  This only occurs when creating a
page or reorganizing a compressed page.  In these cases, the
PAGE_MAX_TRX_ID will be set correctly during the application of redo
log records, even though there is no explicit log record about it.

btr_discard_only_page_on_level(): Preserve PAGE_MAX_TRX_ID.  This
function should be unreachable, though.

btr_cur_pessimistic_update(): Update PAGE_MAX_TRX_ID.

Add some assertions for checking that PAGE_MAX_TRX_ID is set on all
secondary index leaf pages.

rb://115 tested by Michael, fixes Issue #211
2009-05-19 18:59:07 +00:00
marko
a15f8bec88 branches/zip: When executing an optimistic update by delete-and-insert,
correctly estimate the free space on the compressed page by
page_zip_available(..., create=TRUE). This was reported as Issue #231.

btr_cur_update_alloc_zip(): Add the parameter ibool create and pass it
to page_zip_available(). The parameter was previously passed as 0.

btr_cur_optimistic_update(): Pass create=TRUE to btr_cur_update_alloc_zip().

rb://120 approved by Heikki Tuuri
2009-05-18 12:40:07 +00:00
vasil
5c2c89e38a branches/zip:
Add ChangeLog entry for r4994.
2009-05-14 16:13:41 +00:00
vasil
f42bc56e41 branches/zip:
Add ChangeLog entry for r4977.
2009-05-13 12:21:55 +00:00
marko
db0e3d7bbb branches/zip: row_scan_and_check_index(): Improve the diagnostics, by reporting
errors from row_search_for_mysql() in the error log.
The errors will still be ignored by CHECK TABLE.
This is somewhat related to Issue #211.
2009-04-23 06:37:40 +00:00
marko
e81b47e985 branches/zip: ChangeLog: Add the missing include/ to two files. 2009-04-23 06:22:06 +00:00
marko
dc33fdaac8 branches/zip: ChangeLog: Document r4893. 2009-04-23 06:21:07 +00:00
vasil
177ccaca71 branches/zip:
Add ChangeLog entry for t4748.
2009-04-17 20:58:08 +00:00
marko
a0714b182c branches/zip: univ.i: Define REFMAN as the base URL of the
MySQL Reference Manual and use it in every string.
This fixes Issue #221.
2009-04-16 12:02:27 +00:00
vasil
864178aa13 branches/zip:
Add ChangeLog entry for r4717.
2009-04-16 05:44:48 +00:00
vasil
124945b446 branches/zip:
Add ChangeLog entry for r4543.
2009-04-15 17:36:06 +00:00
vasil
f946e6f422 branches/zip:
Whitespace cleanup in ChangeLog
2009-04-15 08:39:04 +00:00
vasil
9c37ed7c03 branches/zip:
Fix typo in the ChangeLog
2009-04-15 08:36:57 +00:00
vasil
74baa550a6 branches/zip:
Add missing ChangeLog entries
2009-04-15 08:36:16 +00:00
vasil
3db4187a8d branches/zip:
Add ChangeLog entry for r4678.
2009-04-08 09:11:15 +00:00
vasil
1b7b2600db branches/zip:
Whitespace fixup in the ChangeLog
2009-04-08 09:08:59 +00:00
marko
ab341009d7 branches/zip: Allow in-place updates of UTF-8 CHAR columns
from or to NULL in ROW_FORMAT=REDUNDANT. (Bug #44032)

rb://107 approved by Heikki Tuuri.
2009-04-07 11:45:28 +00:00
vasil
de2238611d branches/zip:
Add ChangeLog entry for r4670.
2009-04-07 05:37:31 +00:00
marko
e650b0533b branches/zip: Initialize innodb_change_buffering from the configuration file.
So far, the parameter innodb_change_buffering was only settable by the
SET GLOBAL command. Any change specified in the configuration file or
on the mysqld command line was ignored. This was reported as Issue #217.

rb://109 approved by Heikki Tuuri.
2009-04-06 12:17:30 +00:00
marko
76691aee50 branches/zip: Remove the bogus failure reported in Issue #219. 2009-04-06 11:13:45 +00:00
vasil
fe82fa9ae1 branches/zip:
Fix formatting in ChangeLog to be consistent.
2009-04-06 06:07:26 +00:00
vasil
ccf94e59b1 branches/zip:
Add changelog entry for c4630.
2009-04-06 06:05:25 +00:00
marko
ab67f4eb4a branches/zip: Refuse to use newly created indexes that may lack
history.  This addresses Mantis issue #116.

dict_index_t: Enable the storage of trx_id.

row_prebuilt_t: Make many fields bit-fields to reduce the memory
footprint. Add index_usable.

ha_innobase::change_active_index(): Check if the index is usable and
set prebuilt->index_usable accordingly. Unfortunately, the return
status of this function is ignored by MySQL, and the actual refusal to
use the index must be made in row_search_for_mysql().

row_search_for_mysql(): Return DB_MISSING_HISTORY if
!prebuilt->index_usable.

convert_error_code_to_mysql(): Map DB_MISSING_HISTORY to
HA_ERR_TABLE_DEF_CHANGED.

innodb-index.test: Add a test case where access to a newly created
secondary index must be blocked for old transactions.

rb://100 approved by Heikki Tuuri
2009-04-02 12:23:12 +00:00
vasil
d950d11f4d branches/zip:
Add any entry about the release of 1.0.3 in the ChangeLog.
2009-03-20 14:50:41 +00:00
marko
2225a61798 branches/zip: fil_init(): Add the parameter hash_size. 2009-03-20 13:47:17 +00:00
marko
1d2299398f branches/zip: recv_scan_log_recs(): Remove a compile-time constant parameter. 2009-03-20 13:10:25 +00:00
marko
da474c033b branches/zip: recv_sys_init(): Remove a compile-time constant parameter. 2009-03-20 12:56:19 +00:00
marko
94ca1bb10d branches/zip: recv_recover_page(): Remove compile-time constant parameters. 2009-03-20 12:48:26 +00:00
marko
6b52f8cab2 branches/zip: innobase_get_at_most_n_mbchars(): Declare in ha_prototypes.h. 2009-03-20 12:15:52 +00:00
marko
4214453b03 branches/zip: fil0fil.c: Refer to fil_system directly, not via local vars.
This eliminates some "unused variable" warnings when building
InnoDB Hot Backup in such a way that all mutex operations are no-ops.
2009-03-20 11:51:35 +00:00
marko
68247c5fa6 branches/zip: page_validate(): Always report the space id and the
name of the index.

In Hot Backup, do not invoke comparison functions, as MySQL collations
will be unavailable.
2009-03-20 10:52:14 +00:00
marko
e9760189d6 branches/zip: Add const qualifiers or in/out comments to some function
parameters in log0log.
2009-03-20 10:45:18 +00:00
marko
184ee4885c branches/zip: Non-functional change for reducing dependencies in InnoDB Hot Backup:
Replace srv_sys->dummy_ind1 and srv_sys->dummy_ind2 with
dict_ind_redundant and dict_ind_compact, initialized in dict_init().
2009-03-20 10:33:33 +00:00
vasil
995814262e branches/zip:
Add ChangeLog entry for the bugfix in c4360.
2009-03-05 20:31:37 +00:00
vasil
370c303636 branches/zip:
White-space cleanup in the ChangeLog
2009-02-25 15:19:19 +00:00
vasil
09f6d57af9 branches/zip:
Fix Bug synopsis and remove explanation
2009-02-25 09:08:32 +00:00
vasil
f1e2b0091d branches/zip:
Make ChangeLog entries for bugs in bugs.mysql.com in the form:
Fix Bug#12345 bug title
(for bugs after 1.0.2 was released and the ChangeLog published)

There is no need to bloat the ChangeLog with information that is available
via bugs.mysql.com.

Discussed with:	Marko
2009-02-25 09:05:44 +00:00
vasil
bb05c979ba branches/zip:
Add ChangeLog entry for the fix in r4288.
2009-02-25 08:53:51 +00:00
marko
30313d6ebe branches/zip: When freeing an uncompressed BLOB page, tolerate garbage in
FIL_PAGE_TYPE.  (Bug #43043, Issue #182)

btr_check_blob_fil_page_type(): New function.

btr_free_externally_stored_field(), btr_copy_blob_prefix():
Call btr_check_blob_fil_page_type() to check FIL_PAGE_TYPE.
2009-02-23 13:09:49 +00:00
marko
e31baa849f branches/zip: Make innodb_use_sys_malloc=ON the default.
Replace srv_use_sys_malloc with UNIV_LIKELY(srv_use_sys_malloc)
to improve branch prediction in the default case.

Approved by Ken over the IM.
2009-02-20 20:31:03 +00:00
vasil
8850a34846 branches/zip:
Add a ChangeLog entry for a change in r4262.
2009-02-20 13:00:46 +00:00
vasil
4cbc3c4814 branches/zip:
ChangeLog: Remove include/os0sync.ic from the entry about the google patch,
this file was modified later to not include Google's code.
2009-02-20 09:59:42 +00:00
vasil
4d49c50cc8 branches/zip:
Cleanup in ChangeLog:
* Wrap lines at 78 characters
* Changed files are listed alphabetically
* White-space cleanup
2009-02-20 09:52:19 +00:00
marko
732f9dd7fb branches/zip: Protect ut_total_allocated_memory with ut_list_mutex.
Unprotected updates to ut_total_allocated_memory in
os_mem_alloc_large() and os_mem_free_large(), called during
fast index creation, may corrupt the variable and cause assertion failures.

Also, add UNIV_MEM_ALLOC() and UNIV_MEM_FREE() instrumentation around
os_mem_alloc_large() and os_mem_free_large(), so that Valgrind can
detect more errors.

rb://90 approved by Heikki Tuuri.  This addresses Issue #177.
2009-02-18 15:25:45 +00:00
marko
25f45c0d1c branches/zip: Make innodb_thread_concurrency=0 the default.
The old default was 8.
2009-02-11 22:14:19 +00:00
marko
a805ee5fd5 branches/zip: When innodb_use_sys_malloc is set, ignore
innodb_additional_mem_pool_size, because nothing will
be allocated from mem_comm_pool.

mem_pool_create(): Remove the assertion about size.  The function will
work with any size.  However, an assertion would fail in ut_malloc_low()
when size==0.

mem_init(): When srv_use_sys_malloc is set, pass size=1 to mem_pool_create().

mem0mem.c: Add #include "srv0srv.h" that is needed by mem0dbg.c.
2009-02-10 10:52:27 +00:00
marko
ecda78f01c branches/zip: get_share(), free_share(): Make table locking case sensitive.
If lower_case_table_names=1, MySQL will pass the table names in lower case.
Thus, we can use a binary comparison (strcmp) in the hash table.

rb://87 approved by Heikki Tuuri, to address Bug #41676 and Issue #167.
2009-02-10 09:51:43 +00:00
marko
da9083a02c branches/zip: ChangeLog: Document recent changes. 2009-02-10 09:09:15 +00:00
vasil
5aa989e25d branches/zip:
Add ChangeLog entry for the change in r4072.
2009-02-02 07:32:04 +00:00
marko
8b025adba6 branches/zip: Port the applicable parts of r4053 from branches/innodb+:
Implement the global variable innodb_change_buffering, with the
following values:

none - buffer nothing
inserts - buffer inserts (the default)

Approved by Ken Jacobs.
2009-01-29 09:27:09 +00:00
marko
2300edb00f branches/zip: buf_LRU_invalidate_tablespace(): Fix a race condition:
read zip_size while still holding block_mutex.
2009-01-27 08:05:24 +00:00
marko
b707b2e3b1 branches/zip: In r988, the function buf_block_align() was enclosed
within UNIV_DEBUG. The two remaining callers in non-debug builds,
btr_search_guess_on_hash() and btr_search_validate(), were rewritten
to call buf_page_hash_get().

To implement support for a resizeable buffer pool, the function
buf_block_align() had been rewritten to perform a page hash lookup in
the buffer pool. The caller was also made responsible for holding the
buffer pool mutex.

Because the page hash lookup is expensive and it has to be done while
holding the buffer pool mutex, implement buf_block_align() by pointer
arithmetics again, and make btr_search_guess_on_hash() call it. Note
that this will have to be adjusted if the interface to the resizeable
buffer pool is actually implemented.

rb://83 approved by Heikki Tuuri, to address Issue #161.

As a deviation from the approved patch, this patch also makes
btr_search_validate() (invoked by CHECK TABLE) check that
buf_pool->page_hash is consistent with buf_block_align().
2009-01-26 20:33:20 +00:00
marko
e75eaabaeb branches/zip: Merge revisions 4005:4032 from branches/5.1:
------------------------------------------------------------------------
  r4032 | marko | 2009-01-23 15:43:51 +0200 (Fri, 23 Jan 2009) | 10 lines

  branches/5.1: Merge r4031 from branches/5.0:

  btr_search_drop_page_hash_when_freed(): Check if buf_page_get_gen()
  returns NULL.  The page may have been evicted from the buffer pool
  between buf_page_peek_if_search_hashed() and buf_page_get_gen(),
  because the buffer pool mutex will be released between these two calls.
  (Bug #42279, Issue #160)

  rb://82 approved by Heikki Tuuri
  ------------------------------------------------------------------------
2009-01-23 13:49:04 +00:00
marko
5dceabc908 branches/zip: buf_page_get_gen(): Remove the unused mode BUF_GET_NOWAIT.
This was noticed while investigating Issue #160.
2009-01-23 13:31:36 +00:00
vasil
2ff10a87f7 branches/zip:
Add ChangeLog entries for the bugfixes in r4004 and r4005.
2009-01-20 15:01:08 +00:00
vasil
70ab4058b7 branches/zip:
Add ChangeLog entries for the bug fixes in r3911 and r3930.
2009-01-15 19:15:00 +00:00
marko
2f7bcc7d99 branches/zip: In hash table lookups, assert that the traversed items
satisfy some conditions when UNIV_DEBUG is defined.

HASH_SEARCH(): New parameter: ASSERTION. All users will pass an appropriate
ut_ad() or nothing.

dict_table_add_to_columns(): Assert that the table being added to the data
dictionary cache is not already being pointed to by the name_hash and
id_hash tables.

HASH_SEARCH_ALL(): New macro, for use in dict_table_add_to_columns().

dict_mem_table_free(): Set ut_d(table->cached = FALSE), so that we can
check ut_ad(table->cached) when traversing the hash tables, as in
HASH_SEARCH(name_hash, dict_sys->table_hash, ...) and
HASH_SEARCH(id_hash, dict_sys->table_id_hash, ...).

dict_table_get_low(), dict_table_get_on_id_low(): Assert
ut_ad(!table || table->cached).

fil_space_get_by_id(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(hash, fil_system->spaces, ...).

fil_space_get_by_name(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(name_hash, fil_system->name_hash, ...).

buf_buddy_block_free(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->zip_hash, ...).

buf_page_hash_get(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->page_hash, ...).

get_share(), free_share(): Check ut_ad(share->use_count > 0) in
HASH_SEARCH(table_name_hash, innobase_open_tables, ...).

This was posted as rb://75 for tracking down errors similar to Issue #153.
2009-01-13 19:46:22 +00:00
marko
179e75c559 branches/zip: Some non-functional changes related to Issue #155.
buf_page_struct: Note that space and offset are also protected by
buf_pool_mutex.  They are only assigned to by
buf_block_set_file_page().  Thus, it suffices for buf_flush_batch() to
hold just buf_pool_mutex when checking these fields.

buf_flush_try_page(): Rename "locked" to "is_s_latched", per Heikki's request.

buf_flush_batch(): Move the common statement mutex_exit(block_mutex)
from all if-else if-else branches before the if block.  Remove the
redundant test (buf_pool->init_flush[flush_type] == FALSE) that was
apparently copied from buf_flush_write_complete().

buf_flush_write_block_low(): Note why it is safe not to hold buf_pool_mutex
or block_mutex.  Enumerate the assumptions in debug assertions.
2009-01-09 20:27:40 +00:00
marko
6b0531d6e6 branches/zip: buf_flush_insert_into_flush_list(),
buf_flush_insert_sorted_into_flush_list(): Remove unused code.
Change the parameter to buf_block_t* block and assert that
block->state == BUF_BLOCK_FILE_PAGE.  This is part of Issue #155.
2009-01-09 13:40:11 +00:00
vasil
673ef6e12b branches/zip:
Add ChangeLog entries for r3795 r3796 r3797 r3798.
2009-01-08 20:10:10 +00:00
marko
c9c5b83dd2 branches/zip: ChangeLog: Clarify the impact of r3608. 2009-01-02 13:57:51 +00:00
marko
4ee8fc70e8 branches/zip: ChangeLog: Document r3608 and r3613. 2009-01-02 13:55:12 +00:00
vasil
4302847c99 branches/zip:
Remove 2 entries from the ChangeLog about changes not big enough.

Discussed with:	Marko
2008-12-17 12:58:26 +00:00
marko
4856b4ba61 branches/zip: Remove update-in-place-in-select from the internal SQL
interpreter.  It was only used for updating the InnoDB internal data
dictionary when renaming or dropping tables.  It could have caused
deadlocks after acquiring latches on insert buffer bitmap pages.
This and r3544 should fix Issue #135.

Furthermore, the update-in-place-in-select does not account for
compression failure.  That was not a problem yet, since the InnoDB SQL
interpreter has so far assumed ROW_FORMAT=REDUNDANT.

rb://63 approved by Heikki Tuuri
2008-12-17 12:40:59 +00:00
marko
3462b464f1 branches/zip: ChangeLog: Document recent changes that were not included in
InnoDB Plugin 1.0.2, except changes to source code comments.
2008-12-17 10:44:31 +00:00