summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* Merge 5.5.6-rc to the main tree.Joerg Bruehe2010-09-191-0/+12
|\
| * Selective transfer of a bugfix patch into 5.5.6-rc.Joerg Bruehe2010-09-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first part is the functional change, the second is needed as a compile fix on Windows (header file order). | committer: Marc Alff <marc.alff@oracle.com> | branch nick: mysql-5.5-bugfixing-56521 | timestamp: Thu 2010-09-09 14:28:47 -0600 | message: | Bug#56521 Assertion failed: (m_state == 2), function allocated_to_free, pfs_lock.h (138) | | Before this fix, it was possible to build the server: | - with the performance schema | - with a dummy implementation of my_atomic (MY_ATOMIC_MODE_DUMMY). | | In this case, the resulting binary will just crash, | as this configuration is not supported. | | This fix enforces that the build will fail with a compilation error in this | configuration, instead of resulting in a broken binary. | committer: Tor Didriksen <tor.didriksen@oracle.com> | branch nick: 5.5-bugfixing-56521 | timestamp: Fri 2010-09-10 11:10:38 +0200 | message: | Header files should be self-contained
* | Auto-merge from mysql-5.5-merge.Alexander Nozdrin2010-08-3032-882/+862
|\ \
| * \ local mergeMarc Alff2010-08-273-25/+77
| |\ \
| | * | Bug# 53874 "SETUP_INSTRUMENTS.TIMED='NO' should not change TIMER_WAITChristopher Powers2010-08-262-19/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle combined instrument states of ENABLED and/or TIMED: ENABLED TIMED 1 1 Aggregate stats, increment counter 1 0 Increment counter 0 1 Do nothing 0 0 Do nothing storage/perfschema/pfs.cc: Aggregate stats only if state is both ENABLED and TIMED. If ENABLED but not TIMED, only increment the value counter. storage/perfschema/pfs_stat.h: Split aggregate and counter increment into separate methods for performance.
| | * | Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % ↵Alexander Barkov2010-08-261-6/+5
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 4) == 0' fai Problem: trailing spaces were stripped using 8-bit code, so the truncation result length was incorrect, which led to an assertion failure. Fix: using multi-byte safe code.
| * | Bug#55576 Two perfschema tests failed on mysql-next-mr-innodb PB2 testsMarc Alff2010-08-241-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this fix, some tests failed due to lack of instrumentation slots in the performance schema, because the default sizing was too low. Now that more code has been instrumented, the default sizing has to be adjusted to match the current instrumentation consumption. This change: - increases the number of rwlock classes from 20 to 30, - increases the number of rwlock and mutex instances to 1 million. Both are to account for the volume of data instrumented when the innodb storage engine is used (because of the innodb buffer pool). Adjusted the test output accordingly.
| * mergeChristopher Powers2010-08-202-3/+15
| |\
| | * Merge from mysql-5.5-runtime to mysql-5.5-bugfixing.Jon Olav Hauglid2010-08-201-1/+1
| | |\
| | | * Manual merge from mysql-5.5-bugfixing to mysql-5.5-runtime.Jon Olav Hauglid2010-08-1826-222/+471
| | | |\
| | | * | Bug #55547 InnoDB is not included when configuring by defaultMagne Mahre2010-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added InnoDB to the 'default' plugin group, and modified the autoconf script so the 'default' group is actually built by default. (i.e ./configure.am == ./configure.am --with-plugins=default , instead of being ./configure.am --with-plugins=none )
| | * | | Backporting Bug#32391 Character sets: crash with --character-set-serverAlexander Barkov2010-08-191-2/+14
| | | |/ | | |/| | | | | | | | | | | | | from mysql-trunk-bugfixing (5.6.1-m5) from mysql-5.5-bugfixing (5.5.6-m3).
| * | | Bug#53874, "SETUP_INSTRUMENTS.TIMED='NO' should not change TIMER_WAIT in ↵Christopher Powers2010-08-191-22/+30
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | aggregations" end_*_wait() functions now honor TIMER_STATE_UNTIMED storage/perfschema/pfs.cc: Don't aggregate stats if TIMER_STATE_UNTIMED
| * | Auto-merge from mysql-5.5.Alexander Nozdrin2010-08-181-2/+2
| |\ \
| * \ \ Merge mysql-5.5-bugfixing -> mysql-5.5-innodbVasil Dimov2010-08-1832-749/+363
| |\ \ \
| | * \ \ Auto-merge from mysql-5.5.Alexander Nozdrin2010-08-1610-23/+21
| | |\ \ \ | | | |_|/ | | |/| |
| | * | | Bug#55416 Renaming of performance_schema tables for 5.5Marc Alff2010-08-1211-641/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed table SETUP_OBJECTS. Renamed table PROCESSLIST to THREADS. Renamed table EVENTS_WAITS_SUMMARY_BY_EVENT_NAME to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME. Adjusted Makefiles, code and tests accordingly.
| * | | | A non-functional change:Marko Mäkelä2010-08-172-19/+23
| | | | | | | | | | | | | | | | | | | | | | | | | dict_load_index_low(): Rename the parameter "cached" to "allocated" and clarify the comments.
| * | | | Fix bug #53496 Use Lock_time in slow query log output for InnoDB rowJimmy Yang2010-08-173-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock wait time. Including the InnoDB lock time in the exiting "Lock_time" output.
| * | | | Fix Bug#53761 RANGE estimation for matched rows may be 200 times differentVasil Dimov2010-08-162-9/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the range estimation algorithm. Previously: For a given level the algo knows the number of pages in the requested range and the n With this change: Same idea, but peek a few (10) of the intermediate pages to get a better estimate of In the bug report one of the examples has a btree with a snippet of the leaf level li page1(899 records), page2(1 record), page3(1 record), page4(1 record) so when trying to estimate, the previous algo, assumed there are average (899+1)/2=45 Fix Bug#53761 RANGE estimation for matched rows may be 200 times different Improve the range estimation algorithm. Previously: For a given level the algo knows the number of pages in the requested range and the number of records on the leftmost and the rightmost page. Then it assumes all pages in between contain the average between the two border pages and multiplies this average number by the number of intermediate pages. With this change: Same idea, but peek a few (10) of the intermediate pages to get a better estimate of the average number of records per page. If there are less than 10 intermediate pages then all of them will be scanned and the result will be precise, not an estimation. In the bug report one of the examples has a btree with a snippet of the leaf level like this: page1(899 records), page2(1 record), page3(1 record), page4(1 record) so when trying to estimate, the previous algo, assumed there are average (899+1)/2=450 records per page which went terribly wrong. With this change page2 and page3 will be read and the exact number of records will be returned. Approved by: Sunny (rb://401)
| * | | | Change default for innodb_strict_mode to FALSE.Inaam Rana2010-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that this was originally pushed by Calvin but the was later reverted by mistake. bug#54702
| * | | | Undo changes to innodb_strict_mode that went in by mistake in r3149Inaam Rana2010-08-131-1/+1
| | | | |
| * | | | Fix bug #52263 innodb does not compile on OpenSolaris with gcc4.3.2Sunny Bains2010-08-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable the GCC visibility attribute on all sun platforms. Approved by Marko on IRC.
| * | | | Bug#54914: InnoDB: performance drop with innodb_change_buffering=allMarko Mäkelä2010-08-102-127/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce ibuf_mutex and ibuf_pessimistic_insert_mutex contention further. Protect ibuf->empty by the insert buffer root page latch, not ibuf_mutex. ibuf_tree_root_get(): Assert that ibuf_mutex is owned by the caller. Assert that the stamped page number is correct. Assert that ibuf->empty agrees with the root page. ibuf_size_update(): Do not update ibuf->empty. ibuf_init_at_db_start(): Update ibuf->empty while holding the root page latch. ibuf_add_free_page(): Return TRUE/FALSE instead of DB_SUCCESS/DB_STRONG_FAIL. ibuf_remove_free_page(): Release ibuf_pessimistic_insert_mutex as early as possible. ibuf_contract_ext(): Rely on a dirty read of ibuf->empty, unless the server is being shut down. Never acquire ibuf_mutex. Eliminate n_stored. ibuf_contract_after_insert(): Never acquire ibuf_mutex. Perform dirty reads of ibuf->size and ibuf->max_size. ibuf_insert_low(): Only acquire ibuf_mutex for mode==BTR_MODIFY_TREE. Perform dirty reads of ibuf->size and ibuf->max_size. Update ibuf->empty while holding the root page latch. ibuf_delete_rec(): Update ibuf->empty while holding the root page latch. ibuf_is_empty(): Release ibuf_mutex earlier.
| * | | | Reduce the ibuf_mutex hold time. This does not fix the updateMarko Mäkelä2010-08-091-50/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regression in Bug #54914, but it does speed up the execution for innodb_change_buffering=inserts. ibuf_add_ops(), ibuf_merge_or_delete_for_page(), ibuf_delete_for_discarded_space(): Use atomic built-ins instead of ibuf_mutex, when available. ibuf_add_free_page(), ibuf_remove_free_page(), ibuf_contract_ext(): Release ibuf_mutex earlier. ibuf_free_excess_pages(): Release ibuf_mutex before a conditional branch. ibuf_insert_low(): Release ibuf_mutex before a conditional branch. Create ibuf_entry before re-acquiring ibuf_mutex. Simplify a loop to reduce code footprint. Release ibuf_mutex before mtr_commit() [btr_pcur_close()]. ibuf_is_empty(): Release ibuf_mutex before mtr_commit().
| * | | | mergeInaam Rana2010-08-051-1/+1
| |\ \ \ \
| | * | | | Bug #54702: revert the default of innodb_strict_mode to false.Calvin Sun2010-08-031-1/+1
| | | | | |
| * | | | | Currently we do a full validation of AHI whenever check tables isInaam Rana2010-08-054-0/+10
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | called on any table. This patch fixes this by only doing this full check in debug versions. bug#55716 rb://423 approved by: Marko
| * | | | merge from parentInaam Rana2010-07-3061-609/+330
| |\ \ \ \
| * | | | | When the caller of buf_flush_list() provides us with the number ofInaam Rana2010-07-301-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pages that it wants to flush then we should honor that value as in not going beyond that in our eagerness to flush the neighbors of the selected victim.
* | | | | | Merging with mysql-5.5Mats Kindahl2010-08-231-2/+2
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | |
| * | | | | Auto-merge from mysql-5.5.Alexander Nozdrin2010-08-1614-63/+29
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| * | | | | mergeGeorgi Kodinov2010-08-052-3/+3
| |\ \ \ \ \
| | * | | | | Bug #42144: plugin_load failsGeorgi Kodinov2010-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reverted the ulong->uint diff Re-applied the first diff. The original commit message follows: enum plugin system variables are ulong internally, not int. On systems where long is not the same as an int it causes problems. Fixed by correct typecasting. Removed the test from the experimental list.
| * | | | | | Auto-merge from mysql-5.5.Alexander Nozdrin2010-08-04174-2998/+2437
| |\ \ \ \ \ \
| * \ \ \ \ \ \ mergeGeorgi Kodinov2010-08-031-1/+1
| |\ \ \ \ \ \ \ | | | |/ / / / / | | |/| | | | |
| | * | | | | | Bug #42144: plugin_load failsGeorgi Kodinov2010-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enum system variables were handled inconsistently as ints, unsigned int and unsigned long on various places. This caused problems on platforms on which sizeof(int) != sizeof(long). Fixed by homogenizing the type of the enum variables to unsigned int, since it's size compatible with the C enum type. Removed the test from the experimental list.
| | * | | | | | Merge mysql-5.1-bugteam -> mysql-5.1-innodbVasil Dimov2010-07-2927-103/+95
| | |\ \ \ \ \ \
| | * | | | | | | Fix bug #55581 by backporting fix of #52546 from mysql-trunk-innodbJimmy Yang2010-07-285-34/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to mysql-5.1-innodb plugin.
| | * | | | | | | Increment InnoDB Plugin version to 1.0.11.Vasil Dimov2010-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB Plugin 1.0.10 has been released with MySQL 5.1.49.
| | * | | | | | | Merge mysql-5.1 -> mysql-5.1-innodbVasil Dimov2010-07-2314-77/+156
| | |\ \ \ \ \ \ \
| | * | | | | | | | Port fix for bug #54311 from mysql-trunk-innodb to mysql-5.1-innodb codeline.Jimmy Yang2010-06-305-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #54311: Crash on CHECK PARTITION after concurrent LOAD DATA and adaptive_hash_index=OFF
| | * | | | | | | | Bug#54358 follow-up: Correct some error handling.Marko Mäkelä2010-06-301-6/+3
| | | | | | | | | |
| | * | | | | | | | Correct some comments that were added in the fix of Bug #54358Marko Mäkelä2010-06-302-48/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSED columns). Records that lack incompletely written externally stored columns may be accessed by READ UNCOMMITTED transaction even without involving a crash during an INSERT or UPDATE operation. I verified this as follows. (1) added a delay after the mini-transaction for writing the clustered index 'stub' record was committed (patch attached) (2) started mysqld in gdb, setting breakpoints to the where the assertions about READ UNCOMMITTED were added in the bug fix (3) invoked ibtest3 --create-options=key_block_size=2 to create BLOBs in a COMPRESSED table (4) invoked the following: yes 'set transaction isolation level read uncommitted; checksum table blobt3;select sleep(1);'|mysql -uroot test (5) noted that one of the breakpoints was triggered (return(NULL) in btr_rec_copy_externally_stored_field()) === modified file 'storage/innodb_plugin/row/row0ins.c' --- storage/innodb_plugin/row/row0ins.c 2010-06-30 08:17:25 +0000 +++ storage/innodb_plugin/row/row0ins.c 2010-06-30 08:17:25 +0000 @@ -2120,6 +2120,7 @@ function_exit: rec_t* rec; ulint* offsets; mtr_start(&mtr); + os_thread_sleep(5000000); btr_cur_search_to_nth_level(index, 0, entry, PAGE_CUR_LE, BTR_MODIFY_TREE, &cursor, 0, === modified file 'storage/innodb_plugin/row/row0upd.c' --- storage/innodb_plugin/row/row0upd.c 2010-06-30 08:11:55 +0000 +++ storage/innodb_plugin/row/row0upd.c 2010-06-30 08:11:55 +0000 @@ -1763,6 +1763,7 @@ row_upd_clust_rec( rec_offs_init(offsets_); mtr_start(mtr); + os_thread_sleep(5000000); ut_a(btr_pcur_restore_position(BTR_MODIFY_TREE, pcur, mtr)); rec = btr_cur_get_rec(btr_cur);
| | * | | | | | | | ChangeLog entry for Bug #54408Marko Mäkelä2010-06-291-0/+5
| | | | | | | | | |
| | * | | | | | | | Bug#54408: txn rollback after recovery: row0umod.c:673Marko Mäkelä2010-06-293-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dict_table_get_format(index->table) The REDUNDANT and COMPACT formats store a local 768-byte prefix of each externally stored column. No row_ext cache is needed, but we initialized one nevertheless. When the BLOB pointer was zero, we would ignore the locally stored prefix as well. This triggered an assertion failure in row_undo_mod_upd_exist_sec(). row_build(): Allow ext==NULL when a REDUNDANT or COMPACT table contains externally stored columns. row_undo_search_clust_to_pcur(), row_upd_store_row(): Invoke row_build() with ext==NULL on REDUNDANT and COMPACT tables. rb://382 approved by Jimmy Yang
| | * | | | | | | | ChangeLog entry for Bug #54358Marko Mäkelä2010-06-291-0/+7
| | | | | | | | | |
| | * | | | | | | | Bug#54358: READ UNCOMMITTED access failure of off-page DYNAMIC or COMPRESSEDMarko Mäkelä2010-06-295-17/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | columns When the server crashes after a record stub has been inserted and before all its off-page columns have been written, the record will contain incomplete off-page columns after crash recovery. Such records may only be accessed at the READ UNCOMMITTED isolation level or when rolling back a recovered transaction in recv_recovery_rollback_active(). Skip these records at the READ UNCOMMITTED isolation level. TODO: Add assertions for checking the above assumptions hold when an incomplete BLOB is encountered. btr_rec_copy_externally_stored_field(): Return NULL if the field is incomplete. row_prebuilt_t::templ_contains_blob: Clarify what "BLOB" means in this context. Hint: MySQL BLOBs are not the same as InnoDB BLOBs. row_sel_store_mysql_rec(): Return FALSE if not all columns could be retrieved. Previously this function always returned TRUE. Assert that the record is not delete-marked. row_sel_push_cache_row_for_mysql(): Return FALSE if not all columns could be retrieved. row_search_for_mysql(): Skip records containing incomplete off-page columns. Assert that the transaction isolation level is READ UNCOMMITTED. rb://380 approved by Jimmy Yang
| | * | | | | | | | Check in fix for bug #53756: "ALTER TABLE ADD PRIMARY KEY affectsJimmy Yang2010-06-281-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crash recovery" rb://369 approved by Marko
* | | | | | | | | | Merging with mysql-5.5-stage.Mats Kindahl2010-08-163-0/+16
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / |/| | | | | | | | |