Commit graph

2043 commits

Author SHA1 Message Date
marko
6d13c42c92 branches/zip: Copy tests from branches/5.1 that were lost in some merge. 2010-03-10 11:56:41 +00:00
marko
63b198756d branches/zip: Add ChangeLog entries for r6789, r6790. 2010-03-10 11:39:06 +00:00
jyang
191261da18 branches/zip: Fix bug #51356: "many valgrind errors in error messages
with concurrent ddl". Null terminate the name string returned
from innobase_convert_identifier() call when reporting DB_DUPLICATE_KEY
error in create_table_def().
rb://266 approved by Marko
2010-03-10 11:09:41 +00:00
jyang
16b41a586d branches/zip: If a unique index is on a column prefix, such
unique index cannot be upgrade to primary index even if there
is no primary index already defined. Also fix possible corruption
when initialize "ref_length" value in case there is a mismatch
between MySQL and InnoDB primary key. Fix bug #51378: "Init
'ref_length'  to correct value, in case an out of bound MySQL
primary_key".
rb://262 approved by Marko.
2010-03-10 09:18:18 +00:00
marko
6c7ddbe2ed branches/zip: recv_parse_log_rec(): Remove a bogus assertion about page_no.
TODO: We might also consider removing recv_max_parsed_page_no, because
it does not make much sense with *.ibd files.

recv_report_corrupt_log(), recv_scan_log_recs(): Abort when a
corrupted log record has been found, unless innodb_force_recovery has
been set.

This fixes Issue #464.
rb://265 approved by Heikki Tuuri
2010-03-10 08:35:06 +00:00
vasil
48cf851d1e branches/zip:
Fix typo in comment
2010-03-10 07:16:50 +00:00
marko
0a044cbc5c branches/zip: fil0fil.c: Update comments on table->flags as of r6252. 2010-03-09 12:09:26 +00:00
marko
e391bf3847 branches/zip: Make SHOW ENGINE INNODB MUTEX display SUM(os_waits)
for block mutexes and blocks.

Designed by Michael and Marko. rb://188, Issue #358
2010-03-09 07:41:08 +00:00
marko
369570f66d branches/zip: Fix IMPORT TABLESPACE of compressed tables. Previously,
a wrong parameter was passed to buf_flush_init_for_writing().

fil_reset_too_high_lsns(): Set up page_zip and use it if needed.

rb://264, Issue #352
2010-03-08 12:35:42 +00:00
marko
339f752ec7 branches/zip: trx_undo_update_rec_get_update(): Silence a bogus GCC warning
about a possibly uninitialized variable.
2010-03-04 11:01:25 +00:00
marko
25939e31ef branches/zip: row_raw_format(): Silence a GCC 4.4.2 warning
of possibly uninitialized variable format_in_hex.
2010-03-03 13:31:54 +00:00
marko
9ea180a1c9 Document r6770. 2010-03-03 12:52:43 +00:00
marko
9319ba1ea5 branches/zip: Disallow duplicate index name when creating an index.
This should fix Mantis Issue #461.

innodb.test, innodb.result, innodb-index.test, innodb-index.result:
Adjust the test result and mention that the introduced restriction
has been reported as MySQL Bug #51451.

innobase_check_index_keys(): Add a parameter for the InnoDB table and
check that no duplicate index name is added.  Report errors by
my_error() instead of sql_print_error().

rb://260 approved by Sunny Bains
2010-03-03 10:52:55 +00:00
vasil
0ad5bf27f4 branches/zip:
Add a NOTE to the comment of btr_node_ptr_get_child_page_no()
to prevent mysterious bugs.
2010-03-02 16:20:48 +00:00
calvin
a7a8a8248f branches/zip: fix bug#51587
Non-functional change.
2010-03-01 16:16:10 +00:00
marko
90b496f687 branches/zip: Allocate the merge sort buffers from a heap, not stack.
The merge sort can use up to 48KiB of buffers when merging blocks.
That can cause a stack overflow, especially on 64-bit systems when not
building with inlined functions.  This was reported as Issue #462.

row_merge_dup_report(): Allocate buf and offsets from a heap.

row_merge_heap_create(): Allocate space for buf[3] too. Fix bogus
sizeof arithmetics that happened to work, because
sizeof(ulint)==sizeof(void*).

row_merge_blocks(), row_merge_blocks_copy(): Allocate buf[3] from heap.

row_merge_insert_index_tuples(): Allocate buf from graph_heap.

rb://258 approved and tested by Sunny Bains
2010-02-24 08:56:43 +00:00
marko
3075b9a0e9 branches/zip: row_fetch_store_uint4(): Remove unused function.
This was added to trunk in r435.
2010-02-22 06:57:23 +00:00
vasil
6c3ab906d5 Non-functional change: update copyright year to 2010 of the files
that have been modified after 2010-01-01 according to svn.

