Commit graph

1369 commits

Author SHA1 Message Date
unknown
c6d47e6e01 Bug#12980094 and Bug#13034534
Bug 12980094 - ASSERTION IN INNODB DETECTED IN RQG_PARTITION_DDL
Bug 13034534 - RQG TESTS FAIL ON WINDOWS WITH CRASH NEAR RW_LOCK_DEBUG_PRINT

All access to struct rw_lock_debug_struct must be protected by rw_lock_debug_mutex_enter().
2011-10-04 09:21:47 -05:00
Sergei Golubchik
45ee26699e remove redundant declarations 2011-10-04 15:01:26 +02:00
Inaam Rana
c95fdd936e Revert original fix for Bug 12612184 and the follow up fix for
Bug 12704861.

Bug 12704861 fix was revno: 3504.1.1 (rb://693)
Bug 12612184 fix was revno: 3445.1.10 (rb://678)
2011-09-30 07:02:19 -04:00
Marko Mäkelä
cbde5cb883 Merge mysql-5.1 to mysql-5.5. 2011-09-26 10:08:42 +03:00
Marko Mäkelä
7f729cfac4 Bug#12963823 CRASH IN PURGE THREAD UNDER UNUSUAL CIRCUMSTANCES
Replace part of the patch that Kevin apparently forgot to push.
Fix the bug also in the built-in InnoDB of MySQL 5.1.

I cannot explain why the test case was not failing without the
full patch.

This was rb:762, approved by me.
2011-09-22 13:35:02 +03:00
Daniel Fischer
7450044eb7 merge from 5.5.16 2011-09-21 12:40:41 +02:00
unknown
d27d267ee7 Bug 12963823 - Crash in Purge thread under unusual circumstances.
The problem occurred when indexes are added between the time that an
UNDO record is created and the time that the purge thread comes around
and deletes the old secondary index entries.  The purge thread would
hit an assert when trying to build a secondary index entry for
searching.  The problem was that the old value of those fields were not
in the UNDO record since they were not part of an index when the UPDATE
occured. 
A test case was added to innodb-index.test.
2011-09-20 18:17:36 -06:00
unknown
40761a9a73 Merge from mysql-5.1.59-release 2011-09-15 18:48:54 +02:00
Marko Mäkelä
3d6fc1711c Merge mysql-5.1 to mysql-5.5. 2011-09-14 15:44:34 +03:00
Vasil Dimov
3c18c37066 Merge mysql-5.1 -> mysql-5.5 2011-09-13 17:23:02 +03:00
Marko Mäkelä
3312a023b1 Merge mysql-5.1 to mysql-5.5. 2011-09-13 09:21:39 +03:00
Marko Mäkelä
3436169892 Hopefully final fix of Bug#11766591 59733: Possible deadlock
when buffered changes are to be discarded

ibuf_add_free_page(): Lower the latching order of the newly allocated page
to SYNC_IBUF_TREE_NODE_NEW after latching the insert buffer tree root.

This bug always was bogus UNIV_SYNC_DEBUG alarm. The function
buf_block_dbg_add_level() is a no-op unless UNIV_SYNC_DEBUG is defined.
2011-09-13 09:18:34 +03:00
Marko Mäkelä
3819529d01 Merge mysql-5.1 to mysql-5.5. 2011-09-12 10:25:17 +03:00
Vasil Dimov
fa60b162c2 Merge mysql-5.1 -> mysql-5.5 2011-09-09 10:12:54 +03:00
Marko Mäkelä
109185f1ef Merge mysql-5.1 to mysql-5.5. 2011-09-08 16:25:45 +03:00
Marko Mäkelä
132f023b08 Bug#11766591 59733: POSSIBLE DEADLOCK WHEN BUFFERED CHANGES ARE DISCARDED
Tweak the faulty UNIV_SYNC_DEBUG diagnostics a little bit more.

ibuf_add_free_page(): Lower the latching order of the newly allocated page
only after acquiring the ibuf_mutex.
2011-09-08 15:54:15 +03:00
Jimmy Yang
d1a80e6ad7 Fix Bug #12885783 - BLOCK LOADING TABLE WITH LARGE COLLATION NUMBER
FROM 5.6 SERVER

rb://747 approved by Marko
2011-09-07 21:42:14 -07:00
Vasil Dimov
f8d8832d69 Merge mysql-5.1 -> mysql-5.5 2011-09-07 18:24:18 +03:00
Marko Mäkelä
006a6dc3cc Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() - cleanup
Remove the unused debug constants for the latching order level SYNC_THR_LOCAL.
2011-09-06 10:18:03 +03:00
Marko Mäkelä
9aeb3309af Merge mysql-5.1 to mysql-5.5. 2011-09-06 10:14:45 +03:00
Marko Mäkelä
247ada63af Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
This fix was accidentally pushed to mysql-5.1 after the 5.1.59 clone-off in
bzr revision id marko.makela@oracle.com-20110829081642-z0w992a0mrc62s6w
with the fix of Bug#12704861 Corruption after a crash during BLOB update
but not merged to mysql-5.5 and upwards.

In the Barracuda formats, the clustered index record no longer
contains a prefix of off-page columns. Because of this, the undo log
must contain these prefixes, so that purge and multi-versioning will
continue to work. However, this also means that an undo log record can
become too big to fit in an undo log page. (It is a limitation of the
undo log that undo records cannot span across multiple pages.)

In case the checks for undo log size fail when CREATE TABLE or CREATE
INDEX is executed, we need a fallback that blocks a modification
operation when the undo log record would exceed the maximum size.

trx_undo_free_last_page_func(): Renamed from trx_undo_free_page_in_rollback().
Define the trx_t parameter only in debug builds.

trx_undo_free_last_page(): Wrapper for trx_undo_free_last_page_func().
Pass the trx_t parameter only in debug builds.

trx_undo_truncate_end_func(): Renamed from trx_undo_truncate_end().
Define the trx_t parameter only in debug builds. Rewrite a for(;;) loop
as a while loop for clarity.

trx_undo_truncate_end(): Wrapper for from trx_undo_truncate_end_func().
Pass the trx_t parameter only in debug builds.

trx_undo_erase_page_end(): Return TRUE if the page was non-empty
to begin with. Refuse to erase empty pages.

trx_undo_report_row_operation(): If the page for which the undo log
was too big was empty, free the undo page and return DB_TOO_BIG_RECORD.

rb:749 approved by Inaam Rana
2011-09-01 21:48:04 +03:00
Jimmy Yang
07770e7e8e Fix Bug 12922077 - SEGV IN DICT_SET_CORRUPTED_INDEX_CACHE_ONLY(), DROP TABLE
rb://752 approved by Sunny Bains
2011-08-29 02:44:28 -07:00
Marko Mäkelä
7295f6ea52 Merge mysql-5.5 to working copy. 2011-08-29 11:55:38 +03:00
Jimmy Yang
d7264adc8a Fix Bug #12882177 - INSTRUMENTATION IN PFS_MUTEX_ENTER_NOWAIT_FUNC IS INCORRECT
Use PSI_MUTEX_TRYLOCK instead of PSI_MUTEX_LOCK when acquire mutex with
"no_wait" option
      
Approved by Sunny Bains
2011-08-29 01:29:57 -07:00
Marko Mäkelä
7c20cd1b5d Merge mysql-5.1 to mysql-5.5. 2011-08-29 11:22:43 +03:00
Marko Mäkelä
41f229cd9e Bug#12704861 Corruption after a crash during BLOB update
The fix of Bug#12612184 broke crash recovery. When a record that
contains off-page columns (BLOBs) is updated, we must first write redo
log about the BLOB page writes, and only after that write the redo log
about the B-tree changes. The buggy fix would log the B-tree changes
first, meaning that after recovery, we could end up having a record
that contains a null BLOB pointer.

Because we will be redo logging the writes off the off-page columns
before the B-tree changes, we must make sure that the pages chosen for
the off-page columns are free both before and after the B-tree
changes. In this way, the worst thing that can happen in crash
recovery is that the BLOBs are written to free pages, but the B-tree
changes are not applied. The BLOB pages would correctly remain free in
this case. To achieve this, we must allocate the BLOB pages in the
mini-transaction of the B-tree operation. A further quirk is that BLOB
pages are allocated from the same file segment as leaf pages. Because
of this, we must temporarily "hide" any leaf pages that were freed
during the B-tree operation by "fake allocating" them prior to writing
the BLOBs, and freeing them again before the mtr_commit() of the
B-tree operation, in btr_mark_freed_leaves().

btr_cur_mtr_commit_and_start(): Remove this faulty function that was
introduced in the Bug#12612184 fix. The problem that this function was
trying to address was that when we did mtr_commit() the BLOB writes
before the mtr_commit() of the update, the new BLOB pages could have
overwritten clustered index B-tree leaf pages that were freed during
the update. If recovery applied the redo log of the BLOB writes but
did not see the log of the record update, the index tree would be
corrupted. The correct solution is to make the freed clustered index
pages unavailable to the BLOB allocation. This function is also a
likely culprit of InnoDB hangs that were observed when testing the
Bug#12612184 fix.

btr_mark_freed_leaves(): Mark all freed clustered index leaf pages of
a mini-transaction allocated (nonfree=TRUE) before storing the BLOBs,
or freed (nonfree=FALSE) before committing the mini-transaction.

btr_freed_leaves_validate(): A debug function for checking that all
clustered index leaf pages that have been marked free in the
mini-transaction are consistent (have not been zeroed out).

btr_page_alloc_low(): Refactored from btr_page_alloc(). Return the
number of the allocated page, or FIL_NULL if out of space. Add the
parameter "mtr_t* init_mtr" for specifying the mini-transaction where
the page should be initialized, or if this is a "fake allocation"
(init_mtr=NULL) by btr_mark_freed_leaves(nonfree=TRUE).

btr_page_alloc(): Add the parameter init_mtr, allowing the page to be
initialized and X-latched in a different mini-transaction than the one
that is used for the allocation. Invoke btr_page_alloc_low(). If a
clustered index leaf page was previously freed in mtr, remove it from
the memo of previously freed pages.

btr_page_free(): Assert that the page is a B-tree page and it has been
X-latched by the mini-transaction. If the freed page was a leaf page
of a clustered index, link it by a MTR_MEMO_FREE_CLUST_LEAF marker to
the mini-transaction.

btr_store_big_rec_extern_fields_func(): Add the parameter alloc_mtr,
which is NULL (old behaviour in inserts) and the same as local_mtr in
updates. If alloc_mtr!=NULL, the BLOB pages will be allocated from it
instead of the mini-transaction that is used for writing the BLOBs.

fsp_alloc_from_free_frag(): Refactored from
fsp_alloc_free_page(). Allocate the specified page from a partially
free extent.

fseg_alloc_free_page_low(), fseg_alloc_free_page_general(): Add the
parameter "mtr_t* init_mtr" for specifying the mini-transaction where
the page should be initialized, or NULL if this is a "fake allocation"
that prevents the reuse of a previously freed B-tree page for BLOB
storage. If init_mtr==NULL, try harder to reallocate the specified page
and assert that it succeeded.

fsp_alloc_free_page(): Add the parameter "mtr_t* init_mtr" for
specifying the mini-transaction where the page should be initialized.
Do not allow init_mtr == NULL, because this function is never to be
used for "fake allocations".

mtr_t: Add the operation MTR_MEMO_FREE_CLUST_LEAF and the flag
mtr->freed_clust_leaf for quickly determining if any
MTR_MEMO_FREE_CLUST_LEAF operations have been posted.

row_ins_index_entry_low(): When columns are being made off-page in
insert-by-update, invoke btr_mark_freed_leaves(nonfree=TRUE) and pass
the mini-transaction as the alloc_mtr to
btr_store_big_rec_extern_fields(). Finally, invoke
btr_mark_freed_leaves(nonfree=FALSE) to avoid leaking pages.

row_build(): Correct a comment, and add a debug assertion that a
record that contains NULL BLOB pointers must be a fresh insert.

row_upd_clust_rec(): When columns are being moved off-page, invoke
btr_mark_freed_leaves(nonfree=TRUE) and pass the mini-transaction as
the alloc_mtr to btr_store_big_rec_extern_fields(). Finally, invoke
btr_mark_freed_leaves(nonfree=FALSE) to avoid leaking pages.

buf_reset_check_index_page_at_flush(): Remove. The function
fsp_init_file_page_low() already sets
bpage->check_index_page_at_flush=FALSE.

There is a known issue in tablespace extension. If the request to
allocate a BLOB page leads to the tablespace being extended, crash
recovery could see BLOB writes to pages that are off the tablespace
file bounds. This should trigger an assertion failure in fil_io() at
crash recovery. The safe thing would be to write redo log about the
tablespace extension to the mini-transaction of the BLOB write, not to
the mini-transaction of the record update. However, there is no redo
log record for file extension in the current redo log format.

rb:693 approved by Sunny Bains
2011-08-29 11:16:42 +03:00
Marko Mäkelä
42ff786cf9 Merge mysql-5.1 to mysql-5.5. 2011-08-22 17:12:27 +03:00
Jimmy Yang
d9c3d35437 In innobase_format_name() we should call innobase_convert_name() with
"!is_index_name" instead of "is_index_name", so the table name in the
error message would not be formated as index name.
2011-08-17 02:39:55 -07:00
Jimmy Yang
7abcb1dd08 Add two tests for "innodb_large_prefix" and "innodb_force_load_corrupted" in
sys_vars test suite.
2011-08-16 20:51:40 -07:00
Jimmy Yang
95fa7fab3b Fix bug #11830883, SUPPORT "CORRUPTED" BIT FOR INNODB TABLES AND INDEXES.
Also addressed issues in bug #11745133, where we could mark a table
corrupted instead of crashing the server when found a corrupted buffer/page
if the table created with innodb_file_per_table on.
2011-08-16 18:07:59 -07:00
Mats Kindahl
cf5e5f837a Merging into mysql-5.5.16-release. 2011-08-15 20:12:11 +02:00
Marko Mäkelä
7f03063418 Merge mysql-5.1 to mysql-5.5. Add a test case. 2011-08-15 12:18:34 +03:00
Marko Mäkelä
c8163a16fa Merge mysql-5.1-security to mysql-5.5-security. 2011-08-10 15:03:33 +03:00
Marko Mäkelä
f2f4b19678 Bug#12626794 61240: UNUSED FUNCTIONS ... 2011-08-10 14:56:14 +03:00
Marko Mäkelä
79aa9c177b Merge mysql-5.1 to mysql-5.5. 2011-08-10 12:58:22 +03:00
Marko Mäkelä
7645c5ee90 Bug#12835650 VARCHAR maximum length performance impact
row_sel_field_store_in_mysql_format(): Do not pad the unused part of
the buffer reserved for a True VARCHAR column (introduced in 5.0.3).
Add Valgrind instrumentation ensuring that the unused part will be
flagged uninitialized.

row_sel_copy_cached_field_for_mysql(): New function: Copy a field
that is in the MySQL row format, not copying the unused tail of
VARCHAR columns.

row_sel_pop_cached_row_for_mysql(): Invoke
row_sel_copy_cached_field_for_mysql() for copying fields.
When the row is long, copy it field-by-field.

rb:715 approved by Inaam Rana
2011-08-10 12:25:24 +03:00
Marko Mäkelä
5962cadcfa Merge mysql-5.1 to mysql-5.5. 2011-08-08 12:16:15 +03:00
Inaam Rana
fce189fadb Merge from 5.1 the fix for Bug 12356373 2011-07-19 10:54:59 -04:00
unknown
438d21189c Null Merge from mysql-5.1 with second fix for Bug#12637786
Bug#12637786 was fixed with rb:692 by marko.  But that fix has a remaining
bug.  It added this assert;
    ut_ad(ind_field->prefix_len);
before a section of code that assumes there is a prefix_len.  

The patch replaced code that explicitly avoided this with a check for
prefix_len.  It turns out that the purge thread can get to that assert
without a prefix_len because it does not use a row_ext_t* .
When UNIV_DEBUG is not defined, the affect of this is that the purge thread
sets the dfield->len to zero and then cannot find the entry in the index to
purge.  So secondary index entries remain unpurged.

This patch does not do the assert.  Instead, it uses
    'if (ind_field->prefix_len) {...}'
around the section of code that assumes a prefix_len.  This is the way the
patch I provided to Marko did it.

The test case is simply modified to do a sleep(10) in order to give the
purge thread a chance to run. Without the code change to row0row.c, this
modified testcase will assert if InnoDB was compiled with UNIV_DEBUG.
I tried to sleep(5), but it did not always assert.
2011-07-08 08:16:23 -05:00
Davi Arnaut
71e0ff64f0 Bug#12727287: Maintainer mode compilation fails with gcc 4.6
GCC 4.6 has new -Wunused-but-set-variable flag, which is enabled
by -Wall, that causes GCC to emit a warning whenever a local variable
is assigned to, but otherwise unused (aside from its declaration).

Since the maintainer mode uses -Wall and -Werror, source code which
triggers these warnings will be rejected. That is, these warnings
become hard errors.

The solution is to fix the code which triggers these specific warnings.
In most of the cases, this is a welcome cleanup as code which triggers
this warning is probably dead anyway.

dbug/dbug.c:
  Unused but set.
libmysqld/lib_sql.cc:
  Length is not necessary as the converted error message is always
  null-terminated.
sql/item_func.cc:
  Make get_var_with_binlog private to this compilation unit.
  If a error was raised, do not attempt to evaluate the user
  variable as the statement execution will be interrupted
  anyway.
sql/mysqld.cc:
  Use a void expression to silence the warning. Avoids the use of
  macros that would make the code more unreadable than it already is.
sql/protocol.cc:
  Length is not necessary as the converted error message is always
  null-terminated. Remove unnecessary casts and assignment.
sql/sql_class.h:
  Function is only used in a single compilation unit.
sql/sql_load.cc:
  Only use the variable outside of EMBEDDED_LIBRARY.
storage/innobase/btr/btr0cur.c:
  Do not retrieve field, only the record length is being used.
storage/perfschema/pfs.cc:
  Use a void expression to silence the warning.
tests/mysql_client_test.c:
  Unused but set.
unittest/mysys/lf-t.c:
  Unused but set.
2011-07-07 08:22:43 -03:00
Vladislav Vaintroub
f9cb1467b8 merge Windows performance patches into 5.3 2011-07-05 21:46:53 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Marko Mäkelä
d5d2c4fa74 Merge mysql-5.1 to mysql-5.5. 2011-06-15 10:30:19 +03:00
Marko Mäkelä
a862937699 Introduce UNIV_BLOB_NULL_DEBUG for temporarily hiding Bug#12650861.
Some ut_a(!rec_offs_any_null_extern()) assertion failures are indicating
genuine BLOB bugs, others are bogus failures when rolling back incomplete
transactions at crash recovery. This needs more work, and until I get a
chance to work on it, other testing must not be disrupted by this.
2011-06-15 10:16:59 +03:00
Vladislav Vaintroub
4171483b53 Backport Fix for Bug#24509 - 2048 file descriptor limit on windows needs increasing.
The patch replaces the use of the POSIX I/O interfaces in mysys on Windows with 
the Win32 API calls (CreateFile, WriteFile, etc). The Windows HANDLE for the open
 file is stored in the my_file_info struct, along with a flag for append mode 
(because the Windows API does not support opening files in append mode in all cases)
The default max open files has been increased to 16384 and can be increased further
by setting --max-open-files=<value> during the server start.

Noteworthy benefit of this patch is that it removes limits from the table_cache size - 
allowing for more simultaneus users
2011-06-12 15:52:07 +02:00
Marko Mäkelä
ca84a75e44 Merge mysql-5.1 to mysql-5.5. 2011-06-09 22:03:16 +03:00
Marko Mäkelä
4412b5dab6 Disable a debug assertion that was added to track down Bug#12612184.
row_build(): The record may contain null BLOB pointers when the server
is rolling back an insert that was interrupted by a server crash.
2011-06-09 21:50:41 +03:00
Marko Mäkelä
34baff7743 Merge mysql-5.1 to mysql-5.5. 2011-06-09 13:59:02 +03:00
Marko Mäkelä
6348b7375a BLOB instrumentation for Bug#12612184 Race condition in row_upd_clust_rec()
If UNIV_DEBUG or UNIV_BLOB_LIGHT_DEBUG is enabled, add
!rec_offs_any_null_extern() assertions, ensuring that records do not
contain null pointers to externally stored columns in inappropriate
places.

btr_cur_optimistic_update(): Assert !rec_offs_any_null_extern().
Incomplete records must never be updated or deleted. This assertion
will cover also the pessimistic route.

row_build(): Assert !rec_offs_any_null_extern(). Search tuples must
never be built from incomplete index entries.

row_rec_to_index_entry(): Assert !rec_offs_any_null_extern() unless
ROW_COPY_DATA is requested. ROW_COPY_DATA is used for
multi-versioning, and therefore it might be valid to copy the most
recent (uncommitted) version while it contains a null pointer to
off-page columns.

row_vers_build_for_consistent_read(),
row_vers_build_for_semi_consistent_read(): Assert !rec_offs_any_null_extern()
on all versions except the most recent one.

trx_undo_prev_version_build(): Assert !rec_offs_any_null_extern() on
the previous version.

rb:682 approved by Sunny Bains
2011-06-09 13:31:15 +03:00
Sergei Golubchik
9b98cae4cc merge with 5.1-micro 2011-06-07 18:13:02 +02:00
Marko Mäkelä
0f37ccb30f Bug #12612184 BLOB debug code cleanup:
Refactor the !rec_offs_any_extern relaxation in row_build().

trx_assert_active(trx_id): Assert that the given transaction is active.
(In the 5.1 built-in InnoDB, there is no trx->is_recovered field.)

trx_assert_recovered(trx_id): Assert that the given transaction is
active and has been recovered after a crash.

row_build(): Replace a bunch of code with an assertion that invokes
trx_assert_active() or trx_assert_recovered() and row_get_rec_trx_id().

row_get_trx_id_offset(): Make the function inlined. Remove the unused
parameter rec, and make all parameters const.

row_get_rec_trx_id(), row_get_rec_roll_ptr(): Make all parameters const.

rb:691 approved by Jimmy Yang
2011-06-29 09:57:15 +03:00
Vasil Dimov
0dfe86f53f Silence bogus compiler warning introduced in
marko.makela@oracle.com-20110616072721-8bo92ctixq6eqavr
2011-06-16 16:11:43 +03:00
Marko Mäkelä
417a267927 Re-enable the debug assertions for Bug#12650861.
Replace UNIV_BLOB_NULL_DEBUG with UNIV_DEBUG||UNIV_BLOB_LIGHT_DEBUG. 
Fix known bogus failures.

btr_cur_optimistic_update(): If rec_offs_any_null_extern(), assert that
the current transaction is an incomplete transaction that is being
rolled back in crash recovery.

row_build(): If rec_offs_any_null_extern(), assert that the transaction
that last updated the record was recovered during crash recovery
(and will soon be rolled back).
2011-06-16 11:51:04 +03:00
Marko Mäkelä
5b4ceba58d Bug#12612184 Race condition after btr_cur_pessimistic_update()
btr_cur_compress_if_useful(), btr_compress(): Add the parameter ibool
adjust. If adjust=TRUE, adjust the cursor position after compressing
the page.

btr_lift_page_up(): Return a pointer to the father page.

BTR_KEEP_POS_FLAG: A new flag for btr_cur_pessimistic_update().

btr_cur_pessimistic_update(): If *big_rec != NULL and flags &
BTR_KEEP_POS_FLAG, keep the cursor positioned on the updated record.
Also, do not release the index tree x-lock if *big_rec != NULL.

btr_cur_mtr_commit_and_start(): Commits and restarts a
mini-transaction so that it will retain an x-lock on index->lock and
the page of the cursor. This is invoked when
btr_cur_pessimistic_update() returns *big_rec != NULL.

In all callers of btr_cur_pessimistic_update() that do not pass
BTR_KEEP_POS_FLAG, assert that *big_rec == NULL.

btr_cur_compress(): Unused function [in the built-in MySQL 5.1], remove.

page_rec_get_nth(): Return the nth record on the page (an inverse
function of page_rec_get_n_recs_before()). Refactored from
page_get_middle_rec().

page_get_middle_rec(): Invoke page_rec_get_nth().

page_cur_insert_rec_zip_reorg(): Make use of the page directory
shortcuts in page_rec_get_nth() instead of scanning the whole list of
records.

row_ins_clust_index_entry_by_modify(): Pass BTR_KEEP_POS_FLAG to
btr_cur_pessimistic_update().

row_ins_index_entry_low(): If row_ins_clust_index_entry_by_modify()
returns a big_rec, invoke btr_cur_mtr_commit_and_start() in order to
commit and start the mini-transaction without releasing the x-locks on
index->lock and the cursor page, and write the big_rec. Releasing the
page latch in mtr_commit() caused a race condition.

row_upd_clust_rec(): Pass BTR_KEEP_POS_FLAG to
btr_cur_pessimistic_update(). If it returns a big_rec, invoke
btr_cur_mtr_commit_and_start() in order to commit and start the
mini-transaction without releasing the x-locks on index->lock and the
cursor page, and write the big_rec. Releasing the page latch in
mtr_commit() caused a race condition.

sync_thread_add_level(): Add the parameter ibool relock. When TRUE,
bypass the latching order rules.

rw_lock_add_debug_info(): For nested X-lock requests, pass relock=TRUE
to sync_thread_add_level().

rb:678 approved by Jimmy Yang
2011-06-16 10:27:21 +03:00
Marko Mäkelä
9d820f416b Non-functional change: Unbreak the Hot Backup build.
page_rec_write_field(): Omit the definition if UNIV_HOTBACKUP is defined.
2011-06-06 16:24:01 +03:00
Vasil Dimov
0e5617e5aa Increment InnoDB version from 1.1.7 to 1.1.8
InnoDB 1.1.7 was released with MySQL 5.5.13
2011-06-03 13:47:46 +03:00
Jon Olav Hauglid
9b076952ec Bug#11853126 RE-ENABLE CONCURRENT READS WHILE CREATING
SECONDARY INDEX IN INNODB

The patches for Bug#11751388 and Bug#11784056 enabled concurrent
reads while creating secondary indexes in InnoDB. However, they
introduced a regression. This regression occured if ALTER TABLE
failed after the index had been added, for example during the
lock upgrade needed to update .FRM. If this happened, InnoDB
and the server got out of sync with regards to which indexes
actually existed. Therefore the patch for Bug#11815600 again
disabled concurrent reads.

This patch re-enables concurrent reads. The original regression
is fixed by splitting the ADD INDEX operation into two parts.
First the new index is created but not made active. This is
done while concurrent reads are allowed. The second part of
the operation makes the index active (or reverts the change).
This is done after lock upgrade, which prevents the original
regression.

In order to implement this change, the patch changes the storage
API for in-place index creation. handler::add_index() is split
into two functions, handler_add_index() and
handler::final_add_index(). The former for creating indexes without
making them visible and the latter for commiting (i.e. making
visible) new indexes or reverting the changes.

Large parts of this patch were written by Marko Mäkelä.

Test case added to innodb_mysql_lock.test.
2011-06-01 10:06:55 +02:00
Jimmy Yang
9e2b7fa7d5 Implement worklog #5743 InnoDB: Lift the limit of index key prefixes.
With this change, the index prefix column length lifted from 767 bytes
to 3072 bytes if "innodb_large_prefix" is set to "true".

rb://603 approved by Marko
2011-05-31 02:12:32 -07:00
Marko Mäkelä
53e9aabe12 Bug#12606344 - ADD VALGRIND DIAGNOSTICS TO MTR_START, MTR_COMMIT
mtr_start(): Declare the mtr memory area uninitialized in Valgrind
before initializing the fields.

mtr_commit(): Declare everything uninitialized except
mtr->start_lsn, mtr->end_lsn and mtr->state.
2011-05-31 10:55:29 +03:00
Michael Widenius
f197991f41 Merge with 5.1-microseconds
A lot of small fixes and new test cases.

client/mysqlbinlog.cc:
  Cast removed
client/mysqltest.cc:
  Added missing DBUG_RETURN
include/my_pthread.h:
  set_timespec_time_nsec() now only takes one argument
mysql-test/t/date_formats.test:
  Remove --disable_ps_protocl as now also ps supports microseconds
mysys/my_uuid.c:
  Changed to use my_interval_timer() instead of my_getsystime()
mysys/waiting_threads.c:
  Changed to use my_hrtime()
sql/field.h:
  Added bool special_const_compare() for fields that may convert values before compare (like year)
sql/field_conv.cc:
  Added test to get optimal copying of identical temporal values.
sql/item.cc:
  Return that item_int is equal if it's positive, even if unsigned flag is different.
  Fixed Item_cache_str::save_in_field() to have identical null check as other similar functions
  Added proper NULL check to Item_cache_int::save_in_field()
sql/item_cmpfunc.cc:
  Don't call convert_constant_item() if there is nothing that is worth converting.
  Simplified test when years should be converted
sql/item_sum.cc:
  Mark cache values in Item_sum_hybrid as not constants to ensure they are not replaced by other cache values in compare_datetime()
sql/item_timefunc.cc:
  Changed sec_to_time() to take a my_decimal argument to ensure we don't loose any sub seconds.
  Added Item_temporal_func::get_time() (This simplifies some things)
sql/mysql_priv.h:
  Added Lazy_string_decimal()
sql/mysqld.cc:
  Added my_decimal constants max_seconds_for_time_type, time_second_part_factor
sql/table.cc:
  Changed expr_arena to be of type CONVENTIONAL_EXECUTION to ensure that we don't loose any items that are created by fix_fields()
sql/tztime.cc:
  TIME_to_gmt_sec() now sets *in_dst_time_gap in case of errors
  This is needed to be able to detect if timestamp is 0
storage/maria/lockman.c:
  Changed from my_getsystime() to set_timespec_time_nsec()
storage/maria/ma_loghandler.c:
  Changed from my_getsystime() to my_hrtime()
storage/maria/ma_recovery.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/maria/unittest/trnman-t.c:
  Changed from my_getsystime() to mmicrosecond_interval_timer()
storage/xtradb/handler/ha_innodb.cc:
  Added support for new time,datetime and timestamp
unittest/mysys/thr_template.c:
  my_getsystime() -> my_interval_timer()
unittest/mysys/waiting_threads-t.c:
  my_getsystime() -> my_interval_timer()
2011-05-28 05:11:32 +03:00
Sergei Golubchik
c1a92f9cae innodb compatibility fix 2011-05-26 19:16:10 +02:00
Dmitry Lenev
861291f1ab Fix for bug #11762012 - "54553: INNODB ASSERTS IN
HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".

Attempt to update an InnoDB temporary table under LOCK TABLES
led to assertion failure in both debug and production builds
if this temporary table was explicitly locked for READ. The 
same scenario works fine for MyISAM temporary tables.

The assertion failure was caused by discrepancy between lock 
that was requested on the rows of temporary table at LOCK TABLES
time and by update operation. Since SQL-layer requested a 
read-lock at LOCK TABLES time InnoDB engine assumed that upcoming
statements which are going to be executed under LOCK TABLES will 
only read table and therefore should acquire only S-lock.
An update operation broken this assumption by requesting X-lock.

Possible approaches to fixing this problem are:

1) Skip locking of temporary tables as locking doesn't make any
   sense for connection-local objects.
2) Prohibit changing of temporary table locked by LOCK TABLES ... 
   READ.

