Commit graph

54 commits

Author SHA1 Message Date
marko
25f45c0d1c branches/zip: Make innodb_thread_concurrency=0 the default.
The old default was 8.
2009-02-11 22:14:19 +00:00
marko
a805ee5fd5 branches/zip: When innodb_use_sys_malloc is set, ignore
innodb_additional_mem_pool_size, because nothing will
be allocated from mem_comm_pool.

mem_pool_create(): Remove the assertion about size.  The function will
work with any size.  However, an assertion would fail in ut_malloc_low()
when size==0.

mem_init(): When srv_use_sys_malloc is set, pass size=1 to mem_pool_create().

mem0mem.c: Add #include "srv0srv.h" that is needed by mem0dbg.c.
2009-02-10 10:52:27 +00:00
marko
ecda78f01c branches/zip: get_share(), free_share(): Make table locking case sensitive.
If lower_case_table_names=1, MySQL will pass the table names in lower case.
Thus, we can use a binary comparison (strcmp) in the hash table.

rb://87 approved by Heikki Tuuri, to address Bug #41676 and Issue #167.
2009-02-10 09:51:43 +00:00
marko
da9083a02c branches/zip: ChangeLog: Document recent changes. 2009-02-10 09:09:15 +00:00
vasil
5aa989e25d branches/zip:
Add ChangeLog entry for the change in r4072.
2009-02-02 07:32:04 +00:00
marko
8b025adba6 branches/zip: Port the applicable parts of r4053 from branches/innodb+:
Implement the global variable innodb_change_buffering, with the
following values:

none - buffer nothing
inserts - buffer inserts (the default)

Approved by Ken Jacobs.
2009-01-29 09:27:09 +00:00
marko
2300edb00f branches/zip: buf_LRU_invalidate_tablespace(): Fix a race condition:
read zip_size while still holding block_mutex.
2009-01-27 08:05:24 +00:00
marko
b707b2e3b1 branches/zip: In r988, the function buf_block_align() was enclosed
within UNIV_DEBUG. The two remaining callers in non-debug builds,
btr_search_guess_on_hash() and btr_search_validate(), were rewritten
to call buf_page_hash_get().

To implement support for a resizeable buffer pool, the function
buf_block_align() had been rewritten to perform a page hash lookup in
the buffer pool. The caller was also made responsible for holding the
buffer pool mutex.

Because the page hash lookup is expensive and it has to be done while
holding the buffer pool mutex, implement buf_block_align() by pointer
arithmetics again, and make btr_search_guess_on_hash() call it. Note
that this will have to be adjusted if the interface to the resizeable
buffer pool is actually implemented.

rb://83 approved by Heikki Tuuri, to address Issue #161.