for f in $(svn log -v -r{2010-01-01}:HEAD |grep "^   M " |cut -b 16- |sort -u) ; do sed -i "" -E 's/(Copyright \(c\) [0-9]{4},) [0-9]{4}, (.*Innobase Oy.+All Rights Reserved)/\1 2010, \2/' $f ; done
2010-02-20 16:45:41 +00:00
sunny
817d93a914 branches/zip: Don't print the entire lock bit set if the block was not
found in the buffer pool. Only print the bits that are set and that
information is in the lock and not in the block.

See rb://256 approved by Marko.
2010-02-18 11:44:31 +00:00
marko
f91d322e9f branches/zip: Remove UNIV_BASIC_LOG_DEBUG.
This fixes the FILE_FLUSH_LSN printouts mentioned in Issue #341.
Suggested by Heikki.
2010-02-17 16:54:04 +00:00
marko
ccc115b678 branches/zip: fsp_init_file_page_low(): Declare the page uninitialized
for Valgrind.
2010-02-17 16:50:20 +00:00
marko
ec86092131 branches/zip: FIL_PAGE_FILE_FLUSH_LSN: Note that the field is only valid
for the first page of each ibdata* file, not *.ibd files.
Suggested by Heikki, in connection with the LSN warning noted in Issue #341.
2010-02-17 16:49:21 +00:00
marko
0c064c3f03 branches/zip: Merge revisions 6613:6669 from branches/5.1:
------------------------------------------------------------------------
  r6669 | jyang | 2010-02-11 12:24:19 +0200 (Thu, 11 Feb 2010) | 7 lines

  branches/5.1: Fix bug #50691, AIX implementation of readdir_r
  causes InnoDB errors. readdir_r() returns an non-NULL value
  in the case of reaching the end of a directory. It should
  not be treated as an error return.

  rb://238 approved by Marko
  ------------------------------------------------------------------------
2010-02-17 13:52:05 +00:00
marko
d8840f931a branches/zip: lock_table_other_has_incompatible():
Return an incompatible lock or NULL instead of TRUE or FALSE.
Approved by Sunny over IM.
2010-02-17 09:48:34 +00:00
marko
80ac9f4e4e branches/zip: Fix a comment. 2010-02-16 13:06:16 +00:00
marko
b045a484e8 branches/zip: log_reserve_and_write_fast(): Correct a race condition
in UNIV_LOG_LSN_DEBUG.  This could have caused Issue #440.
2010-02-16 12:53:20 +00:00
sunny
9f00612b52 branches/zip: Fix comment. Non functional change. 2010-02-16 08:14:21 +00:00
sunny
78cb095469 branches/zip: Update the comments and fix the whitespace issues.
See rb://255 Approved by: Marko
2010-02-16 08:12:25 +00:00
sunny
c566c92301 branches/zip: Change the bit fields back to ulint. Bit fields were causing
problems with concurrency on SMP systems because of word packing issues.
The number of trx_t's in a system is not sufficient enough to require that
we try and save a few bytes in the data structure.

See rb://255 for details.
2010-02-16 08:12:17 +00:00
marko
644e7188ae branches/zip: trx_lists_init_at_db_start(): Assert that the kernel_mutex
is held by the caller.
2010-02-16 08:05:36 +00:00
inaam
bc36c8eb58 branches/zip
ChangeLog entry for r6674.
2010-02-12 17:22:35 +00:00
marko
462933b662 branches/zip: Remove bogus debug assertions introduced in r6660. 2010-02-11 20:41:11 +00:00
inaam
ffb43707bd branches/zip bug# 49535
This is a backport of r4924.
mem_heap_get_size() scans all allocated blocks to calculate the total
size of the heap. This patch introduces a new, total_size, field in
mem_block_info_struct. This field is valid only for base block 
(i.e.: the first block allocated for the heap) and is set to
ULINT_UNDEFINED in other blocks.
This considerably improves the performance of redo scan during recovery.

rb://108 issue#216

Approved by: Heikki