Unfortunately both of these approaches have drawbacks which make 
them unviable for stable versions of server.

So this patch takes another approach and changes code in such way
that LOCK TABLES for a temporary table will always request write
lock. In 5.1 version of this patch switch from read lock to write
lock is done inside of InnoDBs handler methods as doing it on 
SQL-layer causes compatibility troubles with FLUSH TABLES WITH
READ LOCK.

mysql-test/suite/innodb/r/innodb_mysql.result:
  Added test for bug #11762012 - "54553: INNODB ASSERTS IN 
  HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".
mysql-test/suite/innodb/t/innodb_mysql.test:
  Added test for bug #11762012 - "54553: INNODB ASSERTS IN 
  HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".
mysql-test/suite/innodb_plugin/r/innodb_mysql.result:
  Added test for bug #11762012 - "54553: INNODB ASSERTS IN 
  HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".
mysql-test/suite/innodb_plugin/t/innodb_mysql.test:
  Added test for bug #11762012 - "54553: INNODB ASSERTS IN 
  HA_INNOBASE::UPDATE_ROW, TEMPORARY TABLE, TABLE LOCK".
storage/innobase/handler/ha_innodb.cc:
  Assume that a temporary table locked by LOCK TABLES can be updated
  even if it was only locked for read and therefore an X-lock should 
  be always requested for such tables.