As a deviation from the approved patch, this patch also makes
btr_search_validate() (invoked by CHECK TABLE) check that
buf_pool->page_hash is consistent with buf_block_align().
2009-01-26 20:33:20 +00:00
marko
e75eaabaeb branches/zip: Merge revisions 4005:4032 from branches/5.1:
------------------------------------------------------------------------
  r4032 | marko | 2009-01-23 15:43:51 +0200 (Fri, 23 Jan 2009) | 10 lines

  branches/5.1: Merge r4031 from branches/5.0:

  btr_search_drop_page_hash_when_freed(): Check if buf_page_get_gen()
  returns NULL.  The page may have been evicted from the buffer pool
  between buf_page_peek_if_search_hashed() and buf_page_get_gen(),
  because the buffer pool mutex will be released between these two calls.
  (Bug #42279, Issue #160)

  rb://82 approved by Heikki Tuuri
  ------------------------------------------------------------------------
2009-01-23 13:49:04 +00:00
marko
5dceabc908 branches/zip: buf_page_get_gen(): Remove the unused mode BUF_GET_NOWAIT.
This was noticed while investigating Issue #160.
2009-01-23 13:31:36 +00:00
vasil
2ff10a87f7 branches/zip:
Add ChangeLog entries for the bugfixes in r4004 and r4005.
2009-01-20 15:01:08 +00:00
vasil
70ab4058b7 branches/zip:
Add ChangeLog entries for the bug fixes in r3911 and r3930.
2009-01-15 19:15:00 +00:00
marko
2f7bcc7d99 branches/zip: In hash table lookups, assert that the traversed items
satisfy some conditions when UNIV_DEBUG is defined.

HASH_SEARCH(): New parameter: ASSERTION. All users will pass an appropriate
ut_ad() or nothing.

dict_table_add_to_columns(): Assert that the table being added to the data
dictionary cache is not already being pointed to by the name_hash and
id_hash tables.

HASH_SEARCH_ALL(): New macro, for use in dict_table_add_to_columns().

dict_mem_table_free(): Set ut_d(table->cached = FALSE), so that we can
check ut_ad(table->cached) when traversing the hash tables, as in
HASH_SEARCH(name_hash, dict_sys->table_hash, ...) and
HASH_SEARCH(id_hash, dict_sys->table_id_hash, ...).

dict_table_get_low(), dict_table_get_on_id_low(): Assert
ut_ad(!table || table->cached).

fil_space_get_by_id(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(hash, fil_system->spaces, ...).

fil_space_get_by_name(): Check ut_ad(space->magic_n == FIL_SPACE_MAGIC_N)
in HASH_SEARCH(name_hash, fil_system->name_hash, ...).

buf_buddy_block_free(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->zip_hash, ...).

buf_page_hash_get(): Check that the blocks are in valid state in
HASH_SEARCH(hash, buf_pool->page_hash, ...).

get_share(), free_share(): Check ut_ad(share->use_count > 0) in
HASH_SEARCH(table_name_hash, innobase_open_tables, ...).

This was posted as rb://75 for tracking down errors similar to Issue #153.
2009-01-13 19:46:22 +00:00
marko
179e75c559 branches/zip: Some non-functional changes related to Issue #155.
buf_page_struct: Note that space and offset are also protected by
buf_pool_mutex.  They are only assigned to by
buf_block_set_file_page().  Thus, it suffices for buf_flush_batch() to
hold just buf_pool_mutex when checking these fields.

buf_flush_try_page(): Rename "locked" to "is_s_latched", per Heikki's request.

buf_flush_batch(): Move the common statement mutex_exit(block_mutex)
from all if-else if-else branches before the if block.  Remove the
redundant test (buf_pool->init_flush[flush_type] == FALSE) that was
apparently copied from buf_flush_write_complete().

buf_flush_write_block_low(): Note why it is safe not to hold buf_pool_mutex
or block_mutex.  Enumerate the assumptions in debug assertions.
2009-01-09 20:27:40 +00:00
marko
6b0531d6e6 branches/zip: buf_flush_insert_into_flush_list(),
buf_flush_insert_sorted_into_flush_list(): Remove unused code.
Change the parameter to buf_block_t* block and assert that
block->state == BUF_BLOCK_FILE_PAGE.  This is part of Issue #155.
2009-01-09 13:40:11 +00:00
vasil
673ef6e12b branches/zip:
Add ChangeLog entries for r3795 r3796 r3797 r3798.
2009-01-08 20:10:10 +00:00
marko
c9c5b83dd2 branches/zip: ChangeLog: Clarify the impact of r3608. 2009-01-02 13:57:51 +00:00
marko
4ee8fc70e8 branches/zip: ChangeLog: Document r3608 and r3613. 2009-01-02 13:55:12 +00:00
vasil
4302847c99 branches/zip:
Remove 2 entries from the ChangeLog about changes not big enough.

Discussed with:	Marko
2008-12-17 12:58:26 +00:00
marko
4856b4ba61 branches/zip: Remove update-in-place-in-select from the internal SQL
interpreter.  It was only used for updating the InnoDB internal data
dictionary when renaming or dropping tables.  It could have caused
deadlocks after acquiring latches on insert buffer bitmap pages.
This and r3544 should fix Issue #135.

Furthermore, the update-in-place-in-select does not account for
compression failure.  That was not a problem yet, since the InnoDB SQL
interpreter has so far assumed ROW_FORMAT=REDUNDANT.

rb://63 approved by Heikki Tuuri
2008-12-17 12:40:59 +00:00
marko
3462b464f1 branches/zip: ChangeLog: Document recent changes that were not included in
InnoDB Plugin 1.0.2, except changes to source code comments.
2008-12-17 10:44:31 +00:00
marko
b0ab87862c branches/zip: Introduce UNIV_AHI_DEBUG for debugging the adaptive hash
index without enabling UNIV_DEBUG.
2008-12-17 09:19:56 +00:00
vasil
0e645ded93 branches/zip:
Resurrect a ChangeLog entry that I removed in c3331 with a fake date
so it does not appear that it has been included in 1.0.2.
2008-12-02 11:34:36 +00:00
vasil
565c0fe095 branches/zip:
Remove an entry from the ChnageLog for a change that was made before
the release of 1.0.2 but was not included in that release.
2008-12-02 10:09:20 +00:00
vasil
b35f664531 branches/zip:
Add entry in the ChangeLog for the release of 1.0.2.
2008-12-02 10:03:17 +00:00
marko
afe9ee1f86 branches/zip: row_merge_drop_temp_indexes(): Replace the WHILE 1 with
WHILE 1=1 in the SQL procedure, so that the loop will actually be
entered and temporary indexes be dropped during crash recovery.
Thanks to Sunny Bains for pointing this out.

Tested as follows:

Set a breakpoint in row_merge_rename_indexes.

CREATE TABLE t(a INT)ENGINE=InnoDB;
CREATE INDEX a ON t(a);

-- The breakpoint will be reached.  Kill and restart mysqld.
SHOW CREATE TABLE t;
-- This shows the MySQL .frm file, without and index.
CREATE TABLE innodb_table_monitor(a INT)ENGINE=InnoDB;
-- This will dump the InnoDB dictionary to the error log, without the index.
2008-11-26 08:00:28 +00:00
vasil
b95ccf918c branches/zip:
White-space cleanup in ChangeLog.
2008-10-31 09:47:56 +00:00
sunny
b5c757cb14 branches/zip: Update ChangeLog with r2943 info. 2008-10-31 07:44:45 +00:00
vasil
05cb12e611 branches/zip:
Add ChangeLog entry for Bug#40360 Binlog related errors with binlog off
2008-10-30 10:28:47 +00:00
vasil
0f2b6ec668 branches/zip:
Add 2 ChangeLog entries for the 2 bugfixes that were merged from branches/5.1.
2008-10-29 20:10:40 +00:00
marko
1e66bf4019 branches/zip: ChangeLog: Mention Bug #27276. 2008-10-29 07:52:30 +00:00
vasil
1c3838f0bf branches/zip:
ChangeLog:

add entry for the Windows plugin.
2008-10-28 06:40:45 +00:00
vasil
9b36639b1c branches/zip:
ChangeLog:

Add entry for the fix of Bug#19424 InnoDB: Possibly a memory overrun of
the buffer being freed (64-bit Visual C)
2008-10-27 09:48:46 +00:00
vasil
bd5e74d781 branches/zip:
White space cleanup in ChangeLog
2008-10-24 07:14:16 +00:00
marko
1e3e8ded2a branches/zip: ChangeLog: Document r2763, r2794, r2683, r2799, r2809, r2866. 2008-10-24 06:24:17 +00:00
vasil
ef8226fc52 branches/zip:
Update the ChangeLog
2008-10-23 07:33:43 +00:00
marko
a9a21fb983 branches/zip: Do not release the data dictionary latch while holding locks
to the data dictionary records.  This should fix Issue #83.

row_drop_table_for_mysql_no_commit(): Rename back to
row_drop_table_for_mysql().  Commit the transaction if the data
dictionary was not locked when the function was called.  Otherwise,
neither commit the transaction nor unlock the data dictionary.

row_merge_drop_table(): Let row_drop_table_for_mysql() take care of
locking the data dictionary.

dict_create_or_check_foreign_constraint_tables(),
trx_rollback_active(), row_create_table_for_mysql(),
row_create_index_for_mysql(), row_table_add_foreign_constraints():
Explicitly commit the transaction, because row_drop_table_for_mysql()
would no longer commit it, given that the data dictionary will be
locked during the calls.

Approved by Sunny (over IM). rb://23
2008-10-08 08:54:16 +00:00
vasil
9daa40cc22 branches/zip:
Add more ChangeLog entries from the merge
of 2702:2722 from branches/5.1 (r2723).
2008-10-06 07:00:19 +00:00
vasil
e32f35c5d3 branches/zip:
Add entry for Bug#37788 InnoDB Plugin: AUTO_INCREMENT wrong for compressed tables
in the ChangeLog
2008-10-06 06:52:37 +00:00
vasil
51871e260e branches/zip:
Add entry for Bug#39830 Table autoinc value not updated on first insert
in the ChangeLog.
2008-10-06 06:14:04 +00:00
vasil
de7fedd3ae branches/zip:
ChangeLog:
Use "Fix Bug#NNNNN bug summary text" for bugfixes, as for other entries
in the file.
2008-10-03 10:31:53 +00:00
marko
be56c64772 branches/zip: Make innodb_lock_wait_timeout a settable session variable
(Bug #36285, rb://9).

innodb-index.test, innodb-index.result: Set innodb_lock_wait_timeout as
a session variable instead of relying on the global value.

innodb-index-master.opt: Remove.

innodb-timeout.test: Test that setting the innodb_lock_wait_timeout
works as advertised.

thd_lock_wait_timeout(): New function, to retrieve the lock wait timeout
for a given MySQL client connection (thd), or the global value (thd==NULL).

srv_lock_wait_timeout, innobase_lock_wait_timeout: Remove.

Replace MYSQL_SYSVAR_LONG(lock_wait_timeout)
with MYSQL_THDVAR_ULONG(lock_wait_timeout).
2008-10-03 09:24:23 +00:00
calvin
0a39414ac2 branches/zip: Update the ChangeLog with the fix of
memory leak on Windows.
2008-09-22 08:14:01 +00:00
marko
75fe6fa6a4 branches/zip: When creating an index in innodb_strict_mode, check that
the maximum record size will never exceed the B-tree page size limit.
For uncompressed tables, there should always be enough space for two
records in an empty B-tree page.  For compressed tables, there should
be enough space for storing two node pointer records or one data
record in an empty page in uncompressed format.

dict_build_table_def_step(): Remove the inaccurate check for table row
size.

dict_index_too_big_for_tree(): New function: check if the index
records would be too big for a B-tree page.

dict_index_add_to_cache(): Add the parameter "strict".  Invoke
dict_index_too_big_for_tree() if it is set.

trx_is_strict(), thd_is_strict(): New functions, for determining if
innodb_strict_mode is enabled for the current transaction.

dict_create_index_step(): Pass the new parameter strict of
dict_index_add_to_cache() as trx_is_strict(trx).  All other callers
pass it as FALSE.

innodb.test: Enable innodb_strict_mode before attempting to create a
table with a too big record size.

innodb-zip.test: Remove the test of inserting random data.  Add tests
for checking that the maximum record lengths are enforced at table
creation time.
2008-09-18 12:31:17 +00:00
marko
81de88a9f5 branches/zip: ChangeLog: Remove reference to Mantis. This file is for the
general public, and Mantis is for our internal use only.

Thanks to Vasil for pointing this out.
2008-09-18 06:07:42 +00:00
marko
f20ac69c62 branches/zip: Add the ChangeLog entry for r2631. 2008-09-17 08:48:32 +00:00
vasil
380bb0c77e branches/zip:
Update the ChangeLog which has not been updated for a long time, phew!
2008-09-12 12:02:03 +00:00
vasil
6fefe3bbdc branches/zip:
Update the ChangeLog.
2008-06-09 10:27:39 +00:00
vasil
7cb41a85b7 branches/zip:
Update the ChangeLog.
2008-06-06 15:34:17 +00:00
vasil
4148a376c0 branches/zip:
Update the ChangeLog
2008-05-21 06:29:55 +00:00