Commit graph

1827 commits

Author SHA1 Message Date
marko
2b85929647 branches/zip: buf_page_peek_if_too_old(): Silence a compiler warning
that was introduced in r5779 on 32-bit systems.
2009-09-09 06:00:59 +00:00
marko
3952b42b75 branches/zip: ut_time_ms(): Return ulint, not uint. 2009-09-09 05:50:50 +00:00
marko
5419aefd62 branches/zip: buf_page_peek_if_too_old(): Make the bitmasking work when
buf_pool->freed_page_clock is wider than 32 bits.
2009-09-09 05:17:19 +00:00
marko
36b963cc5e branches/zip: Remove BUF_LRU_INITIAL_RATIO, which should have been removed
together with buf_LRU_get_recent_limit().
2009-09-08 14:50:25 +00:00
calvin
263266707c branches/zip: Build InnoDB on Windows with UNIV_HOTBACKUP
The changes are non-functional changes for normal InnoDB,
but needed for building the Hot Backup on Windows (with
UNIV_HOTBACKUP defined).

- Define os_aio_use_native_aio for HB.
- Do not acquire seek mutexes for backup since HB is single threaded.
- Do not use srv_flush_log_at_trx_commit for HB build

rb://155

Approved by: Marko
2009-09-07 20:15:05 +00:00
marko
b905fc4d62 branches/zip: recv_recover_page_func(): Write the log sequence number
to the compressed page, if there is one.  Previously, the function only
wrote the LSN to the uncompressed page.

It is not clear why recv_recover_page_func() is updating FIL_PAGE_LSN
in the buffer pool.  The log sequence number will be stamped on the
page when it is flushed to disk, in buf_flush_init_for_writing().
I noticed this inconsistency when analyzing Issue #313, but this patch
does not fix it.  That is no surprise, since FIL_PAGE_LSN should only
matter on disk files, not in the buffer pool.
2009-09-03 13:55:51 +00:00
marko
9b774a00e8 branches/zip: row_merge(): Remove a bogus debug assertion
that was triggered when creating an index on an empty table.

row_merge_sort(): Add debug assertions and comments that justify
the loop termination condition.

The bogus assertion ut_ad(ihalf > 0) was reported by Michael.
2009-09-03 13:36:15 +00:00
marko
3596a58d3e branches/zip: MLOG_MULTI_REC_END: Correct the comment. 2009-09-03 10:05:44 +00:00
marko
6db95370ab branches/zip: recv_scan_log_recs(): Replace while with do...while,
because the termination condition will always hold on the first iteration.
2009-09-03 09:46:38 +00:00
marko
932c00c32c branches/zip: log_reserve_and_write_fast(): Do not cache the log_sys pointer
in a local variable.
2009-09-03 07:55:36 +00:00
marko
92e8d1b2b6 branches/zip: log_check_log_recs(): Enclose in #ifdef UNIV_LOG_DEBUG.
Add const qualifiers.
2009-09-03 07:38:22 +00:00
marko
1a83ac7fc4 branches/zip: ut_align(): Make ptr const, like in ut_align_down(). 2009-09-03 07:28:35 +00:00
marko
2ee3352082 branches/zip: log_reserve_and_write_fast(): Remove the redundant
output parameter "success".
Success is also indicated by a nonzero return value.
2009-09-03 05:36:12 +00:00
marko
1e7704391e branches/zip: Enclose some timestamp functions in #ifndef UNIV_HOTBACKUP. 2009-09-02 06:53:19 +00:00
marko
f1acb7fb8a branches/zip: univ.i: Do not undefine PACKAGE or VERSION.
InnoDB source code does not refer to these macros.
2009-09-02 06:43:09 +00:00
sunny
17f5d18b5e branches/zip: Update ChangeLog with r5733 changes. 2009-09-02 06:08:45 +00:00
sunny
c4aa83a630 branches/zip: Fix a regression introduced by the fix for bug#26316. We check
whether a transaction holds any AUTOINC locks before we acquire the kernel
mutex and release those locks.

Fix for rb://153. Approved by Marko.
2009-09-02 06:05:15 +00:00
vasil
66771d73e9 branches/zip:
Fix Bug#46718 InnoDB plugin incompatible with gcc 4.1 (at least: on PPC): "Undefined symbol"

by implementing our own check in plug.in instead of using the result from
the check from MySQL because it is insufficient.

