Commit graph

399 commits

Author SHA1 Message Date
marko
1776e2e961 Merge changes from MySQL AB:
ChangeSet
  2007/01/22 18:42:52+02:00 monty@mysql.com 
  Give warnings for unused objects
  Changed error message to be compatible with old error file
  Added new error message for new DUP_ENTRY syntax

mysql-test/t/innodb.test
  2007/01/22 18:42:49+02:00 monty@mysql.com +14 -14
  Changed to use new error message
2007-02-07 09:48:42 +00:00
marko
c9459f0d6d Merge changes from MySQL AB:
Rename some FIELD_TYPE_ constants to MYSQL_TYPE_.

Change the scope of a type cast of two dividends.
2007-02-02 11:14:02 +00:00
marko
eb967c2186 Rename hash_create to hash0_create by a #define. This fixes a
symbol collision when building PHP with IMAP and MySQL (Bug #13859).
The bug was originally fixed by MySQL in a more obtrusive way, by
replacing all occurrences of hash_create with hash0_create.  This
change was applied to the MySQL tree as follows:

ChangeSet@1.1616.2924.6, 2007-01-11 12:31:52+01:00, kent@mysql.com +9 -0
  Many files:
    Reverted change for bug#13859, applied smaller patch from Marko
2007-02-02 10:52:40 +00:00
sunny
7c5df80879 Fix for Bug# 23666. On Windows ut_usectime returns secs
and usecs relative to the UNIX epoch (which is Jan, 1 1970).
2007-01-24 23:05:06 +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
1750a977ac Add ut_ad() debug assertions.
UT_LIST_ADD_FIRST(), UT_LIST_ADD_LAST(), UT_LIST_INSERT_AFTER():
Assert against some trivial cases of cyclic lists.

mutex_enter_func(): Assert that the current thread is not holding the mutex.
2007-01-19 12:22:24 +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
a4b7a332eb Remove the unused function mem_strdupq(). 2007-01-18 20:33:47 +00:00
osku
32a562e188 Delete innodb_mysql.[test|result], as keeping them in our codebase achieves
nothing but more merge work for us.
2007-01-12 12:18:53 +00:00
osku
58809043f4 Change this in ha_innobase:
void*           innobase_prebuilt;

to this:

 row_prebuilt_t* prebuilt;

by introducing the typedef in ha_innodb.h, and remove all the now needless
local variables and casts in ha_innodb.cc.
2007-01-11 14:24:53 +00:00
osku
76ad45ea9b Apply patch from MySQL:
ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0
   Added innodb_rollback_on_timeout option to restore the 4.1 
   InnoDB timeout behavior (Bug #24200)
2007-01-11 11:45:58 +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
311365684f dict_load_foreign(): Use a local variable instead of the 10-bit field
foreign->n_fields in order to preserve ON UPDATE CASCADE and
ON DELETE CASCADE flags.  For some reason, gcc does not warn about
shifting a 10-bit field to right by 24 bits.  (Bug #24741)

This bug was introduced while reducing the memory footprint of the
InnoDB data dictionary (Bug #20877).

innodb.test, innodb.result: Add a test case.
2007-01-09 07:40:40 +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
2e91af5213 ut_2_power_up(): Add __attribute__((const)), because otherwise this function
is repeatedly called in buf_flush_free_margin() due to the definitions
of BUF_READ_AHEAD_AREA and other macros starting with BUF_READ_AHEAD_.
2007-01-02 14:07:54 +00:00
sunny
fe29dcf90a Modify que_fork_start_command() to do only one pass over the thread list
instead of three.
2006-12-22 20:18:44 +00:00
sunny
a40a569c27 Fix a potential bug in ha_innodb.cc:innobase_query_is_update() where the
function can be called with "current_thd == NULL". Minor non-functional fix
in log0recv.c
2006-12-15 04:23:43 +00:00
osku
7fc2434c99 Unify dict_table_get_and_increment_handle_count() with dict_table_get() by
adding a second parameter, adjust callers.
2006-12-12 09:37:18 +00:00
osku
ccd40036ad ha_innodb.cc: Remove unused define MAX_ULONG_BIT. 2006-12-07 12:45:26 +00:00
heikki
659effb5f6 Fix bug #24712: SHOW TABLE STATUS for file-per-table showing incorrect
time fields
2006-12-01 15:38:56 +00:00
marko
6d48439525 Replace the Latin abbreviation "cf." in comments. 2006-11-30 10:24:10 +00:00
marko
2f853640ff Remove the unused constants SYNC_INFINITE_TIME and SYNC_TIME_EXCEEDED. 2006-11-29 14:51:54 +00:00
marko
0809ab7ad0 univ.i: Document the debug flags (UNIV_DEBUG et al). 2006-11-29 14:03:47 +00:00
heikki
599565a19d Merge r1079 from branches/5.0:
recv_recovery_from_checkpoint_finish(): Add 1 sec delay
before switching on the sync order checks in crash recovery, so that
file I/O threads have time to suspend themselves.
2006-11-28 16:14:12 +00:00
heikki
0daa938c0c Merge r1067:1077 from branches/5.0:
innobase_start_or_create_for_mysql(): Remove unnecessary delay now that
we moved the setting sync_order_checks_on=TRUE to log0recv.c,
to the start of the rollback phase in crash recovery.

Fix assertion failure sync0sync.c line 1239
(the latter ut_error in sync_thread_reset_level())
in crash recovery when UNIV_SYNC_DEBUG is enabled.
2006-11-28 14:37:05 +00:00
heikki
e8ad2f5744 Remove another accidentally committed change to srv0start.c.
The change was accidentally committed with the merge in r1068.
This revision corresponds to r1051 with a properly merged
r1067 of branches/5.0.
2006-11-27 15:14:35 +00:00
heikki
2e50afd62d Remove an accidentally committed change to srv0start.c.
The change was accidentally committed with the merge in r1068.
2006-11-27 15:09:50 +00:00
heikki
e8094c433d Merge r1067 from branches/5.0:
trx_rollback_for_mysql(), trx_commit_for_mysql():
Protect the creation of trx_dummy_sess with kernel_mutex.
This error was introduced in r1046 and r1050.
2006-11-27 15:06:43 +00:00
heikki
fedfe09e5a Merge r1048:1050 from branches/5.0:
trx_rollback_for_mysql(): Fix the comment introduced in r1046.

trx_commit_for_mysql(): Use the dummy trx->sess also for committing a prepared
transaction in XA recovery, just in case our code would need the session
object also in that case (does not seem to need it right now).
2006-11-23 13:25:12 +00:00
heikki
16ac897b37 Merge r1048 from branches/5.0:
trx_rollback_for_mysql(): Do not set trx->sess back to NULL.
This bug was introduced in r1046.
2006-11-23 13:08:16 +00:00
heikki
1df9d00887 Merge r1046 from branches/5.0:
branches/5.0: trx_rollback_for_mysql(): Ensure that trx->sess is non-NULL
when calling trx_general_rollback_for_mysql().  This removes a segmentation
fault when rolling back a prepared transaction in XA recovery.  (Bug #21468)
2006-11-23 12:55:55 +00:00
marko
7b51400b89 buf_page_init_for_read(): Correct the indentation. 2006-11-23 12:25:51 +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
7868898e89 Merge a change from MySQL AB.
ChangeSet
  2006/11/10 17:22:43+02:00 aelkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi 
  Bug #24190  many exportable definitions of field_in_record_is_null
  
  mysql had several(2) exportable definitions of field_in_record_is_null function.
  
  Fixed with adding static.

storage/innobase/handler/ha_innodb.cc
  2006/11/10 17:22:36+02:00 aelkin@dsl-hkibras-fe30f900-107.dhcp.inet.fi +1 -1
  made static
2006-11-16 15:05:23 +00:00
osku
15ca287cbe Remove duplicate printing of row lock counts in SHOW INNODB STATUS, and in
the remaining print, add a comma so it doesn't get combined with the heap
size. Both problems were introduced in r383.
2006-11-10 10:39:00 +00:00
marko
9954212f5c Minor cleanup.
ha_innobase::rnd_pos(): Use correct format in DBUG_PRINT statements.

buf_page_release(): Remove the local variable buf_fix_count.
2006-11-10 10:09:41 +00:00
marko
caf26af033 Merge changes from MySQL AB to innodb_mysql.result. 2006-11-09 16:50:10 +00:00
marko
7cc0c62e77 Introduce #define UNIV_LIST_DEBUG for enabling the debug code in
UT_LIST_REMOVE_CLEAR().
2006-11-09 12:52:45 +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
cb169c6744 fil_flush_file_spaces(): Copy the system->unflushed_spaces list to an
array while holding the mutex.  This removes the crash-triggering
race condition that was introduced when fixing Bug #15653.  (Bug #24089)
2006-11-08 13:33:24 +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
b4b9a10700 Merge changes from MySQL to get the code compiling again:
Change return type of ha_innobase::info to int.

 plug.in: Add MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS.
2006-11-03 11:44:29 +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
197e6a0723 innodb.result, innodb_mysql.result: Merge changes from MySQL AB:
ChangeSet
  2006/10/09 19:51:41+04:00 gkodinov@macbook.local 
  Bug #22781: SQL_BIG_RESULT fails to influence sort plan
   Currently SQL_BIG_RESULT is checked only at compile time.
   However, additional optimizations may take place after
   this check that change the sort method from 'filesort'
   to sorting via index. As a result the actual plan
   executed is not the one specified by the SQL_BIG_RESULT
   hint. Similarly, there is no such test when executing
   EXPLAIN, resulting in incorrect output.
   The patch corrects the problem by testing for
   SQL_BIG_RESULT both during the explain and execution
   phases.
2006-10-26 11:37:56 +00:00
osku
4a8e394132 btr_lift_page_up(): Set new page levels in all ancestor pages, not just
in the father page.

btr0btr.h: Add a BTR_MAX_LEVELS define.
2006-10-19 10:43:14 +00:00
marko
3d9db439cd dict_print_info_on_foreign_key_in_create_format(): Use ut_print_name()
instead of passing the wrong length to ut_print_namel().  (Bug #23368)

ut_print_name(), ut_print_namel(): Document the special treatment of '/'.

ut_print_namel(): Replace strchr() with memchr(), as the string might
not be NUL-terminated.
2006-10-18 11:24:58 +00:00
marko
7241316fba ha_innobase::store_lock(): When downgrading table locks, do not
check thd->in_lock_tables but test if
thd->lex->sql_command == SQLCOM_LOCK_TABLES
instead.  Otherwise, stored functions will use table locks.  (Bug #18077)

This patch is from Heikki.
2006-10-16 12:19:36 +00:00