storage/innodb_plugin/handler/ha_innodb.cc:
  Assume that a temporary table locked by LOCK TABLES can be updated
  even if it was only locked for read and therefore an X-lock should 
  be always requested for such tables.
2011-05-26 17:14:47 +04:00
Marko Mäkelä
af3eff8da0 Bug#12584374 LOCK_VALIDATE TRIPS ASSERTION !BLOCK->PAGE.FILE_PAGE_WAS_FREE
Fix a deadlock in the initial patch. lock_validate() must not hold the
lock system mutex while s-latching a block, because some functions,
such as lock_rec_convert_impl_to_expl(), may be already holding an x-latch
on the block that lock_validate() is interested in while attempting to
acquire the lock system mutex.

This deadlock was not caught by UNIV_SYNC_DEBUG because of
buf_block_dbg_add_level(block, SYNC_NO_ORDER_CHECK).
2011-05-24 23:08:22 +03:00
Marko Mäkelä
0f95f99b03 Bug#12584374 LOCK_VALIDATE TRIPS ASSERTION !BLOCK->PAGE.FILE_PAGE_WAS_FREED
lock_clust_rec_some_has_impl(), row_get_rec_trx_id(),
lock_rec_queue_validate(), lock_table_other_has_incompatible(),
lock_table_has_to_wait_in_queue(), lock_table_queue_validate():
Add const qualifiers.

row_get_trx_id_offset(): Add const qualifiers. Keep the parameter rec
only in UNIV_DEBUG builds. Inline the function.

lock_rec_validate_page(): Take the buffer block as a parameter, to
avoid a buf_page_get_gen() call in most cases.

lock_rec_validate_page_low(): A version of lock_rec_validate_page()
that assumes that the lock system mutexes are already being held.

lock_rec_get_next_on_page_const(): A const variant of
lock_rec_get_next_on_page().

lock_validate(): Do not release the lock system mutex while
buffer-fixing the block for the lock_rec_validate_page() call.
Releasing the mutex apparently caused the assertion failure.

rb:665 approved by Sunny Bains
2011-05-24 14:11:21 +03:00
Marko Mäkelä
34e5d4740e Backport an InnoDB Bug #58815 (Bug #11765812) work-around from mysql-trunk:
------------------------------------------------------------
revno 2876.244.305
revision id marko.makela@oracle.com-20110413082211-e6ouhjz5rmqxcqap
parent  marko.makela@oracle.com-20110413075948-kvytmc37ye1nt7d9
committer  Marko Mäkelä <marko.makela@oracle.com>
branch nick 5.6-innodb
timestamp Wed 2011-04-13 11:22:11 +0300
message:
  Suppress the Bug #58815 (Bug #11765812) assertion failure.

  buf_page_get_gen(): Introduce BUF_GET_POSSIBLY_FREED for suppressing the
  check that the file page must not have been freed.

  btr_estimate_n_rows_in_range_on_level(): Pass BUF_GET_POSSIBLY_FREED and
  explain in the comments why this is needed and why it should be mostly
  harmless to ignore the problem. If InnoDB had always initialized all
  unused fields in data files, no problem would exist.

  This change does not fix the bug, it just "shoots the messenger".

  rb:647 approved by Jimmy Yang
2011-05-24 11:41:31 +03:00
Vasil Dimov
bf5c6fd8cc Merge mysql-5.5-innodb -> mysql-5.5 2011-05-22 23:12:46 +03:00
Michael Widenius
3631146442 Original idea from Zardosht Kasheff to add HA_CLUSTERED_INDEX
- Added a lot of code comments
- Updated get_best_ror_intersec() to prefer index scan on not clustered keys before clustered keys.
- Use HA_CLUSTERED_INDEX to define if one should use HA_MRR_INDEX_ONLY
- For test of using index or filesort to resolve ORDER BY, use HA_CLUSTERED_INDEX flag instead of primary_key_is_clustered()
- Use HA_TABLE_SCAN_ON_INDEX instead of primary_key_is_clustered() to decide if ALTER TABLE ... ORDER BY will have any effect.

sql/ha_partition.h:
  Added comment with warning for code unsafe to use with multiple storage engines at the same time
sql/handler.h:
  Added HA_CLUSTERED_INDEX.
  Documented primary_key_is_clustered()
sql/opt_range.cc:
  Added code comments
  Updated get_best_ror_intersec() to ignore clustered keys.
  Optimized away cpk_scan_used and one instance of current_thd (Simpler code)
  Use HA_CLUSTERED_INDEX to define if one should use HA_MRR_INDEX_ONLY
sql/sql_select.cc:
  Changed comment to #ifdef
  For test of using index or filesort to resolve ORDER BY, use HA_CLUSTERED_INDEX flag instead of primary_key_is_clustered()
  (Change is smaller than what it looks beause of indentation change)