Approved by:	Marko (rb://154)
2009-08-31 06:47:49 +00:00
marko
4139a2e4cf branches/zip: buf_chunk_not_freed(): Do not acquire block->mutex unless
block->page.state == BUF_BLOCK_FILE_PAGE.  Check that block->page.state
makes sense.

Approved by Sunny Bains over the IM.
2009-08-31 05:10:10 +00:00
inaam
b6cf058ba3 branches/zip rb://152
Disable display of deprecated parameter innodb_file_io_threads in
'show variables'.
2009-08-28 05:22:46 +00:00
inaam
07e2ab7aab branches/zip
Remove redundant TRUE : FALSE from the return statement
2009-08-27 21:43:32 +00:00
inaam
3811787c3e branches/zip
Remove unused macros as we erased the random readahead code in r5703.
Also fixed some comments.
2009-08-27 15:20:35 +00:00
inaam
8658a2c43d branches/zip rb://147
Done away with following two status variables:

innodb_buffer_pool_read_ahead_rnd
innodb_buffer_pool_read_ahead_seq

Introduced two new status variables:
innodb_buffer_pool_read_ahead = number of pages read as part of
readahead since server startup
innodb_buffer_pool_read_ahead_evicted = number of pages that are read
in as readahead but were evicted before ever being accessed since
server startup i.e.: a measure of how badly our readahead is
performing

SHOW INNODB STATUS will show two extra numbers in buffer pool section:
pages read ahead/sec and pages evicted without access/sec

Approved by: Marko
2009-08-27 15:00:27 +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
inaam
99e250d407 branches/zip bug#42885 rb://148
The call to put IO threads to sleep was most probably meant for Windows
only as the comment in buf0rea.c suggests. However it was enabled on
all platforms. This patch restricts the sleep call to windows. This
approach of not putting threads to sleep makes even more sense because
now we have multiple threads working in the background and it probably
is not a good idea to put all of them to sleep because a user thread
wants to post a batch for readahead.

Approved by: Marko
2009-08-26 13:34:35 +00:00
vasil
f01aad33f3 branches/zip:
Fix typo.
2009-08-26 12:44:40 +00:00
vasil
3894dcdae7 branches/zip:
Merge a change from MySQL:

 http://lists.mysql.com/commits/80832

 2968 Jonathan Perkin	2009-08-14
      Build fixes for Windows, AIX, HP/UX and Sun Studio11, from Timothy Smith.
      modified:
        CMakeLists.txt
        cmd-line-utils/readline/util.c
        storage/innodb_plugin/handler/i_s.cc
        storage/innodb_plugin/include/univ.i
2009-08-26 12:15:59 +00:00
marko
018a9efafa branches/zip: UNIV_DEBUG_LOCK_VALIDATE: Move the definition to univ.i. 2009-08-26 12:14:59 +00:00
marko
1fc7553e2d branches/zip: buf_page_t: Clarify that bpage->list may contain garbage.
This comment was provoked by Inaam.
2009-08-26 10:25:26 +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
sunny
9ac95eacde branches/zip: Fix bug# 46650: Innodb assertion autoinc_lock == lock in lock_table_remove_low on INSERT SELECT
We only store the autoinc locks that are granted in the transaction's autoinc
lock vector. A transacton, that has been rolled back due to a deadlock because
of an AUTOINC lock attempt, will not have added that lock to the vector. We
need to check for that when we remove that lock.

rb://145
Approved by Marko.
2009-08-20 07:05:30 +00:00
sunny
f8f7b3f8cb branches/zip: When building HotBackup srv_use_sys_malloc is #ifdef out. We
move access to the this variable within a !UNIV_HOTBACKUP block.
2009-08-14 05:16:24 +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
marko
bf0ee2f149 branches/zip: trx_undo_rec_copy(): Add const qualifier to undo_rec.
This is a non-functional change.
2009-08-12 12:16:37 +00:00
marko
38657b251e branches/zip: trx_general_rollback_for_mysql(): Remove the redundant
parameter partial. If savept==NULL, partial==FALSE.
2009-08-11 10:42:37 +00:00
marko
5c3850c842 branches/zip: Bump the version number to 1.0.5 after releasing 1.0.4. 2009-08-11 08:54:16 +00:00
calvin
173f74eabe branches/zip: remove duplicate "the" in comments. 2009-08-06 22:04:03 +00:00
marko
50ba5c7389 branches/zip: mem_heap_block_free(): If innodb_use_sys_malloc is set,
do not tell Valgrind that the memory is free, to avoid
a bogus warning in Valgrind's built-in free() hook.
2009-08-06 09:39:34 +00:00
marko
1cb31d9ce4 branches/zip: lock_rec_validate_page(): Add the parameter zip_size.
This should help track down Mantis Issue #289.
2009-08-05 11:27:30 +00:00
marko
3d5e2e868d branches/zip: Replace <number> with NUMBER in some comments,
to avoid problems with Doxygen XML output.
2009-08-05 10:06:55 +00:00
marko
7aead5125c branches/zip: mysql-test: Pass MTR's internal checks. 2009-08-04 10:42:44 +00:00
vasil
6411d47dff branches/zip:
Revert the dummy change from c5625.
2009-08-04 04:53:31 +00:00
vasil
9f4ddc4f95 branches/zip: Merge 5518:5622 from branches/5.1, resolving conflict in r5622
(after resolving the conflict Makefile.am was not changed so I have made
a dummy change so I can commit and thus record that branches/5.1 has been
merged in branches/zip up to 5622):

  ------------------------------------------------------------------------
  r5622 | vasil | 2009-08-03 15:27:00 +0300 (Mon, 03 Aug 2009) | 20 lines
  Changed paths:
     M /branches/5.1/Makefile.am
  
  branches/5.1:
  
  Merge a change from MySQL:
  
    ------------------------------------------------------------
    revno: 2988
    committer: Satya B <satya.bn@sun.com>
    branch nick: mysql-5.1-bugteam
    timestamp: Wed 2009-07-01 11:06:05 +0530
    message:
      Fix build failure after applying Innodb snapshot 5.1-ss5282
      
      After applying Innodb snapshot 5.1-ss5282, build was broken
      because of missing header file. 
      
      Adding the header file to Makefile.am after informing the 
      innodb developers.
    modified:
      storage/innobase/Makefile.am
  
  ------------------------------------------------------------------------
2009-08-04 04:52:48 +00:00
vasil
dd318eea60 branches/zip:
Add fsp0types.h to the list of noinst_HEADERS

Suggested by:	Sergey Vojtovich <svoj@sun.com>
2009-07-31 14:09:07 +00:00