Commit graph

28 commits

Author SHA1 Message Date
marko
4c643e0e1a Merge r1239 from
branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG.
2007-01-18 21:27:31 +00:00
marko
b0b266a9c6 Merge a change from MySQL AB:
ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0
  Many files:
    Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
    Adjusted year(s) in copyright header 
    Added GPL copyright text
2007-01-11 09:36:27 +00:00
marko
bf27df53c0 buf_flush_batch(): Remove the test page_count != ULINT_UNDEFINED.
The variable is initialized to zero, and after that it is only added to.
Maybe the one who introduced the variable srv_buf_pool_flushed overlooked
that there is a separate return statement for returning ULINT_UNDEFINED?
2007-01-02 21:37:41 +00:00
marko
7b51400b89 buf_page_init_for_read(): Correct the indentation. 2006-11-23 12:25:51 +00:00
marko
5f73dd4b2e Port r983 from branches/zip: Enclose some more debug code in
#ifdef UNIV_SYNC_DEBUG to allow the code to be built
with UNIV_DEBUG but without UNIV_SYNC_DEBUG.
2006-11-21 13:53:48 +00:00
marko
c0fd7331fd UT_LIST_REMOVE(): Invalidate the node pointers #ifdef UNIV_DEBUG.
buf_LRU_invalidate_tablespace(): Invoke UT_LIST_GET_PREV(LRU, block)
before UT_LIST_REMOVE(LRU, buf_pool->LRU, block).
2006-11-08 14:31:47 +00:00
marko
0011a8a91a Reduce buffer pool mutex contention under >= 4 big concurrent
CPU-bound SELECT queries.  (Bug #15815)

Fix: replace the mutex by one mutex protecting the 'flush list'
(and the free list) and several mutexes protecting portions of the
buffer pool, where we keep several indivudual LRU lists of pages.

This patch is from Sunny Bains and Heikki Tuuri.
2006-11-08 12:49:15 +00:00
osku
a2a7c6cab5 Revamp the line splits done in r763 and r764 that can now be done better,
thanks to r826.
2006-09-19 07:22:21 +00:00
marko
0efd5d663e Reduce the size of btr_search_t from 13 machine words to 7. This
structure is reserved for every index in the data dictionary cache.
(Bug #20877)

We could shrink the structure further to three 32-bit words or two
64-bit words by turning the remaining fields to bit-fields.
Unfortunately, the fields are not protected by any mutex, and thus we
would better keep each field aligned to a machine word.

btr_search_t, buf_block_t: Rename "ulint side" to "ibool left_side".
Remove BTR_SEARCH_LEFT_SIDE and BTR_SEARCH_RIGHT_SIDE, and also rename
some local variables and function parameters from "ulint side" to
"ibool left_side".

btr_search_t: Remove the unused fields last_search, n_direction, direction,
and modify_clock.  Remove the unused constants BTR_SEA_NO_DIRECTION,
BTR_SEA_LEFT, BTR_SEA_RIGHT, and BTR_SEA_SAME_REC.

btr_search_t: Remove magic_n unless #defined UNIV_DEBUG.  Turn an assertion
about the magic number into a debug assertion.
2006-09-14 20:42:46 +00:00
marko
27dffa4f7d Split lines before binary operators, not after them. 2006-08-29 08:27:56 +00:00
marko
917941e44c Split lines before an opening parenthesis, not after one.
Replace some printf(...) in debug builds with fprintf(stderr, ...).
2006-08-29 07:33:51 +00:00
marko
8f18616ef0 Reindent the code base (except for ha_innodb.{cc,h} and generated parser
and lexer files).  From now on, the following Emacs cc-mode settings apply
when indenting C function bodies in InnoDB:

(setq c-basic-offset 8)
(setq c-label-minimum-indentation 0)
(add-to-list 'c-offsets-alist '(c . 0))
(add-to-list 'c-offsets-alist '(label . [0]))

The indentation rules for function declarations still have not been
formalized, and they must be formatted manually.

Try to limit all lines to at most 79 characters (assuming TAB stops every
8 characters) by splitting lines before opening parenthesis, or at
string constants.

Fix some grammar mistakes in diagnostic output:
 match to, match with -> match
 found from -> found in
 trying rename -> trying to rename

Fix an error in page_check_dir(): it said "supremum not pointed to"
when the infimum was not pointed to.

Enclose commented-out code snippets in #if 0 ... #endif instead of /* ... */.
Add (void*) casts to some %p parameters in fprintf() calls.  Try to
split lines before a binary operator, not after one.  (These three fixes
were not made everywhere.)
2006-08-28 17:42:45 +00:00
osku
475e422b4a Remove all traces of the obsolete concept of replicate spaces. 2006-08-16 08:01:37 +00:00
marko
b758497312 Correct all URLs pointing to the MySQL manual. (Bug #21467) 2006-08-08 10:54:57 +00:00
marko
d35c4375c3 buf_page_io_complete(): Write to the error log if the page number or the
space id on the disk do not match those in the memory.  Also write to
the error log if a page was read from the doublewrite buffer.  The
doublewrite buffer should be only read by the lower-level function fil_io()
at database startup.
2006-05-05 15:19:32 +00:00
marko
f1329684db Fix a typo in a comment. 2006-05-04 11:25:58 +00:00
osku
5d3bf05722 Add parens to return statements where they are missing (except in
ha_innodb.cc).
2006-04-28 11:57:13 +00:00
osku
5737acba07 Add 'level' parameter to rw_lock_create(), remove rw_lock_set_level(). 2006-04-28 05:49:59 +00:00
osku
f970488ae0 Add 'level' parameter to mutex_create(), remove mutex_set_level().
Rename SYNC_LEVEL_NONE to SYNC_LEVEL_VARYING, add comment clarifying what it
is used for.
2006-04-28 05:43:08 +00:00
marko
43a21f6ed4 Merge r328:340 from branches/5.0:
r340: Fix http://bugs.mysql.com/bug.php?id=18283 in ha_innodb.cc and
http://bugs.mysql.com/bug.php?id=18238 in InnoDB

r339: Remove disk space leak on update of BLOB columns (Bug #18252).

btr_cur_pessimistic_update(): Invoke rec_get_offsets() after
rec_set_field_extern_bits().

btr_store_big_rec_extern_fields(): Note that offsets will no longer be
valid after calling this function.

r338: Fix bug 18238 : check in pessimistic insert and update if the buffer
pool is exhausted by locks
2006-03-17 08:20:14 +00:00
osku
04a6b95788 Add (void*) casts when using the %p printf format specifier.
When using GCC, use __inline__ instead of inline.

Add disabled-by-default logic to configure.in to switch GCC to a strict
C89-mode.
2006-03-16 07:47:55 +00:00
osku
52d2051e95 Change ut_print_buf() and mem_analyze_corruption() to take a void*, not a
byte*. Remove redundant casts from callers.
2006-03-06 09:45:04 +00:00
osku
591e526f93 Remove tabs from within printed strings and two instances of trailing
whitespace.
2006-02-24 09:41:20 +00:00
osku
ac69f8c21b Style cleanups: Convert spaces to tabs, remove trailing whitespace, other
misc cleanups.
2006-02-21 12:37:54 +00:00
marko
3313036110 Set FIL_PAGE_TYPE for every page, so that the field can be relied on in
new tablespaces created from now on.

btr_store_big_rec_extern_fields(): Set FIL_PAGE_TYPE to FIL_PAGE_TYPE_BLOB.

buf_page_print(): Decode FIL_PAGE_TYPE.  Replace if-else with switch().

buf_page_create(): Set FIL_PAGE_PREV, FIL_PAGE_NEXT and FIL_PAGE_TYPE.

trx_sysf_create(): Set FIL_PAGE_TYPE to FIL_PAGE_TYPE_TRX_SYS.
Initialize TRX_SYS_RSEG_SPACE.

FIL_PAGE_TYPE: Document that the field cannot be relied on in older
versions of MySQL/InnoDB.  Add new type codes.

ibuf_bitmap_page_init(): Document that the rest of the page is uninitialized.

ibuf_add_free_page(): Log the setting of FIL_PAGE_TYPE.

fsp_header_init(): Set FIL_PAGE_TYPE to FIL_PAGE_TYPE_FSP_HDR.
Initialize FSP_NOT_USED.

fsp_fill_free_list(): Set FIL_PAGE_TYPE to FIL_PAGE_TYPE_XDES.

fsp_alloc_seg_inode_page(): Set FIL_PAGE_TYPE to FIL_PAGE_INODE.

fseg_create_general(): Set FIL_PAGE_TYPE to FIL_PAGE_TYPE_SYS.
2006-02-20 15:42:49 +00:00
osku
44a14a1791 Fix all function declarations to have the correct number of '=' characters. 2006-02-20 12:12:22 +00:00
marko
87839def7f buf_block_init(): Reset magic_n, buf_fix_count and io_fix to avoid
testing uninitialized variables.  (Bug #17405)
2006-02-16 07:27:54 +00:00
osku
2903c72469 Import 5.0 code. 2005-10-27 07:29:40 +00:00