sql/sql_table.cc:
  Use HA_TABLE_SCAN_ON_INDEX instead of primary_key_is_clustered() to decide if ALTER TABLE ... ORDER BY will have any effect.
storage/innobase/handler/ha_innodb.h:
  Added support for HA_CLUSTERED_INDEX
storage/innodb_plugin/handler/ha_innodb.cc:
  Added support for HA_CLUSTERED_INDEX
storage/xtradb/handler/ha_innodb.cc:
  Added support for HA_CLUSTERED_INDEX
2011-05-18 19:26:30 +03:00
Marko Mäkelä
30835b55d5 Fix a bogus UNIV_SYNC_DEBUG failure in the fix of Bug #59641
or Oracle Bug #11766513.

trx_undo_free_prepared(): Do not acquire or release trx->rseg->mutex.
This code is invoked in the single-threaded part of shutdown, therefore
a mutex is not needed.
2011-05-18 15:05:08 +03:00
Marko Mäkelä
53271cfee3 Bug#12543706 - innodb-fast-shutdown=2: Assert
node->modification_counter == node->flush_counter

This bug (an assertion failure during a crash-like shutdown)
was introduced by the fix of
Bug#12323643 Clean up the InnoDB thread shutdown and assertions (WL#5136).

fil_node_close_file(): Relax the failing assertion
when innodb_fast_shutdown=2.
2011-05-17 15:15:55 +03:00
Marko Mäkelä
eaa2a0a9c0 Merge mysql-5.1 to mysql-5.5. 2011-06-30 13:23:34 +03:00
Marko Mäkelä
6ebb38a21d Merge mysql-5.1 to mysql-5.5. 2011-06-29 16:53:16 +03:00
Marko Mäkelä
1b686f2a48 Merge mysql-5.1 to mysql-5.5. 2011-06-29 10:04:00 +03:00
Marko Mäkelä
8c988dc61b Bug#12699505 Memory leak in row_create_index_for_mysql()
DB_COL_APPEARS_TWICE_IN_INDEX: Remove. This condition is already
checked and reported by MySQL before passing the index definition to
the storage engine.

row_create_index_for_mysql(): Remove the redundant check for
DB_COL_APPEARS_TWICE_IN_INDEX. When enforcing the column prefix index
limit, invoke dict_mem_index_free(index) to plug the memory leak. In
the loop, use index->n_def instead of dict_index_get_n_fields(index),
because the latter would be 0 for indexes that have not been copied to
the data dictionary cache.

innodb-use-sys-malloc.test:

Add test cases for attempting to trigger the error checks in
row_create_index_for_mysql(). Before MySQL 5.5 and WL#5743, the leak
is only reproducible if ha_innobase::max_supported_key_part_length()
returned a higher limit than the one used in
row_create_index_for_mysql().

In MySQL 5.5 and later, the leak is reproducible with
innodb_large_prefix=true.

rb:688 approved by Jimmy Yang
2011-06-28 15:28:21 +03:00
Marko Mäkelä
cdecb91404 Merge mysql-5.1 to mysql-5.5. 2011-06-28 12:03:55 +03:00
Marko Mäkelä
7545f86670 Merge mysql-5.1 to mysql-5.5.
This patch was already pushed to mysql-5.5 by Inaam Rana.
2011-06-23 15:57:25 +03:00
Inaam Rana
c75e8aa6e1 Fix a merge error introduced in:
revision-id: inaam.rana@oracle.com-20110617202919-b7p0u0ekj5a9u9nu
2011-06-20 00:37:36 -04:00
Inaam Rana
9df4c14354 merge from mysql-5.1
Bug 12635227 - 61188: DROP TABLE EXTREMELY SLOW
2011-06-17 16:29:19 -04:00
Vasil Dimov
1ba283a9c1 Merge mysql-5.1 -> mysql-5.5 2011-06-16 16:14:16 +03:00
Marko Mäkelä
f43adb8072 Merge mysql-5.1 to mysql-5.5. 2011-06-16 15:13:24 +03:00
Marko Mäkelä
3400e0be0a Merge mysql-5.1 to mysql-5.5. 2011-06-16 12:07:49 +03:00
Michael Widenius
f34be18938 Merge with MariaDB 5.2 2011-05-10 18:17:43 +03:00
Marko Mäkelä
33a0d8690c A non-functional change related to Bug#11830883
page_rec_write_field(): Renamed from page_rec_write_index_page_no()
and inlined.
2011-05-09 11:12:26 +03:00
Jimmy Yang
7cb397c5e0 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-05-04 03:47:30 -07:00
Jimmy Yang
3fa4aaac71 Fix bug #11796673 address backward compatibility on index with
large prefix (>=768). Table with such large prefix index will not
be loaded into memory (for its metadata), unless innodb_force_recovery
is on.

rb://604 Approved by Marko
2011-05-04 03:06:21 -07:00
Mikael Ronstrom
3855512715 merge 2011-05-04 11:08:07 +02:00
Jimmy Yang
0cf6d8b0ba Fix bug #12424282 - INNODB PERFORMANCE SCHEMA: Double accounting for OS_AIO_SYNC
I/O in os_aio_func.

Approved by Sunny Bains
2011-05-04 00:09:48 -07:00
Michael Widenius
e415ba0fb2 Merge with MySQL 5.1.57/58
Moved some BSD string functions from Unireg
2011-05-02 20:58:45 +03:00
unknown
6ed10ee5dd Bug#60309 - Bug#12356829: MYSQL 5.5.9 FOR MAC OSX HAS BUG WITH FOREIGN KEY CONSTRAINTS
The innoDB global variable srv_lower_case_table_names is set to the value of lower_case_table_names declared in mysqld.h server in ha_innodb.cc.  Since this variable can change at runtime, it is reset for each handler call to ::create, ::open, ::rename_table & ::delete_table.

But it is possible for tables to be implicitly opened before an explicit handler call is made when an engine is first started or restarted.  I was able to reproduce that with the testcase in this patch on a version of InnoDB from 2 weeks ago.  It seemed like the change buffer entries for the secondary key was getting put into pages after the restart.  (But I am not sure, I did not write down the call stack while it was reproducing.)  In the current code, the implicit open, which is actually a call to dict_load_foreigns(), does not occur with this testcase.

The change is to replace srv_lower_case_table_names by an interface function in innodb.cc that retrieves the server global variable when it is needed.
2011-04-26 12:55:52 -05:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Vasil Dimov
99ed0123bd Merge mysql-5.5-innodb -> mysql-5.5 2011-04-21 08:34:21 +03:00
Marko Mäkelä
f76a32c2aa Clarify a comment. 2011-04-20 11:29:10 +03:00
Marko Mäkelä
35e8093006 Remove a debug printout that is no longer needed. 2011-04-20 10:10:54 +03:00
Mikael Ronström
8b8b0b2776 Merge 5.5, step 3 2011-04-15 15:58:30 +02:00
Mikael Ronström
70ed67e1cc Merge 5.5 2011-04-15 15:46:11 +02:00
Marko Mäkelä
69293a7831 Bug #12329920 ASSERT UT_ERROR IN SYNC_THREAD_LEVELS_NONEMPTY_TRX
SRV_CONC_FORCE_EXIT_INNODB

This is a bogus UNIV_SYNC_DEBUG assertion failure that I introduced
when introducing assertions for checking that InnoDB is not holding
any mutexes or rw-locks when returning control to MySQL.

srv_suspend_mysql_thread(): Release dict_operation_lock before
invoking srv_conc_force_exit_innodb(), which would now check that the
thread is not holding any mutexes or rw-locks.  After resuming, check
sync_thread_levels_nonempty_trx() and do srv_conc_force_enter_innodb()
before reacquiring the dict_operation_lock.

rb:646 approved by Sunny Bains
2011-04-12 09:22:43 +03:00
Marko Mäkelä
460a7197bb Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-04-11 17:03:32 +03:00
Marko Mäkelä
12fbe05c6a Bug #11760042 - 52409: Assertion failure: long semaphore wait
In ha_innobase::create(), we check some things while holding an
exclusive lock on the data dictionary. Defer the locking and the
creation of transactions until after the checks have passed. The
THDVAR could hang due to a mutex wait (see Bug #11750569 - 41163:
deadlock in mysqld: LOCK_global_system_variables and LOCK_open), and
we want to avoid waiting while holding InnoDB mutexes.

innobase_index_name_is_reserved(): Replace the parameter trx_t with
THD, so that the test can be performed before starting an InnoDB
transaction. We only needed trx->mysql_thd.

ha_innobase::create(): Create transaction and lock the data dictionary
only after passing the basic tests.

create_table_def(): Move the IS_MAGIC_TABLE_AND_USER_DENIED_ACCESS
check to ha_innobase::create(). Assign to srv_lower_case_table_names
while holding dict_sys->mutex.

ha_innobase::delete_table(), ha_innobase::rename_table(),
innobase_rename_table(): Assign srv_lower_case_table_names as late as
possible. Here, the variable is not necessarily protected by
dict_sys->mutex.

ha_innobase::add_index(): Invoke innobase_index_name_is_reserved() and
innobase_check_index_keys() before allocating anything.

rb:618 approved by Jimmy Yang
2011-04-11 16:40:28 +03:00
Vasil Dimov
3dc70ced6f Increment InnoDB version from 1.1.6 to 1.1.7
InnoDB 1.1.6 was released with MySQL 5.5.11
2011-04-08 10:23:46 +03:00
Marko Mäkelä
0ff2a182b6 Bug #11766513 - 59641: Prepared XA transaction in system after hard crash
causes future shutdown hang

InnoDB would hang on shutdown if any XA transactions exist in the
system in the PREPARED state. This has been masked by the fact that
MySQL would roll back any PREPARED transaction on shutdown, in the
spirit of Bug #12161 Xa recovery and client disconnection.

[mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as
a request to kill the server immediately without initiating a
shutdown procedure.

xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a
bogus error message on XA ROLLBACK of a recovered PREPARED transaction.

innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB
transaction object after rolling back a PREPARED transaction.

trx_get_trx_by_xid(): Only consider transactions whose
trx->is_prepared flag is set. The MySQL layer seems to prevent
attempts to roll back connected transactions that are in the PREPARED
state from another connection, but it is better to play it safe. The
is_prepared flag was introduced in the InnoDB Plugin.

trx_n_prepared: A new counter, counting the number of InnoDB
transactions in the PREPARED state.

logs_empty_and_mark_files_at_shutdown(): On shutdown, allow
trx_n_prepared transactions to exist in the system.

trx_undo_free_prepared(), trx_free_prepared(): New functions, to free
the memory objects of PREPARED transactions on shutdown. This is not
needed in the built-in InnoDB, because it would collect all allocated
memory on shutdown. The InnoDB Plugin needs this because of
innodb_use_sys_malloc.

trx_sys_close(): Invoke trx_free_prepared() on all remaining
transactions.
2011-04-07 21:12:54 +03:00
Sunanda Menon
50a1629f64 Merge from mysql-5.5.11-release 2011-04-07 08:59:07 +02:00
Marko Mäkelä
484b016fd1 Non-functional change: move a printout
from innobase_shutdown_for_mysql() to
logs_empty_and_mark_files_at_shutdown()
where the rest of the logic is located.
2011-04-06 10:34:49 +03:00
Marko Mäkelä
2b8312e50c Enable __attribute__((cold)) only for GCC 4.3 and later.
This attribute was introduced in bzr revision-id
marko.makela@oracle.com-20110405073758-b8y733yvkqum940i
and caused older GCC versions to emit warnings.
2011-04-06 09:22:36 +03:00
Marko Mäkelä
0edf090a9e Remove unused functions.
os_thread_get_curr(), os_thread_get_priority(), os_thread_set_priority(),
os_thread_get_last_error(): Remove.
2011-04-05 13:58:37 +03:00
Marko Mäkelä
67496884ae Bug 12323643 - CLEAN UP THE INNODB THREAD SHUTDOWN AND ASSERTIONS (WL#5136)
On shutdown, do not exit threads in os_event_wait(). This method of
exiting was only used by the I/O handler threads. Exit them on a
higher level.

os_event_wait_low(), os_event_wait_time_low(): Do not exit on shutdown.

os_thread_exit(), ut_dbg_assertion_failed(), ut_print_timestamp(): Add
attribute cold, so that GCC knows that these functions are rarely
invoked and can be optimized for size.

os_aio_linux_collect(): Return on shutdown.

os_aio_linux_handle(), os_aio_simulated_handle(), os_aio_windows_handle():
Set *message1 = *message2 = NULL and return TRUE on shutdown.

fil_aio_wait(): Return on shutdown.

logs_empty_and_mark_files_at_shutdown(): Even in very fast shutdown
(innodb_fast_shutdown=2), allow the background threads to exit, but
skip the flushing and log checkpointing.

innobase_shutdown_for_mysql(): Always wait for all the threads to exit.

rb:633 approved by Sunny Bains
2011-04-05 10:37:58 +03:00
Marko Mäkelä
6fe99e2dda Bug 12323643 - CLEAN UP THE INNODB THREAD SHUTDOWN AND ASSERTIONS (WL#5136)
Remove most references to thread id in InnoDB. Three references
remain: the current holder of a mutex, and the current x-lock holder
of a rw-lock, and some references in UNIV_SYNC_DEBUG checks. This
allows MySQL to change the thread associated to a client connection.

Tighten the UNIV_SYNC_DEBUG checks, trying to ensure that no InnoDB
mutex or x-lock is being held when returning control to MySQL. The
only semaphore that may be held is the btr_search_latch in shared mode.

sync_thread_levels_empty_except_dict(): A wrapper for
sync_thread_levels_empty_gen(TRUE).

sync_thread_levels_nonempty_trx(): Check that the current thread is
not holding any InnoDB semaphores, except btr_search_latch if
trx->has_search_latch.

sync_thread_levels_empty(): Unused function; remove.

trx_t: Remove mysql_thread_id and mysql_process_no.

srv_slot_t: Remove id and handle.

row_search_for_mysql(), srv_conc_enter_innodb(),
srv_conc_force_enter_innodb(), srv_conc_force_exit_innodb(),
srv_conc_exit_innodb(), srv_suspend_mysql_thread: Assert
!sync_thread_levels_nonempty_trx().

rb:634 approved by Sunny Bains
2011-04-05 10:18:43 +03:00
Vasil Dimov
7dcb8a0106 Merge mysql-5.5-innodb -> mysql-5.5 2011-04-04 09:12:11 +03:00
Marko Mäkelä
e2f148784f Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-03-30 14:52:26 +03:00
Marko Mäkelä
ddec6ecdd8 Bug#11877216 InnoDB too eager to commit suicide on a busy server
sync_array_print_long_waits(): Return the longest waiting thread ID
and the longest waited-for lock. Only if those remain unchanged
between calls in srv_error_monitor_thread(), increment
fatal_cnt. Otherwise, reset fatal_cnt.

Background: There is a built-in watchdog in InnoDB whose purpose is to
kill the server when some thread is stuck waiting for a mutex or
rw-lock. Before this fix, the logic was flawed.

The function sync_array_print_long_waits() returns TRUE if it finds a
lock wait that exceeds 10 minutes (srv_fatal_semaphore_wait_threshold).
The function srv_error_monitor_thread() will kill the server if this
happens 10 times in a row (fatal_cnt reaches 10), checked every 30
seconds. This is wrong, because this situation does not mean that the
server is hung. If the server is very busy for a little over 15
minutes, it will be killed.

Consider this example. Thread T1 is waiting for mutex M. Some time
later, threads T2..Tn start waiting for the same mutex M. If T1 keeps
waiting for 600 seconds, fatal_cnt will be incremented to 1. So far,
so good. Now, if M is granted to T1, the server was obviously not
stuck. But, T2..Tn keeps waiting, and their wait time will be longer
than 600 seconds. If 5 minutes later, some Tn has still been waiting
for more than 10 minutes for the mutex M, the server can be killed,
even though it is not stuck.

rb:622 approved by Jimmy Yang
2011-03-30 14:25:58 +03:00
Sergei Golubchik
8de6199b16 lp:743017 Diverging results with TIME(3) and ranges depending on the execution plan in 5.1-micro
rewrite get_innobase_type_from_mysql_type() to use types as reported
by the Field objects, instead of relying on ad-hoc assumptions.
2011-03-29 14:48:48 +02:00
Vasil Dimov
f2b0b245b4 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-03-28 12:05:02 +03:00
Marko Mäkelä
85dbe88d2f Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 4 of 4]
ibuf_inside(), ibuf_enter(), ibuf_exit(): Add the parameter mtr. The
flag is no longer kept in the thread-local storage but in the
mini-transaction (mtr->inside_ibuf).

mtr_start(): Clean up the comment and remove the unused return value.
mtr_commit(): Assert !ibuf_inside(mtr) in debug builds.

ibuf_mtr_start(): Like mtr_start(), but sets the flag.
ibuf_mtr_commit(), ibuf_btr_pcur_commit_specify_mtr(): Wrappers that
assert ibuf_inside().

buf_page_get_zip(), buf_page_init_for_read(),
buf_read_ibuf_merge_pages(), fil_io(), ibuf_free_excess_pages(),
ibuf_contract_ext(): Remove assertions on ibuf_inside(), because a
mini-transaction is not available.

buf_read_ahead_linear(): Add the parameter inside_ibuf.

ibuf_restore_pos(): When this function returns FALSE, it commits mtr
and must therefore do ibuf_exit(mtr).

ibuf_delete_rec(): This function commits mtr and must therefore do
ibuf_exit(mtr).

ibuf_rec_get_page_no(), ibuf_rec_get_space(), ibuf_rec_get_info(),
ibuf_rec_get_op_type(), ibuf_build_entry_from_ibuf_rec(),
ibuf_rec_get_volume(), ibuf_get_merge_page_nos(),
ibuf_get_volume_buffered_count(), ibuf_get_entry_counter_low(): Add
the parameter mtr in debug builds, for asserting ibuf_inside(mtr).

rb:585 approved by Sunny Bains
2011-03-24 14:00:14 +02:00
MySQL Build Team
97d7805005 Per Jon Olav, change needed for Bug#11784056 2011-03-22 16:52:03 +01:00
Sunanda Menon
24934b254c merge 2011-03-22 14:34:04 +01:00
Marko Mäkelä
a4d2a3a3b4 Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 3]
Remove the slot_no member of struct thr_local_struct.

enum srv_thread_type: Remove unused thread types.
srv_get_thread_type(): Unused function, remove.

thr_local_get_slot_no(), thr_local_set_slot_no(): Remove.

srv_thread_type_validate(), srv_slot_get_type(): New functions, for debugging.

srv_table_reserve_slot(): Return the srv_slot_t* directly. Do not create
thread-local storage.

srv_suspend_thread(): Get the srv_slot_t* as parameter. Return void;
the caller knows slot->event already.

srv_thread_has_reserved_slot(), srv_release_threads(): Assert
srv_thread_type_validate(type).

srv_init(): Use mem_zalloc() instead of mem_alloc(). Replace
srv_table_get_nth_slot(), because it now asserts that the kernel_mutex
is being held.

srv_master_thread(), srv_purge_thread(): Remember the slot from
srv_table_reserve_slot().

rb:629 approved by Inaam Rana
2011-03-22 13:39:16 +02:00
Marko Mäkelä
0cedc70904 Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 2]
Add some const qualifiers to accessor and validator functions.

btr_pcur_get_up_match(), btr_pcur_get_low_match(): Add const qualifiers.

btr_pcur_get_page(), btr_pcur_get_block(), btr_pcur_get_rec(),
rec_get_start(), rec_get_end(): Define as constness-preserving macros.
In debug builds, discard the const qualifier.

page_rec_validate(), page_simple_validate_old(), page_simple_validate_new(),
page_dir_slot_check(), page_validate(): Add const qualifiers.

rb:626 approved by Sunny Bains
2011-03-21 09:56:38 +02:00
Marko Mäkelä
0dc3b27245 Bug#11766305 - 59392: Remove thr0loc.c and ibuf_inside() [part 1]
Remove unused member mtr from btr_pcur_struct.

rb:624 approved by Sunny Bains
2011-03-21 09:27:58 +02:00
Marko Mäkelä
4308812281 Remove trailing white space. 2011-03-15 15:24:51 +02:00
Marko Mäkelä
83d4820682 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-03-15 12:26:53 +02:00
Jon Olav Hauglid
fc6ef378d4 Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARY
KEY NO 0 FOR TABLE IN ERROR LOG 

With the changes made by the patches for Bug#11751388 and
Bug#11784056, concurrent reads are allowed while secondary
indexes are created in InnoDB. This means that the metadata
lock on the affected table is not upgraded to exclusive
until the .FRM is updated at the end of ALTER TABLE processing.

The problem was that if this lock upgrade failed for some
reason (e.g. timeout), the index information in the server
and inside InnoDB would be out of sync. This would happen
since the add index operation already was committed inside 
InnoDB but the table metadata inside the server had not been
updated yet.

This patch fixes the problem by (for now) reverting the
effects of the patches for Bug#11751388 and Bug#11784056.
Concurrent reads will now again be blocked during creation
of secondary indexes in InnoDB.

Test case added to innodb_mysql_lock.test.
2011-03-09 16:06:13 +01:00
Michael Widenius
139a2b64bf Merge with 5.2 2011-03-09 15:47:59 +02:00
unknown
08f128f633 Bug#60196 / Bug#11831040
Setting lowercase_table_names to 2 on Windows causing Foreign Key problems

This problem was exposed by the fix for Bug#55222.  There was a codepath in dict0load.c,
dict_load_foreigns() that made sure the table name matched case sensitive in order to
load a referenced table into the dictionary as needed.  If an engine is rebooted which
accesses a table with foreign keys, and lower_case_table_names=2, then the table with
foreign keys will get an error when it is changed (insert/updated/delete).
Once the referenced tables are loaded into the dictionary cache by a select statement
on those tables, the same change would succeed because the affected code path would
not get followed.
2011-03-07 09:42:07 -06:00
Jon Olav Hauglid
5e32755e4c Bug #11784056 ENABLE CONCURRENT READS WHILE CREATING
NON-PRIMARY UNIQUE INDEX USING INNODB

This patch adds the HA_INPLACE_ADD_UNIQUE_INDEX_NO_WRITE
capability flag to InnoDB, indicating that concurrent reads
can be allowed while non-primary unique indexes are created.

This is an follow-up to Bug #11751388 which enabled concurrent
reads when creating non-primary non-unique indexes.

Test case added to innodb_mysql_sync.test.
2011-03-07 14:30:49 +01:00
Mikael Ronstrom
0fc7078e53 merge 2011-03-04 12:35:24 +01:00
Vasil Dimov
e84efcaf3f Merge mysql-5.5 -> mysql-5.5-innodb 2011-03-02 11:00:48 +02:00
Marko Mäkelä
a26c0f5cd5 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-02-28 15:39:07 +02:00
Vasil Dimov
8d8784e930 Use plugin_author also for the InnoDB SE plugin
Move the const variable plugin_author to a common header file that is
being included by both ha_innodb.cc and i_s.cc
2011-02-28 11:07:22 +02:00
Vasil Dimov
17621e724f Change InnoDB plugins author to Oracle Corporation 2011-02-28 11:02:24 +02:00
Vasil Dimov
e99019e570 Non-functional change: use plugin_author instead of hardcoded string.
plugin_author is currently defined as "Innobase Oy" so this change is
a no-op.
2011-02-28 10:39:48 +02:00
Jimmy Yang
618f4796f0 Include "ha_prototypes.h" to sync/sync0rw.c for innobase_basename(). 2011-02-25 03:21:02 -08:00
Vasil Dimov
91239f8129 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-02-25 11:52:47 +02:00
Jimmy Yang
56845ed3b4 Fix Bug #11765975 __FILE__ macros expanded to full path instead of relative
in CMake builds

rb://600 approved by Sunny Bains
2011-02-25 00:33:13 -08:00
Vasil Dimov
19372f1094 Merge mysql-5.5-innodb -> mysql-5.5 2011-02-23 19:33:41 +02:00
Sunny Bains
f91ce0413b Revert the max value of innodb_purge_batch_size to 5000. 2011-02-23 17:56:37 +11:00
Sunny Bains
e9678ae8e7 Add ut0bh.h and ut0bh.c. 2011-02-23 17:48:15 +11:00
Sunny Bains
c08a820d14 Remove ut0bh.h and ut0bh.c and re-add so that we can sync the file ids with
the trunk.
2011-02-23 17:44:11 +11:00
Sunny Bains
da66465afd Add ut0bh.ic. 2011-02-23 07:24:34 +11:00
Sunny Bains
cfcd6eadef Remove ut0bh.ic from 5.5 and then re-add so that the file ids are the same
in 5.5 and trunk. First we remove the file in the commit.
2011-02-23 07:14:49 +11:00
Sunny Bains
a5cd4872ba Add files that were missed in bug# 11798085 commit. 2011-02-22 20:17:02 +11:00
Sunny Bains
b3c9cc6f21 Bug #11766227: InnoDB purge lag much worse for 5.5.8 versus 5.1
Bug #11766501: Multiple RBS break the get rseg with mininum trx_t::no code during purge
      