------------------------------------------------------------------------
2010-02-11 15:54:44 +00:00
marko
7e07ce4701 branches/zip: Relax a debug assertion about a missing BLOB. (Issue #452)
When rolling back an incomplete transaction in purge, tolerate missing
BLOBs also in update undo, when undoing an INSERT by updating a delete-marked
record, and the delete-marked record is no longer needed.
Previously, we only tolerated missing BLOBs in insert undo.
This merely fixes a debug assertion; the code performed correctly
without UNIV_DEBUG.

rb://249 approved by Sunny Bains.
2010-02-11 11:09:48 +00:00
marko
e8963afaa3 branches/zip: Introduce thr_is_recv(). 2010-02-11 11:01:18 +00:00
marko
62982447cf branches/zip: Clarify the rollback of INSERT by UPDATE of delete-marked rec.
row_undo_mod_remove_clust_low(): Augment the function comment.

row_undo_mod_remove_clust_low(), row_undo_mod_del_mark_or_remove_sec_low(),
row_undo_mod_del_mark_or_remove_sec(), row_undo_mod_upd_del_sec():
Add ut_ad(node->rec_type == TRX_UNDO_UPD_DEL_REC);
2010-02-11 09:21:11 +00:00
marko
e67b19aa62 branches/zip: trx_rseg_create(): Unused function, remove. 2010-02-10 11:11:04 +00:00
marko
66e7b76322 branches/zip: Clean up after r6559. Now that
btr_pcur_open_with_no_init() is a macro, do not mix preprocessor
directives in the macro invocation, because it is implementation-defined
whether that is going to work.
2010-02-10 09:07:05 +00:00
marko
b46217f571 branches/zip: Merge revisions 6538:6613 from branches/5.1:
------------------------------------------------------------------------
  r6545 | jyang | 2010-02-03 03:57:32 +0200 (Wed, 03 Feb 2010) | 8 lines
  Changed paths:
     M /branches/5.1/lock/lock0lock.c

  branches/5.1: Fix bug #49001, "SHOW INNODB STATUS deadlock info
  incorrect when deadlock detection aborts". Print the correct
  lock owner when recursive function lock_deadlock_recursive()
  exceeds its maximum depth LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK.

  rb://217, approved by Marko.
  ------------------------------------------------------------------------
  r6613 | inaam | 2010-02-09 20:23:09 +0200 (Tue, 09 Feb 2010) | 11 lines
  Changed paths:
     M /branches/5.1/buf/buf0buf.c
     M /branches/5.1/buf/buf0rea.c
     M /branches/5.1/include/buf0rea.h

  branches/5.1: Fix Bug #38901
  InnoDB logs error repeatedly when trying to load page into buffer pool

  In buf_page_get_gen() if we are unable to read a page (because of
  corruption or some other reason) we keep on retrying. This fills up
  error log with millions of entries in no time and we'd eventually run
  out of disk space. This patch limits the number of attempts that we
  make (currently set to 100) and after that we abort with a message.

  rb://241 Approved by: Heikki
  ------------------------------------------------------------------------
2010-02-10 08:40:55 +00:00
marko
c067042887 branches/zip: Document r6614 in ChangeLog. 2010-02-10 07:19:52 +00:00
inaam
e80abf1a23 branches/plugin rb://242
Let the master thread sleep if the amount of work to be done is
calibrated as taking less than a second.

Approved by: Heikki
2010-02-09 18:26:23 +00:00
marko
d00455cb7a branches/zip: recv_recovery_rollback_active():
Drop the temporary tables and indexes after enabling sync order checks.
This should not make any difference. This could have been done in r6611.
2010-02-09 12:32:39 +00:00
marko
ca0d3c8309 branches/zip: Roll back dictionary transaction(s) before scanning *.ibd files
innobase_start_or_create_for_mysql(): Roll back data dictionary
transactions before scanning the *.ibd files. Then, data dictionary
records can be loaded to the cache before opening the *.ibd files.

recv_recovery_rollback_active(): Refactored from
recv_recovery_from_checkpoint_finish().

rb://235, committing without review, because this is needed for
TablespaceDictionary.
2010-02-09 12:28:25 +00:00
marko
e106d9d5ac branches/zip: When dropping temporary indexes and tables at startup,
first load them to the data dictionary cache and use the normal
routines for dropping tables or indexes.  This should reduce the
risk of bugs and also make the code compatible with the upcoming
TablespaceDictionary implementation.

DICT_SYS_INDEXES_NAME_FIELD: The clustered index position of SYS_INDEXES.NAME.

row_merge_drop_temp_indexes(): Scan SYS_INDEXES for tables containing
temporary indexes, and load the tables as needed. Invoke
row_merge_drop_index() to drop the indexes.

row_mysql_drop_temp_tables(): Scan SYS_TABLES for temporary tables,
load them with dict_load_table() and drop them with
row_drop_table_for_mysql().

rb://251, not yet reviewed
2010-02-09 11:53:59 +00:00
marko
6a6a858219 branches/zip: dict_field_print_low(): Add const qualifier. 2010-02-09 11:45:40 +00:00
marko
0fdfc28d93 branches/zip: ha_innobase::add_index(): Check for !innodb_table. 2010-02-09 09:02:37 +00:00
marko
fbdfa0551a branches/zip: btr_pcur_commit(): Unused function, remove. 2010-02-08 11:53:02 +00:00
marko
a802b14ea8 branches/zip: rec_get_nth_field_offs_old():
Replace if (!cond) ut_error; tests with ut_a(cond).
2010-02-08 10:55:04 +00:00
marko
83b755361c branches/zip: row_merge_drop_index(): Remove redundant condition
on SYS_INDEXES.TABLE_ID.  INDEX_ID must be instance-widely unique,
because SYS_FIELDS is not indexed by TABLE_ID.
2010-02-08 08:06:39 +00:00
sunny
9e5e35eba7 branches/zip: Remove the additional check introduced in r6534 which tries
to check if the joining transaction has any other transactions waiting on
its locks. This optimization results in excessive deadlocks when running
Sysbench with a large number of threads. The function seems to return
FALSE positives.

rb://250
2010-02-04 14:11:23 +00:00