Commit graph

183 commits

Author SHA1 Message Date
marko
63b198756d branches/zip: Add ChangeLog entries for r6789, r6790. 2010-03-10 11:39:06 +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
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
9ea180a1c9 Document r6770. 2010-03-03 12:52:43 +00:00
inaam
bc36c8eb58 branches/zip
ChangeLog entry for r6674.
2010-02-12 17:22:35 +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
marko
f82647abe5 branches/zip: Pass the file name and line number of the caller of the
b-tree cursor functions to the buffer pool requests, in order to make
the latch diagnostics more accurate.

buf_page_optimistic_get_func(): Renamed to buf_page_optimistic_get().

btr_page_get_father_node_ptr(), btr_insert_on_non_leaf_level(),
btr_pcur_open(), btr_pcur_open_with_no_init(), btr_pcur_open_on_user_rec(),
btr_pcur_open_at_rnd_pos(), btr_pcur_restore_position(),
btr_cur_open_at_index_side(), btr_cur_open_at_rnd_pos():
Rename the function to _func and add the parameters file, line.
Define wrapper macros with __FILE__, __LINE__.

btr_cur_search_to_nth_level(): Add the parameters file, line.
2010-02-04 11:21:18 +00:00
marko
8a5da89f1d branches/zip: buf_LRU_invalidate_tablespace(): Ensure that prev_bpage
is not relocated when freeing a compressed block.  This avoids the
costly rescan of the LRU list.  (Bug #35077, Issue #449)

At most one buffer-fix will be active at a time, affecting two blocks:
the buf_page_t and the compressed page frame. This should not block
the memory defragmentation in buf0buddy.c too much.  In fact, it may
avoid unnecessary copying if also prev_bpage belongs to the tablespace
that is being invalidated.

rb://240
2010-02-03 13:01:39 +00:00
marko
5c4fe259ac branches/zip: Clean up CHECK TABLE error handling. (Issue #220)
ha_innobase::change_active_index(): Clean up code formatting.

ha_innobase::check(): Incorporate the code from
row_check_table_for_mysql().  Report errors to the client connection
instead of writing them to the error log.

row_check_table_for_mysql(): Remove.

row_check_index_for_mysql(): Renamed from row_scan_and_check_index().
Let the caller initialize prebuilt, and assume that the index is usable.

rb://178 approved by Sunny Bains
2010-02-03 12:43:38 +00:00
marko
9c3431d13f branches/zip: ChangeLog: Document the merge of 6471:6538 from branches/5.1. 2010-02-01 09:35:13 +00:00
marko
64671e4473 branches/zip: Drop temporary tables at startup.
This addresses the third aspect of Bug #41609.

row_mysql_drop_temp_tables(): New function, to drop all temporary
tables. These can be distinguished by the least significant bit of
MIX_LEN. However, we will skip ROW_FORMAT=REDUNDANT tables, because in
the records for those tables, that bit may be garbage.

recv_recovery_from_checkpoint_finish(): Invoke
row_mysql_drop_temp_tables().  Normally, if the .frm files for the
temporary tables exist at startup, MySQL will ask InnoDB to drop the
temporary tables.  However, if the files are deleted, for instance, by
the boot scripts of the operating system, the tables would remain in
the InnoDB data dictionary unless someone digs them up by
innodb_table_monitor and creates .frm files for dropping the tables.

rb://221 approved by Sunny Bains.
2010-01-27 08:49:01 +00:00
marko
6377f605a9 branches/zip: buf_page_get_gen(): Obey recv_no_ibuf_operations
and do not call ibuf_merge_or_delete_for_page() in crash recovery,
before the redo log has been applied.
This could cure some hard-to-repeat, hard-to-explain bugs
related to secondary indexes.

A possible recipe to repeat the bug:

1. update a secondary index leaf page on a compressed table
2. evict the page from the buffer pool while it is still dirty
3. ibuf_insert() something for the page
4. crash
5. crash recovery; ibuf merge would be done too early,
before applying redo log to the sec index page or the ibuf pages
2010-01-21 09:22:52 +00:00
marko
17c879e27b branches/zip: row_sel_get_clust_rec_for_mysql(): On the READ UNCOMMITTED
isolation level, do not attempt to access a clustered index record
that has been marked for deletion.  This fixes Issue #433.

Approved by Heikki over the IM.
2010-01-13 15:43:44 +00:00
marko
0ccf7024db branches/zip: buf_pool_drop_hash_index(): Check block->page.state
before checking block->is_hashed, because the latter may be uninitialized
right after server startup.
2010-01-13 15:15:29 +00:00
marko
4fdd498cdf branches/zip: Merge revisions 6350:6424 from branches/5.1:
------------------------------------------------------------------------
  r6421 | jyang | 2010-01-12 07:59:16 +0200 (Tue, 12 Jan 2010) | 8 lines
  Changed paths:
     M /branches/5.1/row/row0mysql.c

  branches/5.1: Fix bug #49238: Creating/Dropping a temporary table
  while at 1023 transactions will cause assert. Handle possible
  DB_TOO_MANY_CONCURRENT_TRXS when deleting metadata in
  row_drop_table_for_mysql().

  rb://220, approved by Marko
  ------------------------------------------------------------------------
  r6422 | marko | 2010-01-12 11:34:27 +0200 (Tue, 12 Jan 2010) | 3 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/handler/ha_innodb.h

  branches/5.1: Non-functional change:
  Make innobase_get_int_col_max_value() a static function.
  It does not access any fields of class ha_innobase.
  ------------------------------------------------------------------------
  r6424 | marko | 2010-01-12 12:22:19 +0200 (Tue, 12 Jan 2010) | 16 lines
  Changed paths:
     M /branches/5.1/handler/ha_innodb.cc
     M /branches/5.1/handler/ha_innodb.h

  branches/5.1: In innobase_initialize_autoinc(), do not attempt to read
  the maximum auto-increment value from the table if
  innodb_force_recovery is set to at least 4, so that writes are
  disabled. (Bug #46193)

  innobase_get_int_col_max_value(): Move the function definition before
  ha_innobase::innobase_initialize_autoinc(), because that function now
  calls this function.

  ha_innobase::innobase_initialize_autoinc(): Change the return type to
  void.  Do not attempt to read the maximum auto-increment value from
  the table if innodb_force_recovery is set to at least 4.  Issue
  ER_AUTOINC_READ_FAILED to the client when the auto-increment value
  cannot be read.

  rb://144 by Sunny, revised by Marko
  ------------------------------------------------------------------------
2010-01-12 11:47:11 +00:00
marko
7673efde7d branches/zip: ChangeLog: Document that since r6270, the zlib version number
will be displayed at start-up.
2009-12-02 09:43:49 +00:00
vasil
60058c7dd7 branches/zip: Add ChangeLog entry for the release of 1.0.6. 2009-12-01 14:19:44 +00:00
marko
b1d5011cb1 branches/zip: Suppress errors about non-found temporary tables.
Write the is_temp flag to SYS_TABLES.MIX_LEN.

dict_table_t:🎏 Add a flag for is_temporary, DICT_TF2_TEMPORARY.
Unlike other flags, this will not be written to the tablespace flags
or SYS_TABLES.TYPE, but only to SYS_TABLES.MIX_LEN.

dict_build_table_def_step(): Only pass DICT_TF_BITS to tablespaces.

dict_check_tablespaces_and_store_max_id(), dict_load_table():
Suppress errors about temporary tables not being found.

dict_create_sys_tables_tuple(): Write the DICT_TF2_TEMPORARY flag
to SYS_TABLES.MIX_LEN.

fil_space_create(), fil_create_new_single_table_tablespace(): Add assertions
about space->flags.

row_drop_table_for_mysql(): Do not complain about non-found temporary tables.

rb://160 approved by Heikki Tuuri.  This addresses the second part of
Bug #41609 Crash recovery does not work for InnoDB temporary tables.
2009-11-30 10:50:11 +00:00
marko
5e5e202df6 branches/zip: ChangeLog: Document r4922 that was forgotten. 2009-11-30 10:19:50 +00:00
vasil
ae143791ee branches/zip:
Add ChangeLog entry for c6207.
2009-11-20 08:49:24 +00:00
vasil
bc66ae8cc6 branches/zip: Merge r6159:6198 from branches/5.1:
------------------------------------------------------------------------
  r6187 | jyang | 2009-11-18 05:27:30 +0200 (Wed, 18 Nov 2009) | 9 lines
  Changed paths:
     M /branches/5.1/btr/btr0btr.c
  
  branches/5.1: Fix bug #48469 "when innodb tablespace is
  configured too small, crash and corruption!". Function
  btr_create() did not check the return status of fseg_create(),
  and continue the index creation even there is no sufficient
  space.
  
  rb://205 Approved by Marko
  
  
  ------------------------------------------------------------------------
  r6188 | jyang | 2009-11-18 07:14:23 +0200 (Wed, 18 Nov 2009) | 8 lines
  Changed paths:
     M /branches/5.1/data/data0type.c
  
  branches/5.1: Fix bug #48526 "Data type for float and
  double is incorrectly reported in InnoDB table monitor".
  Certain datatypes are not printed correctly in
  dtype_print().
  
  rb://204 Approved by Marko.
  
  
  ------------------------------------------------------------------------
2009-11-19 10:10:12 +00:00
vasil
935d29a86e branches/zip:
Add ChangeLog entry for r6197.
2009-11-19 07:44:31 +00:00
marko
906238598d branches/zip: ha_innobase::add_index(): When creating the primary key
and the table is being locked by another transaction,
do not attempt to drop the table. (Bug #48782)

Approved by Sunny Bains over IM
2009-11-18 09:36:18 +00:00
vasil
e164b4201a branches/zip:
Add ChangeLog entry for r6185.
2009-11-17 14:48:14 +00:00
calvin
dcfdef5ec3 branches/zip: add an entry to ChangeLog for r6065 2009-11-16 18:20:38 +00:00
vasil
7b6dd33014 branches/zip:
Wrap line at 78th char in the ChangeLog
2009-11-16 18:07:39 +00:00
marko
daca48870f branches/zip: Allow CREATE INDEX to be interrupted. (Issue #354)
rb://183 approved by Heikki Tuuri
2009-11-12 13:49:08 +00:00
vasil
0d64136a0c branches/zip:
Add ChangeLog for r6157.
2009-11-11 14:00:12 +00:00
vasil
6efbbc7dbd branches/zip:
Add changelog entry for r6160.
2009-11-11 13:36:16 +00:00
marko
def1082121 branches/zip: innobase_convert_identifier(): Convert table names with
explain_filename() to address Bug #32430: 'show innodb status'
causes errors Invalid (old?) table or database name in logs.

rb://134 approved by Sunny Bains
2009-11-04 07:57:29 +00:00
marko
dda7217e08 branches/zip: Free all resources at shutdown. Set pointers to NULL, so
that Valgrind will not complain about freed data structures that are
reachable via pointers.  This addresses Bug #45992 and Bug #46656.

This patch is mostly based on changes copied from branches/embedded-1.0,
mainly c5432, c3439, c3134, c2994, c2978, but also some other code was
copied.  Some added cleanup code is specific to MySQL/InnoDB.

rb://199 approved by Sunny Bains
2009-11-02 09:42:56 +00:00
jyang
db0d81d0d7 branches/zip: Correct the bug number for -r6109 change
from # 48273 to #48237
2009-10-30 08:02:31 +00:00
vasil
f054d409f5 branches/zip:
* Add ChangeLog entries for latest changes
* Obey alphabetical order in the list of the files
* White-space fixup
2009-10-29 16:43:51 +00:00
marko
7d0ad4af4f branches/zip: Fix corruption of buf_pool->LRU_old and improve debug assertions.
This was reported as Issue #381.

buf_page_set_old(): Assert that blocks may only be set old if
buf_pool->LRU_old is initialized and buf_pool->LRU_old_len is nonzero.
Assert that buf_pool->LRU_old points to the block at the old/new boundary.

buf_LRU_old_adjust_len(): Invoke buf_page_set_old() after adjusting
buf_pool->LRU_old and buf_pool->LRU_old_len, in order not to violate
the added assertions.

buf_LRU_old_init(): Replace buf_page_set_old() with a direct
assignment to bpage->old, because these loops that initialize all the
blocks would temporarily violate the assertions about
buf_pool->LRU_old.

buf_LRU_remove_block(): When setting buf_pool->LRU_old = NULL, also
clear all bpage->old flags and set buf_pool->LRU_old_len = 0.

buf_LRU_add_block_to_end_low(), buf_LRU_add_block_low(): Move the
buf_page_set_old() call later in order not to violate the debug
assertions.  If buf_pool->LRU_old is NULL, set old=FALSE.

buf_LRU_free_block(): Replace the UNIV_LRU_DEBUG assertion with a
dummy buf_page_set_old() call that performs more thorough checks.

buf_LRU_validate(): Do not tolerate garbage in buf_pool->LRU_old_len
even if buf_pool->LRU_old is NULL.  Check that bpage->old is monotonic.

buf_relocate(): Make the UNIV_LRU_DEBUG checks stricter.

buf0buf.h: Revise the documentation of buf_page_t::old and
buf_pool_t::LRU_old_len.
2009-10-29 11:04:11 +00:00
marko
bdc7678f45 branches/zip: row_ins_alloc_sys_fields(): Zero out the system columns
DB_TRX_ID, DB_ROLL_PTR and DB_ROW_ID, in order to avoid harmless
Valgrind warnings about uninitialized data.  (The warnings were
harmless, because the fields would be initialized at a later stage.)
2009-10-26 13:46:18 +00:00
vasil
7e6a345f3e branches/zip:
Add ChangeLog entry for r6095.
2009-10-19 12:06:09 +00:00
vasil
68b1cc9e37 branches/zip:
Add ChangeLog entry for r6080.
2009-10-15 04:21:17 +00:00
marko
64096ab555 branches/zip: Clean up after a crash during DROP INDEX.
When InnoDB crashes while dropping an index, ensure that
the index will be completely dropped during crash recovery.

row_merge_drop_index(): Before dropping an index, rename the index to
start with TEMP_INDEX_PREFIX_STR and commit the change, so that
row_merge_drop_temp_indexes() will drop the index after crash
recovery if the server crashes while dropping the index.

fseg_inode_try_get(): New function, forked from fseg_inode_get().
Return NULL if the file segment index node is free.

fseg_inode_get(): Assert that the file segment index node is not free.

fseg_free_step(): If the file segment index node is already free,
print a diagnostic message and return TRUE.

fsp_free_seg_inode(): Write a nonzero number to FSEG_MAGIC_N, so that
allocated-and-freed file segment index nodes can be better
distinguished from uninitialized ones.

This is rb://174, addressing Issue #348.

Tested by restarting mysqld upon the completion of the added
log_write_up_to() invocation below, during DROP INDEX.  The index was
dropped after crash recovery, and re-issuing the DROP INDEX did not
crash the server.

  Index: btr/btr0btr.c
  ===================================================================
  --- btr/btr0btr.c	(revision 6026)
  +++ btr/btr0btr.c	(working copy)
  @@ -42,6 +42,7 @@ Created 6/2/1994 Heikki Tuuri
   #include "ibuf0ibuf.h"
   #include "trx0trx.h"
  +#include "log0log.h"
   
   /*
   Latching strategy of the InnoDB B-tree
   --------------------------------------
  @@ -873,6 +874,8 @@ leaf_loop:
   
   		goto leaf_loop;
   	}
  +
  +	log_write_up_to(mtr.end_lsn, LOG_WAIT_ALL_GROUPS, TRUE);
   top_loop:
   	mtr_start(&mtr);
2009-10-01 10:24:33 +00:00
vasil
2fe21c275f branches/zip:
Fix the year, should be 2009.

Pointed by:	Calvin
2009-09-29 12:19:59 +00:00
vasil
732fd6c3f7 branches/zip:
Add ChangeLog entry for the release of 1.0.4.
2009-09-29 09:15:25 +00:00
vasil
2fccb1bd92 branches/zip:
ChangeLog: wrap around 78th column, not earlier.
2009-09-29 07:09:52 +00:00
marko
cf0210a706 branches/zip: Remove an assertion failure when the InnoDB data dictionary
is inconsistent with the MySQL .frm file.

ha_innobase::index_read(): When the index cannot be found,
return an error.

ha_innobase::change_active_index(): When prebuilt->index == NULL,
set also prebuilt->index_usable = FALSE.  This is not needed for
correctness, because prebuilt->index_usable is only checked by
row_search_for_mysql(), which requires prebuilt->index != NULL.

This addresses Issue #349.  Approved by Heikki Tuuri over IM.
2009-09-28 12:03:58 +00:00
marko
3b38bf02cb branches/zip: Do not write to PAGE_INDEX_ID after page creation,
not even when restoring an uncompressed page after a compression failure.

btr_page_reorganize_low(): On compression failure, do not restore
those page header fields that should not be affected by the
reorganization.  Instead, compare the fields.

page_zip_decompress(): Add the parameter ibool all, for copying all
page header fields.  Pass the parameter all=TRUE on block read
completion, redo log application, and page_zip_validate(); pass
all=FALSE in all other cases.

page_zip_reorganize(): Do not restore the uncompressed page on
failure.  It will be restored (to pre-modification state) by the
caller anyway.

rb://167, Issue #346
2009-09-28 07:52:25 +00:00
marko
e5f474417c branches/zip: Try to prevent the reuse of tablespace identifiers after
InnoDB has crashed during table creation.  Also, refuse to start if
files with duplicate tablespace identifiers are encountered.

fil_node_create(): Update fil_system->max_assigned_id.  This should
prevent the reuse of a space->id when InnoDB does a full crash
recovery and invokes fil_load_single_table_tablespaces().  Normally,
fil_system->max_assigned_id is initialized from
SELECT MAX(ID) FROM SYS_TABLES.

fil_open_single_table_tablespace(): Return FALSE when
fil_space_create() fails.

fil_load_single_table_tablespace(): Exit if fil_space_create() fails
and innodb_force_recovery=0.

rb://173 approved by Heikki Tuuri.  This addresses Issue #335.
2009-09-28 07:33:59 +00:00
vasil
91cf5f39be branches/zip:
Add ChangeLog entry for c5988.
2009-09-28 06:10:29 +00:00
vasil
2f41cc6472 branches/zip:
Add ChangeLog entries for c5938.
2009-09-21 04:26:04 +00:00
vasil
520500534a branches/zip:
White space and formatting cleanup in the ChangeLog
2009-09-18 03:59:30 +00:00
marko
866adf529d branches/zip: innodb-zip.test: Make the test work with zlib 1.2.3.3.
Apparently, the definition of compressBound() has slightly changed.

This has been filed as Mantis Issue #345.
2009-09-17 05:32:08 +00:00