Bug# 59291 changes:
      
Main problem is that truncating the UNDO log at the completion of every
trx_purge() call is expensive as the number of rollback segments is increased.
We truncate after a configurable amount of pages. The innodb_purge_batch_size
parameter is used to control when InnoDB does the actual truncate. The truncate
is done once after 128 (or TRX_SYS_N_RSEGS iterations). In other words we
truncate after purge 128 * innodb_purge_batch_size. The smaller the batch
size the quicker we truncate.
      
Introduce a new parameter that allows how many rollback segments to use for
storing REDO information. This is really step 1 in allowing complete control
to the user over rollback space management.
      
New parameters:
    i) innodb_rollback_segments = number of rollback_segments to use
       (default is now 128) dynamic parameter, can be changed anytime.
       Currently there is little benefit in changing it from the default.
      
Optimisations in the patch.
      
    i. Change the O(n) behaviour of trx_rseg_get_on_id() to O(log n)
       Backported from 5.6. Refactor some of the binary heap code.
       Create a new include/ut0bh.ic file.
      
    ii. Avoid truncating the rollback segments after every purge.
      
Related changes that were moved to a separate patch:
      
    i. Purge should not do any flushing, only wait for space to be free so that
       it only does purging of records unless it is held up by a long running
       transaction that is preventing it from progressing.
      
   ii. Give the purge thread preference over transactions when acquiring the
       rseg->mutex during commit. This to avoid purge blocking unnecessarily
       when getting the next rollback segment to purge.
      
Bug #11766501 changes:
      
Add the rseg to the min binary heap under the cover of the kernel mutex and
the binary heap mutex. This ensures the ordering of the min binary heap.
      
The two changes have to be committed together because they share the same
that fixes both issues.
      
rb://567 Approved by: Inaam Rana.
2011-02-22 16:04:08 +11:00
Michael Widenius
58bb0769bd Merge with MySQL 5.1.55
- Fixed some issues with partitions and connection_string, which also fixed lp:716890 "Pre- and post-recovery crash in Aria"
- Fixed wrong assert in Aria

Now need to merge with latest xtradb before pushing 

sql/ha_partition.cc:
  Ensure that m_ordered_rec_buffer is not freed before close.
sql/mysqld.cc:
  Changed to use opt_stack_trace instead of opt_pstack.
  Removed references to pstack
sql/partition_element.h:
  Ensure that connect_string is initialized
storage/maria/ma_key_recover.c:
  Fixed wrong assert
2011-02-20 18:51:43 +02:00
Vasil Dimov
0047afa3b2 Merge mysql-5.5-innodb -> mysql-5.5 2011-02-17 13:57:26 +02:00
Marko Mäkelä
18e7b61e64 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-02-15 11:29:56 +02:00
Jimmy Yang
57325925db Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-02-14 02:17:51 -08:00
Mikael Ronström
e3f89e5dba merge 2011-02-10 18:15:19 +01:00
Vasil Dimov
f887a28cb2 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-02-10 17:26:09 +02:00
Marko Mäkelä
79d7a9bb3f Bug #59877 Wrong buffer pool selected in buf_read_ibuf_merge_pages() 2011-02-10 14:07:58 +02:00
Vasil Dimov
f7bd0a33be Increment InnoDB version from 1.1.5 to 1.1.6
InnoDB 1.1.5 was released with MySQL 5.5.9
2011-02-10 13:25:12 +02:00
Jimmy Yang
321b238874 Merge a fix for Bug #53756 ALTER TABLE ADD PRIMARY KEY affects crash recovery
This was already pushed to mysql-5.1-innodb some time ago
(revision id jimmy.yang@oracle.com-20100907054137-tpuior7hez4f5ghl)
but it was not merged to the 5.5 trees.
2011-02-10 00:58:23 -08:00
Jimmy Yang
82d8ca01c8 Fix Bug #59048 truncate table or create index could leave index->page
to be FIL_NULL

rb://545 approved by Sunny Bains
2011-02-09 01:15:06 -08:00
Vasil Dimov
be01dbf587 Merge mysql-5.5-innodb -> mysql-5.5 2011-02-08 19:28:00 +02:00
Jonathan Perkin
f13788c9fd Merge from mysql-5.5.9-release 2011-02-08 14:59:03 +01:00
Marko Mäkelä
27fbb7c18c Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-02-08 13:39:24 +02:00
Inaam Rana
41ddf242e3 Bug #59472 increase AIO requests per IO thread limit to 256 from 32
rb://566
approved by: Sunny

When using native aio on linux each IO helper thread should be able to
handle upto 256 IO requests. The number 256 is the same which is used
for simulated aio as well. In case of windows where we also use native
aio this limit is 32 because of OS constraints. It seems that we are
using the limit of 32 for all the platforms where we are using native
aio. The fix is to use 256 on all platforms except windows (when native
aio is enabled on windows)
2011-02-07 18:43:00 -05:00
unknown
aff195eb5a Bug#59699 - Hidden bug would cause a crash for unknown tablespace flags.
The bug would cause a crash of InnoDB if a non-standard or unknown table
flags existed in a SYS_TABLES record. This is important because the next
file version, Cheetah, will identify itself by expanding this field.  So
unless this is fixed, an older engine that tries to open a table in a
tablespace with a newer file version will crash instead of report an error
and refuse to open the table, as it should do.

Reviewed at RB://583.    Approved by Marko.
2011-02-04 08:59:30 -06:00
Marko Mäkelä
ee486208cd Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-02-02 15:58:01 +02:00
Vasil Dimov
79887971e7 Replay a lost change (fix for Bug#56947 InnoDB leaks memory... in 5.5)
This change was originally done in
marko.makela@oracle.com-20101011085943-50pskvsbbsujbukg
but was later lost during the merge process.
2011-02-01 18:28:41 +02:00
Marko Mäkelä
35b5cdb88d Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-31 10:23:38 +02:00
Vasil Dimov
3bf88775f5 Merge mysql-5.5-innodb -> mysql-5.5 2011-01-30 18:51:37 +02:00
Jimmy Yang
b448b5d510 Fix Bug #59390 row_merge_build_indexes() fails to register tmpfd for PFS
rb://582 approved by Marko
2011-01-28 01:38:21 -08:00
Jimmy Yang
df13ee2eb6 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-28 01:10:40 -08:00
Jimmy Yang
71e8043bae Fix Bug #59465 btr_estimate_number_of_different_key_vals use incorrect offset
for external_size
      
rb://581 approved by Marko
2011-01-28 00:50:10 -08:00
Marko Mäkelä
438888dfeb Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-27 13:30:59 +02:00
Marko Mäkelä
786ac62c82 Bug#59440 Race condition in XA ROLLBACK and XA COMMIT after server restart
trx_get_trx_by_xid(): Invalidate trx->xid after a successful lookup,
so that subsequent callers will not find the same transaction.

The only callers of trx_get_trx_by_xid() will be invoking
innobase_commit_low() or innobase_rollback_trx(), and those code paths
should not depend on trx->xid.

rb://584 approved by Jimmy Yang
2011-01-27 13:27:29 +02:00
Marko Mäkelä
35aba604a0 ibuf_contract_ext(): Remove an #if 0 section of code
that refers to trx_sys_set_ibuf_format().
Change buffer format tagging was never implemented.
2011-01-27 10:12:00 +02:00
Jon Olav Hauglid
e99f2b1c4e Bug #42230 during add index, cannot do queries on storage engines
that implement add_index

The problem was that ALTER TABLE blocked reads on an InnoDB table
while adding a secondary index, even if this was not needed. It is
only needed for the final step where the .frm file is updated.

The reason queries were blocked, was that ALTER TABLE upgraded the
metadata lock from MDL_SHARED_NO_WRITE (which blocks writes) to
MDL_EXCLUSIVE (which blocks all accesses) before index creation.

The way the server handles index creation, is that storage engines
publish their capabilities to the server and the server determines
which of the following three ways this can be handled: 1) build a
new version of the table; 2) change the existing table but with
exclusive metadata lock; 3) change the existing table but without
metadata lock upgrade.

For InnoDB and secondary index creation, option 3) should have been
selected. However this failed for two reasons. First, InnoDB did
not publish this capability properly.

Second, the ALTER TABLE code failed to made proper use of the
information supplied by the storage engine. A variable
need_lock_for_indexes was set accordingly, but was not later used.
This patch fixes this problem by only doing metadata lock upgrade
before index creation/deletion if this variable has been set.

This patch also changes some of the related terminology used 
in the code. Specifically the use of "fast" and "online" with
respect to ALTER TABLE. "Fast" was used to indicate that an
ALTER TABLE operation could be done without involving a
temporary table. "Fast" has been renamed "in-place" to more
accurately describe the behavior.

"Online" meant that the operation could be done without taking
a table lock. However, in the current implementation writes
are always prohibited during ALTER TABLE and an exclusive
metadata lock is held while updating the .frm, so ALTER TABLE
is not completely online. This patch replaces "online" with 
"in-place", with additional comments indicating if concurrent
reads are allowed during index creation/deletion or not.

An important part of this update of terminology is renaming
of the handler flags used by handlers to indicate if index
creation/deletion can be done in-place and if concurrent reads
are allowed. For example, the HA_ONLINE_ADD_INDEX_NO_WRITES
flag has been renamed to HA_INPLACE_ADD_INDEX_NO_READ_WRITE,
while HA_ONLINE_ADD_INDEX is now HA_INPLACE_ADD_INDEX_NO_WRITE.
Note that this is a rename to clarify current behavior, the
flag values have not changed and no flags have been removed or
added.

Test case added to innodb_mysql_sync.test.
2011-01-26 14:23:29 +01:00
Marko Mäkelä
118f6a6327 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-26 10:02:52 +02:00
Sunny Bains
31790d7f6a In sync_close() fix a bug introduced by the fix for Bug #59683 where we iterate
over the mutex list and free each mutex. When UNIV_MEM_DEBUG is defined, we
need skip the hash mutex.

It is a minor bug affecting only UNIV_SYNC_DEBUG builds, found by Michael.
2011-01-26 09:33:59 +11:00
Marko Mäkelä
12a54ac5d7 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-25 12:35:35 +02:00
Marko Mäkelä
46b7ef6991 Bug#59464 Race condition in row_vers_build_for_semi_consistent_read
row_vers_build_for_semi_consistent_read(): Dereference version_trx before
releasing kernel_mutex, but not thereafter.
2011-01-25 11:54:50 +02:00
Marko Mäkelä
41375b0fa4 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-25 10:51:13 +02:00
Sunny Bains
7f7e934f23 Fix Bug #59683 :InnoDB latch deadlock detector/violation debug code is very slow
There are two main pain points, one is lookup by thread id for sync_thread_t
and the other is to do a lookup  by latch or level in sync_thread_t::levels.
Changed the sync_thread_t::levels lookup and reserve operation from O(N)
to O(1).

Pure lookups are still O(N), the main change for pure lookup is that we no
longer need to search up to SYNC_THREAD_N_LEVELS but only up to the number
of slots actually ever used ie. it is possible some were used in the past
but are now on the free list. If the in_use count drops to 0 we reset the
free list too.

Overload the sync_level_t::level field to track the free list. If
sync_thread_t::latch == NULL then sync_thread_t::level contains the ordinal
value of the previous free entry.

rb://580 Approved by Jimmy Yang.
2011-01-25 18:25:36 +11:00
Marko Mäkelä
ba5bc8a1ca Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-18 12:30:33 +02:00
Marko Mäkelä
359bddbee1 Bug#59579 rw_lock_debug_print outputs to stderr
rw_lock_debug_print(): Add parameter FILE* for specifying the output stream.
rw_lock_list_print_info(): Invoke rw_lock_debug_print() on file, not stderr.
2011-01-18 12:25:13 +02:00
Marko Mäkelä
3d1f298657 Merge from mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-17 14:11:43 +02:00
Marko Mäkelä
1f3975b4f8 Non-functional changes.
Remove the unused data type dict_cluster_t.
Remove a bogus comment about latching order.
2011-01-17 14:06:48 +02:00
Jimmy Yang
5a0138e250 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-14 23:24:47 -08:00
Jimmy Yang
9cd4d49840 Fix Bug#30423 "InnoDBs treatment of NULL in index stats causes bad
"rows examined" estimates". This change implements "innodb_stats_method"
with options of "nulls_equal", "nulls_unequal" and "null_ignored".
      
