Commit graph

34 commits

Author SHA1 Message Date
inaam
ada26a245f branches/5.1: Port of r2267
This is a combination of changes that forward port the scalability fix applied to 5.0
through r1001.
It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of
scalability fix of 5.0)
Then it applies r1001 to 5.0 which is the original scalability fix.
Finally it applies r2082 which fixes an issue with the original fix.

Reviewed by: Heikki
2008-02-03 19:52:44 +00:00
marko
491d106832 Use "InnoDB:" prefix in error messages. 2007-10-24 11:35:23 +00:00
marko
6eb200a476 Enclose rw_lock_validate() in #ifdef UNIV_DEBUG. It is only called by
debug assertions.
2007-08-23 09:24:38 +00:00
vasil
19ffb74a9c Add some comments.
Approved by:	Heikki (via IM)
2007-06-21 12:29:42 +00:00
vasil
c10dd8440a Split ut_a(a && b [&& c...]); into separate ut_a(a); ut_a(b); [ut_a(c); ...].
This makes it possible to see which expression was false by looking at the
error message.

Approved by:	Marko
2007-05-21 13:43:36 +00:00
marko
82b81a2987 Make InnoDB pluggable. That is, merge the modifications from MySQL WL#2936
and adapt some things.

Note that ha_innodb.cc depends on mysql_tmpfile() being declared in
<mysql/plugin.h>.  Until the function is declared there, you can
uncomment the buggy definition of mysql_tmpfile in ha_innodb.cc.

Remove storage/innobase/*/Makefile.am.  The whole compilation is driven by
storage/innobase/Makefile.am and storage/innobase/plug.in.

plug.in: Declare InnoDB as a dynamic plugin.

ha_innodb.h: Remove the declarations of many global variables.  The variables
are no longer directly referenced outside of storage/innobase.

trx_t: Add the field trx->duplicates.

trx_create(): Initialize the fields trx->active_trans and trx->duplicates.

innobase_query_is_update(): Remove.  Consult trx->duplicates instead.
2007-05-10 11:31:36 +00:00
marko
ed18169c68 Merge changes from MySQL AB:
ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0
  Fixed compiler warnings
  ...
  Fixed compiler warnings detected on windows64
2007-03-01 15:21:12 +00:00
osku
053fec7e22 Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro
mutex_enter_nowait that supplies the default __FILE__ and __LINE__
arguments. Adjust callers.
2007-01-22 09:03:59 +00:00
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
8f22bf12db Port r1034 from branches/zip: Remove some instrumentation and reduce
the output of SHOW MUTEX STATUS in non-debug builds.  (Bug #24386)
2006-11-21 13:56:18 +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
d6732adabb Port r972 from branches/zip: Enclose some debug code in #ifdef UNIV_SYNC_DEBUG.
The code was previously unused in non-debug builds.
2006-11-21 13:53:05 +00:00
marko
3b8ef8a822 Do not break the latching order in TRUNCATE TABLE.
dict_truncate_index_tree(): Replace parameter rec_t* rec with
btr_pcur_t* pcur.  Reposition pcur before calling btr_create().

sync_thread_add_level(): Remove the relaxation of the assertion added in r968.
2006-10-30 13:15:46 +00:00
marko
ef8d9962c7 sync_thread_add_level(): When level == SYNC_TREE_NODE, allow the latching
order to be violated if the thread holds dict_operation_lock, whose level is
SYNC_DICT_OPERATION.  This removes the assertion failure of TRUNCATE TABLE
#ifdef UNIV_SYNC_DEBUG.
2006-10-30 08:46:53 +00:00
marko
c2f508b38d Send all SHOW ENGINE INNODB STATUS information to the client also when
UNIV_SYNC_DEBUG is defined.

rw_lock_list_print_info(): Add parameter "file".

mutex_list_print_info(): Add parameter "file".  Make the function static.
2006-10-12 10:26:25 +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
1c1026ec0d Reduce the size of the data dictionary cache. (Bug #20877)
dtype_t: Remove unused field "prec", which was supposed to be used for
the precision of decimal columns in stand-alone InnoDB.

dtype_get_prec(): Remove.

dtype_set(), dict_mem_table_add_col(): Remove parameter "prec".

dtype_t: Turn all fields (mtype, prtype, len, mbminlen, mbmaxlen, len)
into bit-fields.

dict_table_t, dict_index_t, dict_tree_t: Omit magic_n from non-debug builds.

dict_col_t: Turn ind, clust_pos, and ord_part into bit-fields.

Replace the default clust_pos value ULINT_UNDEFINED with
REC_MAX_N_FIELDS and replace all references to clust_pos with calls to
the accessor function dict_col_get_clust_pos().

dict_field_t: Turn prefix_len and fixed_len into bit-fields.

dict_tree_t: Remove pad[64].

dict_table_t: Turn the fields ibd_file_missing, tablespace_discarded,
cached, flags, stat_initialized, and autoinc_inited into bit-fields.
Remove does_not_fit_in_memory from non-debug builds.

dict_index_t: Turn the fields trx_id_offset, n_user_defined_cols,
n_uniq, n_def, n_fields, n_nullable, and cached into bit-fields.

dict_foreign_struct: Turn n_fields and type into bit-fields.

rw_lock_t: Turn cline, last_s_line, and last_x_line into bit-fields.
Omit level unless #defined UNIV_SYNC_DEBUG.

Move REC_MAX_N_FIELDS (and REC_MAX_HEAP_NO and REC_MAX_N_OWNED)
from rem0rec.c to rem0types.h, as they are needed in dict0dict.ic.
dict_col_get_clust_pos(): Map REC_MAX_N_FIELDS to ULINT_UNDEFINED.
2006-09-12 14:06:46 +00:00
marko
27dffa4f7d Split lines before binary operators, not after them. 2006-08-29 08:27:56 +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
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
osku
66946183b2 Add a work queue implementation. 2006-04-26 12:14:50 +00:00
marko
675575f81e sync_array_detect_deadlock(): Remove bogus debug assertion. 2006-04-11 12:53:18 +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
7b9c5bc6a2 sync0arr.c: Fix compilation error on some systems by introducing all
variables at the start of a block.
2006-03-07 12:57:02 +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
de58802cd1 sync_thread_add_level(): Replace the if-else if-else if-...-else
chain with an equivalent switch block.
2006-02-15 09:15:54 +00:00
marko
3dc3f2a83e Replace assertions on constant conditions with preprocessor conditions. 2006-02-15 09:00:03 +00:00
osku
6b530a167a Sync array optimizations, most importantly signal_object changed to not
call os_event_set while holding the sync array mutex.

Idea by Heikki, implementation by Osku, bug-fixes and other changes by
Heikki, and final review and cleanup by Osku.
2006-01-20 17:20:52 +00:00
osku
8993745f05 Do not reset cell->wait_object to NULL when a cell in sync array is freed
since this can lead to problems.
2006-01-18 10:56:36 +00:00
osku
36ef155646 Remove incorrect warning printed in sync0arr.c. 2006-01-17 14:49:11 +00:00
osku
9fad661fea Forward port r121 from branches/5.0:
Optimize sync array behavior by not having the woken threads reserve the
sync array mutex.
2006-01-10 11:38:47 +00:00
osku
2903c72469 Import 5.0 code. 2005-10-27 07:29:40 +00:00