- 09 Sep, 2008 1 commit
-
-
marko authored
foreign key constraint, find a truly equivalent index for it. If none is available, refuse to drop the index. MySQL can drop an index when creating a "stronger" index. This was reported as Mantis issue #70 and MySQL Bug #38786. innodb-index.test: Add a test case. dict_foreign_find_equiv_index(): New function, to replace the incorrectly written function dict_table_find_equivalent_index(). dict_table_replace_index_in_foreign_list(): Simplify the implementation.
-
- 04 Sep, 2008 1 commit
-
-
marko authored
"free" bits in the insert buffer bitmap in particular.
-
- 29 Aug, 2008 1 commit
-
-
marko authored
in fast index creation. In r1399, we wrote undo log records about creating indexes. The special undo log records were deemed unnecessary later, but this special handling was not removed then. row_merge_create_index(): Do not assign index->id. dict_build_index_def_step(): Unconditionally assign index->id.
-
- 27 Aug, 2008 1 commit
-
-
marko authored
format. Replace dict_table_is_comp(index->table) with TRUE.
-
- 22 Aug, 2008 1 commit
-
-
marko authored
correct the grammar of the warning message.
-
- 21 Aug, 2008 3 commits
-
-
marko authored
This function was introduced in r2606, when merging r2603 from branches/5.1.
-
vasil authored
Merge 2537:2605 from branches/5.1: ------------------------------------------------------------------------ r2545 | vasil | 2008-07-25 17:24:23 +0300 (Fri, 25 Jul 2008) | 37 lines Changed paths: M /branches/5.1/handler/ha_innodb.cc branches/5.1: Fix Bug#38185 ha_innobase::info can hold locks even when called with HA_STATUS_NO_LOCK The fix is to call fsp_get_available_space_in_free_extents() from ha_innobase::info() only if HA_STATUS_NO_LOCK is not present in the flag *AND* change get_schema_tables_record() in MySQL's sql/sql_show.cc to call ::info() *without* HA_STATUS_NO_LOCK whenever a user issues SELECT FROM information_schema.tables; Without the change to sql/sql_show.cc this patch would lead to Bug#32440 resurfacing. I.e. delete_length would never be updated in ::info() and will remain 0 forever, resulting in the free space not being shown anywhere. This is the change to sql/sql_show.cc for reference, it needs to be committed to the MySQL repo before or at the same time with this change to ha_innodb.cc: --- patch begins here --- --- sql/sql_show.cc.orig 2008-07-23 09:32:14.000000000 +0300 +++ sql/sql_show.cc 2008-07-23 09:32:19.000000000 +0300 @@ -3549,8 +3549,7 @@ static int get_schema_tables_record(THD if(file) { - file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_AUTO | - HA_STATUS_NO_LOCK); + file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_AUTO); enum row_type row_type = file->get_row_type(); switch (row_type) { case ROW_TYPE_NOT_USED: --- patch ends here --- Approved by: Heikki ------------------------------------------------------------------------ r2603 | marko | 2008-08-21 16:25:05 +0300 (Thu, 21 Aug 2008) | 10 lines Changed paths: M /branches/5.1/handler/ha_innodb.cc M /branches/5.1/include/ha_prototypes.h M /branches/5.1/row/row0sel.c branches/5.1: Identify SELECT statements by thd_sql_command() == SQLCOM_SELECT instead of parsing the query string. This fixes MySQL Bug #37885 without us having to implement lexical analysis of SQL comments in yet another place. thd_is_select(): A new predicate. row_search_for_mysql(): Use thd_is_select(). Approved by Heikki. ------------------------------------------------------------------------
-
marko authored
dict_table_get_referenced_constraint(), dict_table_get_foreign_constraint(): Simplify the iteration loop. dict_table_find_equivalent_index(): Correct the function comment.
-
- 20 Aug, 2008 1 commit
-
-
marko authored
-
- 18 Aug, 2008 3 commits
-
-
marko authored
cache, especially buf_pool->LRU_old and bpage->old. buf_LRU_old_adjust_len(), buf_LRU_remove_block(): Check that blocks in buf_pool->LRU_old have the "old" flag set and the blocks preceding buf_pool->LRU_old have the "old" flag clear. buf_LRU_add_block_low(), buf_relocate(): Check that buf_pool->LRU_old is the first block in the LRU list whose "old" flag is set. buf_LRU_free_block(): When replacing a control block in the LRU list with a control block for a compressed page, assert that the "old" flags in the neighboring LRU list entries grow monotonically. buf_page_set_old(): Assert that the "old" flags in the neighboring LRU list entries grow monotonically.
-
marko authored
Adjust the callers where necessary: buf_LRU_add_block_to_end_low() and buf_LRU_add_block_low().
-
marko authored
file list link is written or read below FIL_PAGE_DATA. This has helped diagnose issue#63.
-
- 09 Aug, 2008 1 commit
-
-
sunny authored
-
- 08 Aug, 2008 1 commit
-
-
marko authored
buf_pool->LRU_old_len. However, we forgot to check if buf_pool->LRU_old happens to point to b's successor in the LRU list. If it does, we must assign buf_pool->LRU_old = b. The following invariants hold: In the LRU list, the "old" flag should grow monotonically, i.e., it is 0 for the first few items and 1 from thereafter. If buf_pool->LRU_old != NULL, it must point to the first item with old=1 in the LRU list, and there must be buf_pool->LRU_old_len old items in the list. This should fix Mantis issue#50 and issue#68.
-
- 07 Aug, 2008 2 commits
-
-
vasil authored
The cardinality of every index (the number of different key values) is calculated when the table is opened, at SHOW TABLE STATUS, ANALYZE TABLE and on other circumstances (like when the table has changed too much). Note that if the mysql client is running with the auto-rehash setting turned on (default) this causes all tables to be opened when it starts. Previously InnoDB sampled 8 random pages from the index to get an estimate of the cardinality. Now the number of sampled pages can be changed via the global parameter innodb_stats_sample_pages which can be tuned at runtime. The default value for this parameter is 8. If the value of this parameter is changed, there may be serious problems: - small values (say, 1) can cause an error in table stats; - values much larger than 8 (say, 100), can cause a big slowdown in table opening time, SHOW TABLE status, etc. - query plans may be different from the old ones. Approved by: Heikki
-
vasil authored
Fix Mantis issue#66. Do not try to dereference the MySQL thread object if it is NULL. Approved by: Sunny (via IM)
-
- 06 Aug, 2008 6 commits
-
-
marko authored
-
marko authored
replace rbmode and "rollback mode" with rb_ctx and "rollback context". Suggested by Sunny.
-
marko authored
recovery, tolerate clustered index records whose externally stored columns have not been written. This should remove the assertion failures that were reported as Mantis issue#58, issue#62, issue#64. trx_is_recv(): New function: TRUE if this transaction is rolling back an incomplete transaction in crash recovery. enum trx_rbmode: Rollback modes: no rollback, normal rollback, crash recovery. btr_cur_pessimistic_delete(), btr_free_externally_stored_field(), btr_rec_free_externally_stored_fields(): Replace the ibool parameter with enum trx_rbmode. btr_free_externally_stored_field(): If field_ref is zero, return but assert ut_a(rbmode == RB_RECOVERY). Unless InnoDB has crashed while inserting a clustered index record, field_ref should not be zero. btr_rec_free_updated_extern_fields(): Add the parameter enum trx_rbmode. btr_cur_pessimistic_update(): Pass the rbmode parameter to btr_rec_free_updated_extern_fields(). row_undo_ins(), row_undo_mod_upd_del_sec(): If row_build_index_entry() fails, assert trx_is_recv() and skip this secondary index. row_undo_mod_upd_del_sec(): Empty the heap at the end of each loop iteration in order to conserve memory and to reduce the number of low-level memory allocations.
-
marko authored
buf_flush_init_for_writing(), buf_LRU_block_remove_hashed_page(): Dump the page frame featuring the incorrect FIL_PAGE_TYPE along with the page_zip->data that might contain an earlier version of the page.
-
marko authored
-
marko authored
buf_block_align() on a non-file page frame that was created in btr_cur_pessimistic_insert(), to see if a record fits on a compressed page by itself. These assertions caused an assertion failure in buf_block_align() in innodb_bug36172.test. page_zip_write_rec(), page_zip_write_header(): Remove the assertion that calls buf_frame_get_page_zip().
-
- 04 Aug, 2008 4 commits
-
-
marko authored
mem_heap_create_block(): Compute len and call mem_area_alloc() only once. mem_heap_block_free(): Call mem_area_free() only once. Approved by Heikki.
-
marko authored
an incorrect value. This is to track down Mantis issue#63 and issue#65. buf_LRU_block_remove_hashed_page(), buf_flush_init_for_writing(): dump the compressed page before ut_error.
-
marko authored
added in r2554. When this function is called on an empty new_block, "ret" will always point to the page infimum.
-
marko authored
ut_a(ret_pos > 0) that was added to page_copy_rec_list_end() in r2552, as suggested by Sunny in Mantis issue#52.
-
- 01 Aug, 2008 3 commits
- 30 Jul, 2008 1 commit
-
-
inaam authored
Fixes a race in recovery where the recovery thread recovering a PREPARED trx and the background rollback thread can both try to free the trx after its status is set to COMMITTED_IN_MEMORY. trx->is_recovered flag was introduced in r2040. Reviewed by: Sunny
-
- 29 Jul, 2008 1 commit
-
-
inaam authored
This fix makes two basic changes in blob handling: (The bug was introduced in r2252) 1) The blob prefixes are no longer stored in the undo if a) We are modifying a delete marked record and b) The record was delete marked by an already committed trx. 2) When building old row version to check if one of these versions can hold an implicit lock on the record we stop our probe if a) The version is delete marked and b) The delete marking is done by a trx which is different from the current active trx on the record. Reviewed by: Heikki
-
- 21 Jul, 2008 1 commit
-
-
sunny authored
explicit BEGIN.
-
- 15 Jul, 2008 2 commits
-
-
inaam authored
Fixed a mistake in r2539 where I changed UNIV_INLINE to UNIV_INTERN for the wrong function in btr0sea.h
-
inaam authored
------------------------------------------------------------------------ r2537 | inaam | 2008-07-15 20:46:03 +0300 (Tue, 15 Jul 2008) | 12 lines branches/5.1 issue# 4 Fixed a timing hole where a thread dropping an index can free the in-memory index struct while another thread is still using that structure to remove entries from adaptive hash index belonging to one of the pages that belongs to the index being dropped. The fix is to have a reference counter in the index struct and to wait for this counter to drop to zero beforing freeing the struct. Reviewed by: Heikki ------------------------------------------------------------------------
-
- 04 Jul, 2008 1 commit
-
-
vasil authored
Fix the failing innodb-index test by adjusting the result to a new MySQL behavior. The author of the behavioral change Davi Arnaut <davi@mysql.com>, BZR-r2667: http://bazaar.launchpad.net/~mysql/mysql-server/mysql-5.1/revision/davi%40mysql.com-20080617141221-8yre8ys9j4uw3xx5?start_revid=joerg%40mysql.com-20080630105418-7qoe5ehomgrcdb89 has been asked if this change is intended: http://lists.mysql.com/internals/35805 Regardless of the answer we need to adjust to the new behavior to get the test to succeed. If they switch back, then we will revert this commit.
-
- 03 Jul, 2008 2 commits
-
-
calvin authored
Add a space in a warning message. No functional change to the code. The original message is "invalid innodb_file_format_checkvalue;...". The new one is "invalid innodb_file_format_check value;..."
-
calvin authored
Fixes issue# 51 - by removing the negative test cases that produce warnings. The warnings cause mysql-test-run to fail. Those negative test cases will be moved to separate test/result files. Approved by: Sunny
-
- 02 Jul, 2008 1 commit
-
-
vasil authored
Disable part of innodb-index test because MySQL changed its behavior and is not calling ::add_index() anymore in the following ALTER TABLE: CREATE TABLE t (a INT) ENGINE=INNODB; INSERT INTO t VALUES (NULL); ALTER TABLE t ADD PRIMARY KEY (a); -- adding primary index on non-NULL column Previously, in ALTER TABLE, MySQL would call ::add_index() which would fail with a "primary key cannot contain NULL" error. The change occured in: mysql-5.1$ bzr log -v -r2667 ------------------------------------------------------------ revno: 2667 committer: Davi Arnaut <davi@mysql.com> branch nick: 33873-5.1 timestamp: Tue 2008-06-17 11:12:21 -0300 message: Bug#33873: Fast ALTER TABLE doesn't work with multibyte character sets The problem was that when comparing tables for a possible fast alter table, the comparison was being performed using the parsed information and not the final definition. The solution is to use the possible final table layout to compare if a fast alter is possible or not. modified: mysql-test/include/mix1.inc mysql-test/r/alter_table.result mysql-test/r/innodb_mysql.result mysql-test/t/alter_table.test sql/sql_table.cc mysql-5.1$
-
- 01 Jul, 2008 1 commit
-
-
vasil authored
------------------------------------------------------------------------ r2519 | sunny | 2008-06-26 16:55:43 +0300 (Thu, 26 Jun 2008) | 5 lines branches/5.1: Add test cases and fix a bug where the last AUTOINC cached value was not reset to 0 when the table was truncated. Bug #37531 : After truncate, auto_increment behaves incorrectly for InnoDB ------------------------------------------------------------------------ r2520 | vasil | 2008-06-26 17:38:02 +0300 (Thu, 26 Jun 2008) | 7 lines branches/5.1: Fix Bug#36941 Performance problem in ha_print_info (SHOW INNODB STATUS) by disabling some of the code in ha_print_info() in production builds. Approved by: Heikki (via IM) ------------------------------------------------------------------------ r2521 | vasil | 2008-06-26 17:39:01 +0300 (Thu, 26 Jun 2008) | 8 lines branches/5.1: Fix Bug#36942 Performance problem in lock_get_n_rec_locks (SHOW INNODB STATUS) by not calling lock_get_n_rec_locks() from lock_print_info_summary() on production builds. Approved by: Heikki (via IM) ------------------------------------------------------------------------ r2524 | vasil | 2008-07-01 10:37:34 +0300 (Tue, 01 Jul 2008) | 29 lines branches/5.1: Merge a change from MySQL (this fixes the failing innodb-replace test): revno: 2659 committer: Mattias Jonsson <mattiasj@mysql.com> branch nick: b31210-51-bugteam timestamp: Tue 2008-06-03 13:25:41 +0200 message: Bug#31210: INSERT DELAYED crashes server when used on partitioned tables Problem was an unclear error message since it could suggest that MyISAM did not support INSERT DELAYED. Changed the error message to say that DELAYED is not supported by the table, instead of the table's storage engine. The confusion is that a partitioned table is in somewhat sense using the partitioning storage engine, which in turn uses the ordinary storage engine. By saying that the table does not support DELAYED we do not give any extra informantion about the storage engine or if it is partitioned. modified: mysql-test/r/innodb-replace.result mysql-test/t/innodb-replace.test mysql-test/t/merge.test mysql-test/t/partition_hash.test sql/share/errmsg.txt sql/sql_insert.cc ------------------------------------------------------------------------
-
- 26 Jun, 2008 1 commit
-
-
sunny authored
-