rb://553 approved by Marko
2011-01-14 09:02:28 -08:00
Mikael Ronstrom
fc12800c05 Removed dependency no longer correct 2011-01-12 14:44:25 +01:00
Mikael Ronstrom
773267552f merge 2011-01-12 14:43:03 +01:00
Mikael Ronstrom
7dae4282d4 BUG#59392, removed thread local storage use in MySQL Threads by storing ibuf_inside indicator in MTR object instead 2011-01-12 14:31:17 +01:00
Marko Mäkelä
16628750a9 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-01-10 15:37:55 +02:00
Georgi Kodinov
1ecfdbf2bc merge 2011-01-10 15:09:57 +02:00
Georgi Kodinov
0c0ef4dd68 automerge 2011-01-07 15:30:54 +02:00
Vasil Dimov
211c56c022 Fix InnoDB style after mikael@dator8-20101217205840-i7ltx8m6z3uc42kh 2011-01-07 13:54:07 +02:00
Vasil Dimov
a44cf8a6dd Merge mysql-5.5 -> mysql-5.5-innodb 2011-01-07 13:49:06 +02:00
Jimmy Yang
3bdaf40569 Merge from mysql-5.1-security to mysql-5.5-security 2011-01-07 00:00:36 -08:00
Jimmy Yang
5f8139430a merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-06 19:50:49 -08:00
Sunny Bains
ae6e2a23b2 Fix Bug #58653 - Sporadic crash due to assertion failure 0 == space->n_pending_flushes
Check whether the master and purge thread are active after creating them. Do
not proceed until both threads have started. We do this by checking whether a
slot has been reserved by both the respective threads.
      
Add srv_thread_has_reserved_slot() returns slot no or ULINT_UNDEFINED.
      
rb://536 Approved by Jimmy
2011-01-06 21:41:30 +11:00
Vasil Dimov
a775ea08c8 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-01-06 09:19:02 +02:00
Vasil Dimov
15273e4310 (Builtin InnoDB) Fix Bug#59303 Correct URL in crash message
old URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
new URL: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html

Notice that there is a redirect from the old URL to the new URL, so visiting
the old URL does not give "page not found" error.
2011-01-06 09:05:45 +02:00
Jimmy Yang
000bdda32b merge from mysql-5.1-innodb to mysql-5.5-innodb 2011-01-05 05:47:15 -08:00
Jimmy Yang
fe8fbaaddb Fix Bug #59197 double quote in field comment prevents foreign key
constraint creation

rb://557 Approved by Sunny Bains
2011-01-04 22:44:12 -08:00
Jimmy Yang
c143ff4848 Fix Bug #59157 valgrind conditional jump warning from dict_load_foreign.
This is 5.1 built-in specific as the dict_table_t strcture is allocated
with mem_heap_zalloc since 5.1 plugin.

Approved by Sunny Bains
2011-01-04 22:31:46 -08:00
Mikael Ronstrom
6e7752d557 merge 2011-01-04 18:46:01 +01:00
Vasil Dimov
909d7c299c PS-instrument the array of latches (rw locks) dict_table_stats_latches[].
This adds 64 new rows to performance_schema.rwlock_instances.

This patch will make perfschema.binlog_mix perfschema.binlog_row tests fail,
but they will be fixed by http://lists.mysql.com/commits/127862

Approved by:	Jimmy (rb://554)
2011-01-04 11:46:20 +02:00
Calvin Sun
4b223f2af3 Fix a build error on Windows, introduced by revision-id:
marko.makela@oracle.com-20101221112722-1yxxzzgqtem8bcm7

The fix was suggested by Jimmy.
2010-12-27 23:01:39 -06:00
Marko Mäkelä
c9951393a8 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2010-12-21 14:05:10 +02:00
Mikael Ronstrom
247ecb7597 BUG#59013, make partition handler not miss HA_STATUS_NO_LOCK, add HA_STATUS_VARIABLE_EXTRA to remove InnoDB bottleneck 2010-12-17 21:58:40 +01:00
Georgi Kodinov
e7a4a438b5 merge 2010-12-17 15:10:40 +02:00
Vasil Dimov
919f3f8992 Increment InnoDB version from 1.1.4 to 1.1.5
InnoDB 1.1.4 was released with MySQL 5.5.8
2010-12-16 09:53:07 +02:00
Igor Babaev
7f52af655a Merge. 2010-12-10 23:23:34 -08:00
unknown
5f80beebd0 55222 - Previous patch had a bug in unused code which was reactivated in
mysql-trunk-innodb in rev revno: 3367  Tue 2010-12-07 02:25:25-0800.
The crash happens only when lower_case_table_names=2, such as on MacOS,
when running the new testcase innodb-system-table-view.  Specifically,
it crashes when any query is made against the INFORMATION_SCHEMA.
INNODB_SYS_FOREIGN table.  The function dict_process_sys_foreign_rec()
is only used for displaying SYS_FOREIGN records so it does not need a
lookup version of those names to be allocated. In this patch, those new
function calls are deleted.
2010-12-09 10:42:35 -06:00
Jimmy Yang
5a594244c2 Merge from mysql-5.1-innodb to mysql-5.5-innodb. 2010-12-09 01:32:53 -08:00
Jimmy Yang
9838f48476 Fix Bug #58643 InnoDB: too long table name
rb://531 approved by Sunny Bains
2010-12-05 18:42:23 -08:00
Vasil Dimov
efcaa1ef7f Cherry pick vasil.dimov@oracle.com-20101201140708-fsc5xlu9bkpov6pv
from mysql-trunk-innodb. The same problem also exists in 5.5.

  X revision-id: vasil.dimov@oracle.com-20101201140708-fsc5xlu9bkpov6pv
  X committer: Vasil Dimov <vasil.dimov@oracle.com>
  X branch nick: mysql-trunk-innodb
  X timestamp: Wed 2010-12-01 16:07:08 +0200
  X message:
  X   Fix Bug#58432 innodb.innodb_bug56143 fails under valgrind
  X   
  X   Use a longer timeout for semaphore waits if (possibly) running under
  X   Valgrind.
  X   
  X   Approved by:	Marko (via IRC)
2010-12-03 09:35:53 +02:00
Vasil Dimov
8903bae21a Define MYSQL_(MAJOR|MINOR)_VERSION the way things are defined in CMake
instead of hacking a custom ADD_DEFINITIONS().

Approved by:	Kent Boortz (via IRC)
2010-12-02 12:04:10 +02:00
Marko Mäkelä
60fd9a180c Merge from mysql-5.5-innodb to local. 2010-12-02 10:55:27 +02:00
Vasil Dimov
691bf28a56 Use "rep; nop" in InnoDB if it is available and "pause" is not 2010-12-02 10:36:45 +02:00
Marko Mäkelä
789425e0b4 Fix UNIV_MEM_DEBUG compilation failure caused by Bug#58226 fix.
To fix Bug#58226 (speed up UNIV_DEBUG), among other things we no longer
disable the inlining of the functions that are defined in InnoDB .ic files.
Inside UNIV_MEM_DEBUG, there was an implicit type conversion from void*
that is all right in C, but not in C++. Now that inlining was enabled,
the C++ compiler would see the code and complain.

Approved by Jimmy Yang on IRC.
2010-12-02 10:32:27 +02:00
Marko Mäkelä
9bfb5ece4b Bug#58212 Possible deadlock in change buffer in debug builds
ibuf_page(): Renamed to ibuf_page_low(). Add the parameters file, line
so that the latch diagnostics will be more meaningful.
In debug builds, add the parameter ibool x_latch. When x_latch=FALSE,
do not x-latch the page, but only buffer-fix it for reading the bit.
In UNIV_SYNC_DEBUG, display a message if an insert buffer bitmap page
was already latched. (The message should be displayed in those cases
where the code would have previously failed.)

ibuf_page(): A wrapper macro for ibuf_page_low(). Pass x_latch=TRUE.

ibuf_bitmap_page_get_bits(): Renamed to ibuf_bitmap_page_get_bits_low().
In UNIV_DEBUG, add the parameter latch_mode.
Remove the parameter mtr unless UNIV_DEBUG is defined.

ibuf_bitmap_page_get_bits(): A wrapper macro for
ibuf_bitmap_page_get_bits_low(). Pass latch_type=MTR_MEMO_PAGE_X_FIX.

buf_page_get_gen(): Use ibuf_page_low(x_latch=FALSE) in the debug assertion.
This avoids the possible deadlock.
2010-12-01 15:09:02 +02:00
Marko Mäkelä
d6bac7db8e Bug#58226 Some InnoDB debug checks consume too much CPU time
Do not disable InnoDB inlining when UNIV_DEBUG is defined. The
inlining is now solely controlled by the preprocessor symbol
UNIV_MUST_NOT_INLINE and by any compiler options.

mtr_memo_contains(): Add an explicit type conversion from void*, so
that the function can be compiled by a C++ compiler. Previously, this
function was never seen by the C++ compiler, because it is only
present in UNIV_DEBUG builds and InnoDB inlining used to be disabled.

buf_flush_validate_skip(): A wrapper that skips most calls of
buf_flush_validate_low(). Invoked by debug assertions in
buf_flush_insert_into_flush_list() and buf_flush_remove().

fil_validate_skip(): A wrapper that skips most calls of
fil_validate(). Invoked by debug assertions in fil_io() and fil_io_wait().

os_aio_validate_skip(): A wrapper that skips most calls of
os_aio_validate(). Invoked by debug assertions in
os_aio_func(), os_aio_windows_handle() and os_aio_simulated_handle.

os_get_os_version(): Only include this function if __WIN__ is defined.

sync_array_deadlock_step(): Slight optimizations. This function is a
major CPU consumer in UNIV_SYNC_DEBUG builds.
2010-12-01 10:43:33 +02:00
Marko Mäkelä
2a4aca3e68 Fix a compilation error that was introduced in the Bug #55222 fix
(bzr revision id kevin.lewis@oracle.com-20101130182552-hfydggaeeys3tjqx).
2010-12-01 10:36:54 +02:00
Marko Mäkelä
b92f2d29c3 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2010-12-01 10:09:32 +02:00
unknown
6d1760be87 Fix compiler warning for Bug#55222 patch. 2010-11-30 20:13:02 -06:00
unknown
2dde698e0e Bug#55222 - RB://517 - Approved by Sunny
InnoDB does not attempt to handle lower_case_table_names == 2 when looking
up foreign table names and referenced table name.  It turned that server
variable into a boolean and ignored the possibility of it being '2'.  

The setting lower_case_table_names == 2 means that it should be stored and
displayed in mixed case as given, but compared internally in lower case.
Normally the server deals with this since it stores table names.  But
InnoDB stores referential constraints for the server, so it needs to keep
track of both lower case and given names.

This solution creates two table name pointers for each foreign and referenced
table name.  One to display the name, and one to look it up.  Both pointers
point to the same allocated string unless this setting is 2.  So the overhead
added is not too much.

Two functions are created in dict0mem.c to populate the ..._lookup versions
of these pointers.  Both dict_mem_foreign_table_name_lookup_set() and
dict_mem_referenced_table_name_lookup_set() are called 5 times each.
2010-11-30 12:25:52 -06:00
unknown
4018c39361 RB://518 approved by Jimmy Yang and Sunny bains
Code cleanup after changes for Bug 56628.  The general approach for 
InnoDB is to make a reference to each enum value whenever it is used in a
switch statement.  In addition, no default case should be used for switch 
statements on enum types.  This assures that if there is ever any change 
in the enum values, the switch will need to change to reflect it since a 
compiler warning will occur.  In this case, the enum row_type is declared 
in handler.h and could be changed for another storage engine.  If so, a 
warning will occur in the InnoDB build.  

Other changes;
* This patch uses 2 macros to help consolidate warning messages that
   need to occur twice in the single switch for row_format.
* Using row_format as the variable name to distinguish it from the enum
  type.
* Function declaration format correction.
2010-11-30 10:06:11 -06:00
Sunny Bains
cb0f8ca451 Merge from mysql-5.1-security to mysql-5.5-security. 2010-11-30 21:44:06 +11:00
Sunny Bains
6d445ad854 Fix Bug# 58459 - assert slot->in_use == FALSE while starting purge thread.
Fix a race condition in srv_master_thread(). We need to acquire the kernel
mutex before calling srv_table_reserve_slot(). Add a mutex_own() assertion
in srv_table_reserve_slot().
2010-11-30 16:51:40 +11:00
Vasil Dimov
0a96975a30 Make output from innobase_start_or_create_for_mysql() consistent
Prefix all printed lines with a timestamp and write one space between
the timestamp and "InnoDB:".
2010-11-29 14:53:09 +02:00
Vasil Dimov
715cf98005 Fix pointers to documentation
Do not print pointer to the 5.1 documentation from within MySQL 5.5.

Instead of hardcoding the MySQL version, use the MAJOR_VERSION and
MINOR_VERSION CMake variables defined at top-level.
2010-11-29 14:50:26 +02:00
Michael Widenius
e68ff46653 Fixed compiler and gmake warnings
- Removed SCCS rule from Makefile.am
- Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
Don't use maintainer mode with valgrind (as we don't want to initialize all variables)

config/ac-macros/maintainer.m4:
  Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
  Force initialization of variables when using -Werror (To get rid of compiler warnings)
configure.in:
  Don't use maintainer mode with valgrind (as we don't want to initialize all variables)
sql/sql_yacc.yy:
  Made dummy rule in sql_yacc.yy to get rid of compiler warning about not used label.
2010-11-29 11:27:52 +02:00
Vasil Dimov
9939a12445 Merge mysql-5.5-bugteam -> mysql-5.5-innodb 2010-11-29 09:08:23 +02:00
Jimmy Yang
15f8dc7ad7 Fix Bug #58461 InnoDB should show aggregated result for multiple
buffer pool instance.

rb://526 approved by Sunny Bains
2010-11-28 17:43:55 -08:00
Georgi Kodinov
db8bd7beb8 merge 2010-11-26 14:51:48 +02:00
Vasil Dimov
e2e20a04df Fix the PAUSE instruction handling in InnoDB
Previously HAVE_IB_PAUSE_INSTRUCTION was never defined and thus InnoDB
never used the PAUSE instruction on non-windows even if it was available.
Probably the check was never migrated from autotools'
storage/innobase/plug.in to storage/innobase/CMakeLists.txt.

Since the check for PAUSE is done at top-level configure.cmake we can
use the result from there (HAVE_PAUSE_INSTRUCTION) instead of rolling
InnoDB's own HAVE_IB_PAUSE_INSTRUCTION (the check is identical anyway).
2010-11-26 10:54:12 +02:00
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Michael Widenius
1a6373e8e2 Merge with MySQL 5.1.53
Open issues:
- A better fix for #57688; Igor is working on this
- Test failure in index_merge_innodb.test ; Igor promised to look at this
- Some Innodb tests fails (need to merge with latest xtradb) ; Kristian promised to look at this.
 - Failing tests: innodb_plugin.innodb_bug56143 innodb_plugin.innodb_bug56632 innodb_plugin.innodb_bug56680 innodb_plugin.innodb_bug57255 
- Werror is disabled;  Should be enabled after merge with xtradb.
2010-11-25 00:57:34 +02:00
Sunny Bains
bf566742fa Merge from mysql-5.1-innodb to mysql-5.5-innodb. Test was adjusted. 2010-11-24 14:36:00 +11:00
Michael Widenius
b52020221e Merge with MySQL 5.1.52 2010-11-23 23:39:59 +02:00
Vasil Dimov
d5787a3c59 Fix Bug#57739 Scary messages in error log
Silence a warning about old table name when InnoDB tests whether the
format has changed using a nonexistent table name.

Reviewed by:	bar@mysql.com, marko.makela@oracle.com
2010-11-22 16:08:51 +02:00
Ramil Kalimullin
bd557f04f6 Manual merge from mysql-5.5-bugteam. 2010-11-22 14:47:28 +03:00
Ramil Kalimullin
65116d3408 Manual-merge from mysql-5.1-bugteam. 2010-11-22 12:21:10 +03:00
Davi Arnaut
8664de2230 WL#5665: Removal of the autotools-based build system
The autotools-based build system has been superseded and
is being removed in order to ease the maintenance burden on
developers tweaking and maintaining the build system.

In order to support tools that need to extract the server
version, a new file that (only) contains the server version,
called VERSION, is introduced. The file contents are human
and machine-readable. The format is:

MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=5
MYSQL_VERSION_PATCH=8
MYSQL_VERSION_EXTRA=-rc

The CMake based version extraction in cmake/mysql_version.cmake
is changed to extract the version from this file. The configure
to CMake wrapper is retained for backwards compatibility and to
support the BUILD/ scripts. Also, a new a makefile target
show-dist-name that prints the server version is introduced.

VERSION:
  Add top-level version file.
cmake/mysql_version.cmake:
  Get version information from the top-level VERSION file.
  Do not cache the version components (MAJOR_VERSION, etc).
  Add MYSQL_RPM_VERSION as a replacement for MYSQL_U_SCORE_VERSION.
2010-11-20 12:47:50 -02:00
Vasil Dimov
654f0e9603 Fix Bug#58279 Incorrect enabling of UNIV_DEBUG in debug builds
Checking "IF(WITH_DEBUG)" does not work for multi-configuration CMake
generators like VS or XCode. See
http://forge.mysql.com/wiki/CMake#Debug-only_options
2010-11-19 15:45:18 +02:00
Ramil Kalimullin
3bae49d64c Manual-merge from 5.5-bugfixing. 2010-11-18 15:01:50 +03:00
unknown
0de9a4abab MWL#74: Shared libmysqld.so library.
Switch makefiles to use libtool to build libmysqld.so, as well as all its
dependencies.

The previous MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() declaration is removed,
as it does not work well with a libtool build. Instead, plugins that need it
can specify an alternate object in MYSQL_PLUGIN_STATIC() that will be used for
embedded library. The plugin must then take care itself of compiling the
special object for embedded, rebuilding the source files previously listed in
MYSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS() with @plugin_embedded_defs@ in
CFLAGS/CXXFLAGS. The extra target @XXX_embedded_static_target@ is available
for the special object, this will be empty when --without-embedded-server.

All in-tree plugins are changed to build their static targets with libtool.
Additional plugins that want to work with libmysqld.so will need to be
similarly modified to build with libtool (or otherwise provide an -fPIC
object). Dynamically loaded plugins are not affected.

The old libraries like libmysys.a, libmyisam.a and similar libraries, which
were installed by `make install` though this is of little use, are still built
and installed to not break package scripts etc. that expect them. These
libraries are kept static to avoid introducing new .so dependencies.

The patch also fixes a handfull of duplicate symbol linker errors, where we
included some object twice during linking; these for one reason or another did
not produce errors before but caused problems on some platforms with this
patch (eg. Mac OS X linker is more strict for shared objects).

This patch only does what is necessary to build libmysqld.so. There are some
more cleanups that are possible now that we are using libtool more fully,
which could done in subsequent patches (though we may not bother as we are
switching from autotools to CMake anyway):

 - In libmysql_r/, we should be able to just link libmysys.la etc, instead of
   symlinking and re-compiling sources into the directory.

 - In libmysql/, we can similarly avoid symlinking and recompiling sources if
   we instead build a libmysys_nothread.la library with appropriate CFLAGS and
   link that.

 - In sql/, we can build a separate target libmysql_int.la with appropriate
   CFLAGS for embedded and use that in libmysqld/ instead of symlinking
   sources.

 - libmysys.a, libmyisam.a and similar libraries could be installed as .so
   also to save on code size; or alternatively could be not installed at all.


client/Makefile.am:
  Updated for using libtool
config/ac-macros/plugins.m4:
  Replace MUSQL_PLUGIN_DEPENDS_ON_MYSQL_INTERNALS with mechanism for plugins
  to specify alternate object for embedded.
configure.in:
  Fix linking duplicate objects related to THREAD_LOBJECTS.
dbug/Makefile.am:
  Updated for using libtool
extra/Makefile.am:
  Fix relative paths.
libmysqld/Makefile.am:
  Build libmysqld.la using libtool
libmysqld/examples/Makefile.am:
  Updated to use libtool
mysys/Makefile.am:
  Updated to use libtool.
  Fix linking duplicate objects related to THREAD_LOBJECTS.
mysys/my_uuid.c:
  Fix conflicting global mutex name by making it static.
regex/Makefile.am:
  Updated to use libtool
sql/Makefile.am:
  Updated to use libtool
sql/item_func.cc:
  Fix conflicting mutex name.
sql/mysql_priv.h:
  Fix conflicting mutex name
sql/mysqld.cc:
  Fix conflicting mutex name.
  Add missing call of my_uuid_end().
storage/archive/Makefile.am:
  Updated to use libtool
storage/archive/plug.in:
  Updated to use libtool
storage/blackhole/Makefile.am:
  Updated to use libtool
storage/blackhole/plug.in:
  Updated to use libtool
storage/csv/Makefile.am:
  Updated to use libtool
storage/csv/plug.in:
  Updated to use libtool
storage/example/Makefile.am:
  Updated to use libtool
storage/federated/Makefile.am:
  Updated to use libtool
storage/federated/plug.in:
  Updated to use libtool
storage/federatedx/Makefile.am:
  Updated to use libtool
storage/federatedx/plug.in:
  Updated to use libtool
storage/heap/Makefile.am:
  Updated to use libtool
storage/heap/plug.in:
  Updated to use libtool
storage/innobase/Makefile.am:
  Updated to use libtool
storage/innobase/plug.in.disabled:
  Updated to use libtool
storage/innodb_plugin/Makefile.am:
  Updated to use libtool
storage/maria/CMakeLists.txt:
  Fix linking duplicate object in maria_dump_log, causes failure on Mac OS X
storage/maria/Makefile.am:
  Updated to use libtool
  Fix linking duplicate object in maria_dump_log, causes link failure on Mac OS X
storage/maria/ma_loghandler.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/ma_loghandler.h:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/maria_dump_log.c:
  Move maria_dump_log code to separate file to fix duplicate object link failures.
storage/maria/plug.in:
  Updated to use libtool
storage/myisam/Makefile.am:
  Updated to use libtool
storage/myisam/plug.in:
  Updated to use libtool
storage/myisammrg/Makefile.am:
  Updated to use libtool
storage/myisammrg/plug.in:
  Updated to use libtool
storage/pbxt/plug.in:
  Updated to use libtool
storage/pbxt/src/Makefile.am:
  Updated to use libtool
storage/xtradb/Makefile.am:
  Updated to use libtool
storage/xtradb/plug.in:
  Updated to use libtool
strings/Makefile.am:
  Updated to use libtool
unittest/unit.pl:
  Don't attempt to run libtool internal files as unit tests.
vio/Makefile.am:
  Updated to use libtool
2010-11-17 13:24:20 +01:00
Jimmy Yang
f64026427e Fix Bug #16290 Unclear error message when adding foreign key constraint
rb://502 approved by Sunny Bains
2010-11-14 23:08:04 -08:00
Marko Mäkelä
a8266151de Merge mysql-5.1-innodb to mysql-5.5-innodb. 2010-11-11 15:13:52 +02:00
Vasil Dimov
631b5ef05e Merge mysql-5.1-innodb -> mysql-5.5-innodb 2010-11-11 13:25:35 +02:00
Marko Mäkelä
7eff0335e7 Merge mysql-5.1-innodb to mysql-5.5-innodb. 2010-11-11 12:22:27 +02:00
Vasil Dimov
b49e1573b8 Increment InnoDB version from 1.1.3 to 1.1.4
InnoDB 1.1.3 was released with MySQL 5.5.7-rc
2010-11-11 08:50:41 +02:00
Jimmy Yang
a47989da36 Merge from mysql-5.1-innodb to mysql-5.5-innodb 2010-11-10 21:51:00 -08:00
Jimmy Yang
7ade161589 Port fix for Bug #48026 to 5.1 built-in and plugin: Log start and end
of InnoDB buffer pool initialization to the error log
2010-11-10 21:27:10 -08:00
Vasil Dimov
5bd300084b Merge mysql-5.5-innodb from bk-internal into my local repo 2010-11-10 10:52:45 +02:00
Vasil Dimov
cf3433d7f3 Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-11-08 16:46:26 +02:00
Vasil Dimov
97b501badc Merge mysql-5.5-bugteam -> mysql-5.5-innodb 2010-11-08 16:44:59 +02:00
Sergei Golubchik
bc2e383e4a mysql-5.1 -> mysql-5.5 merge 2010-11-05 10:59:51 +01:00
unknown
adc189aece Bug57960 - In ha_innodb.cc, get_foreign_key_info() make sure the
referenced_table name uses the actual length of the table name.
2010-11-04 10:18:05 -05:00
Marko Mäkelä
a32c56cefe Merge mysql-5.1-innodb to mysql-5.5-innodb. 2010-11-04 15:20:28 +02:00
Georgi Kodinov
7b2e07232a merge 2010-11-03 16:09:17 +02:00