- 18 Feb, 2011 1 commit
-
-
Michael Widenius authored
Fix for lp:711565 "Index Condition Pushdown can make a thread hold MyISAM locks as well as be unKILLable for long time" - In Maria/MyISAM: Release/re-acquire locks to give queries that wait on them a chance to make progress - In Maria/MyISAM: Change from numeric constants to ICP_RES values. - In Maria: Do check index condition in maria_rprev() (was lost in the merge/backport?) - In Maria/MyISAM/XtraDB: Check if the query was killed, and return immediately if it was. Added new storage engine error: HA_ERR_ABORTED_BY_USER, for handler to signal that it detected a kill of the query and aborted Authors: Sergey Petrunia & Monty include/my_base.h: Added HA_ERR_ABORTED_BY_USER, for handler to signal that it detected a kill of the query and aborted include/my_handler.h: Added comment mysql-test/r/myisam_icp.result: Updated test mysql-test/t/myisam_icp.test: Drop used tables at start of test Added test case that can help with manual testing of killing index condition pushdown query. mysys/my_handler_errors.h: Text for new storage engine error sql/handler.cc: If engine got HA_ERR_ABORTED_BY_USER, send kill message. sql/multi_range_read.cc: Return error code storage/maria/ha_maria.cc: Added ma_killed_in_mariadb() to detect kill. Ensure that file->external_ref points to TABLE object. storage/maria/ma_extra.c: Dummy test-if-killed for standalone storage/maria/ma_key.c: If ma_check_index_cond() fails, set my_errno and info->cur_row.lastpos storage/maria/ma_rkey.c: Release/re-acquire locks to give queries that wait on them a chance to make progress Check if the query was killed, and return immediately if it was storage/maria/ma_rnext.c: Check if the query was killed, and return immediately if it was Added missing fast_ma_writeinfo(info) storage/maria/ma_rnext_same.c: Check if the query was killed, and return immediately if it was Added missing fast_ma_writeinfo(info) storage/maria/ma_rprev.c: Check if the query was killed, and return immediately if it was Added missing fast_ma_writeinfo(info) and ma_check_index_cond() storage/maria/ma_search.c: Give error message if we find a wrong key storage/maria/ma_static.c: Added pointer to test-if-killed function storage/maria/maria_def.h: New prototypes storage/myisam/ha_myisam.cc: Added mi_killed_in_mariadb() Ensure that file->external_ref points to TABLE object. storage/myisam/mi_extra.c: Dummy test-if-killed for standalone storage/myisam/mi_key.c: If ma_check_index_cond() fails, set my_errno and info->lastpos storage/myisam/mi_rkey.c: Ensure that info->lastpos= HA_OFFSET_ERROR in case of error Release/re-acquire locks to give queries that wait on them a chance to make progress Check if the query was killed, and return immediately if it was Reorder code to do less things in case of error. Added missing fast_mi_writeinfo() storage/myisam/mi_rnext.c: Check if the query was killed, and return immediately if it was Simplify old ICP code Added missing fast_ma_writeinfo(info) storage/myisam/mi_rnext_same.c: Check if the query was killed, and return immediately if it was Added missing fast_mi_writeinfo(info) storage/myisam/mi_rprev.c: Check if the query was killed, and return immediately if it was Simplify error handling of ICP Added missing fast_mi_writeinfo(info) storage/myisam/mi_search.c: Give error message if we find a wrong key storage/myisam/mi_static.c: Added pointer to test-if-killed function storage/myisam/myisamdef.h: New prototypes storage/xtradb/handler/ha_innodb.cc: Added DB_SEARCH_ABORTED_BY_USER and ha_innobase::is_thd_killed() Check if the query was killed, and return immediately if it was storage/xtradb/handler/ha_innodb.h: Added prototype storage/xtradb/include/db0err.h: Added DB_SEARCH_ABORTED_BY_USER storage/xtradb/include/row0mysql.h: Added possible ICP errors storage/xtradb/row/row0sel.c: Use ICP errors instead of constants. Detect if killed and return B_SEARCH_ABORTED_BY_USER
-
- 07 Feb, 2011 1 commit
-
-
Igor Babaev authored
-
- 06 Feb, 2011 1 commit
-
-
Igor Babaev authored
with the test case added by this patch. The bug cannot be reproduced with the same test case for the main 5.3 tree because the backported fix for bug 59696 masks the problem that causes the crash in the mentioned test case. It's not clear weather this fix masks this problem in all possible cases. Anyway the patch for bug 698882 introduced some inconsistent data structures that could contain indirect references to deleted object. It happened when two Item_equal objects were merged and the Item_field list of the second object was joined to such list of the first object. This operation required adjustment of the backward pointers in Item fields from the joined list. However the adjustment was missing and this caused crashes in the tree for mwl#128. Now the backward pointers are set only when Item_equal items are completely built and are not changed anymore.
-
- 01 Feb, 2011 2 commits
-
-
Vladislav Vaintroub authored
* declaration in the middle of the block in C file. * round() is only available in C99.
-
Igor Babaev authored
The patch fixed the following optimizer defect: when performing substitution for best equal fields into where conditions to be able to do their evaluations as soon as possible the optimizer skipped conditions over views. That could lead to suboptimal execution of queries that used views. Slightly changed the test case to demonstrate the performance improvements if this fix.
-
- 29 Jan, 2011 1 commit
-
-
Igor Babaev authored
-
- 28 Jan, 2011 1 commit
-
-
Igor Babaev authored
This bug could manifest itself when hash join over a varchar column with NULL values in some rows was used. It happened because the function key_buf_cmp erroneously returned FALSE when one of the joined key fields was null while the second was not. Also fixed two other bugs in the functions key_hashnr and key_buf_cmp that could possibly lead to wrong results for some queries that used hash join over several columns with nulls. Also reverted the latest addition of the test case for bug #45092. It had been already backported earlier.
-
- 27 Jan, 2011 1 commit
-
-
Igor Babaev authored
This was another bug in the patch for bug 698882. The new code from this patch did not ensured that substitutions of fields for best equal fields were performed on all AND-OR levels. As a result substitutions for best fields in some predicates that had been used by the range optimizer were not actually performed while range plans could employ these substitutions. This could lead to inconsistent data structures and ultimately to a crash.
-
- 26 Jan, 2011 1 commit
-
-
Igor Babaev authored
The bug was in the code of the patch fixing bug 698882. With improper casting the method store_key_field::change_source_field was called for the elements of the array TABLE_REF::key_copy that were either of a different type or not allocated at all. This caused crashes in some queries.
-
- 24 Jan, 2011 1 commit
-
-
Igor Babaev authored
hash join over equi-join conditions without supporting indexes.
-
- 23 Jan, 2011 2 commits
-
-
Igor Babaev authored
-
Igor Babaev authored
of sort_intersect scans.
-
- 22 Jan, 2011 3 commits
-
-
Igor Babaev authored
-
Igor Babaev authored
-
Igor Babaev authored
hash join over equi-join conditions without supporting indexes.
-
- 21 Jan, 2011 1 commit
-
-
unknown authored
-
- 14 Jan, 2011 10 commits
-
-
Sergei Golubchik authored
(incorrect block size)
-
Sergei Golubchik authored
-
Sergei Golubchik authored
(less not-needed copies of key pages) storage/maria/ma_rkey.c: Fixed wrong test if SEARCH_SAVE_BUFF should be set. Now we assume that if we are doing HA_READ_KEY_EXACT, we don't have to copy the last key buffer (in other words, it's not likely this will be followed by a read-next call)
-
Sergei Golubchik authored
Aria and MyISAM in create_internal_tmp_table_from_heap() (safe, as duplicates are impossible). This gives a HUGE speed boost! sql/opt_subselect.cc: Fixed problem with wrong recinfo in create_duplicate_weedout_tmp_tabl() Tagged the table with 'no_rows' so that when we create the table on disk, we only store the index data. This gave us a major speedup! sql/sql_select.cc: create_tmp_table_from_heap() now uses bulk_insert + repair_by_sort when creating Aria/MyISAM tables from HEAP tables. This gives a HUGE speed boost! storage/maria/ha_maria.cc: Extended bulk_insert() to recreate UNIQUE keys for internal temporary tables storage/maria/ma_open.c: Initialize m_info->lock.type properly for temporarly tables (needed for start_bulk_insert()) storage/maria/ma_write.c: Don't check uniques that are disabled storage/myisam/ha_myisam.cc: Extended bulk_insert() to recreate UNIQUE keys for internal temporary tables.
-
Sergei Golubchik authored
This will also enable us in the future to collect statistics for writes to internal tmp tables. sql/handler.h: Added ha_write_tmp_row() sql/opt_subselect.cc: ha_write_row -> ha_write_tmp_row sql/sql_class.h: Added ha_write_tmp_row() sql/sql_select.cc: ha_write_row -> ha_write_tmp_row
-
Sergei Golubchik authored
This makes the keys smaller (no row pointer) and gives us proper errors if we use the table wrongly. sql/sql_select.cc: Use NO_RECORD for tables that doesn't need row data. storage/maria/Makefile.am: Added ma_norec.c storage/maria/ma_check.c: Added support for NO_RECORD record format (don't store any row data) storage/maria/ma_norec.c: Added support for NO_RECORD record format storage/maria/ma_open.c: Added support for NO_RECORD record format storage/maria/ma_search.c: Added support for 0 size row pointers (used with NO_RECORD) storage/maria/ma_test1.c: Added testing of NO_RECORD record format. storage/maria/maria_chk.c: Added support for NO_RECORD storage/maria/maria_def.h: Added support for NO_RECORD storage/maria/unittest/ma_test_all-t: Added testing of NO_RECORD record format
-
Sergei Golubchik authored
temptables, not "uniques", that are hash-based keys. sql/sql_expression_cache.cc: Don't set uniques (we don't want or need an unique constraint on this table)
-
Sergei Golubchik authored
This was needed as the old code caused us to have LOTS of duplicate hash values when used by optimizer. include/m_ctype.h: Made my_hash_sort_bin() exernal storage/maria/ma_unique.c: Better hash for packed numeric data for unique handling. This was needed as the old code caused us to have LOTS of duplicate hash values when used by optimizer.
-
Sergei Golubchik authored
-
Sergei Golubchik authored
mysys/my_handler.c: Fixed typo
-
- 17 Jan, 2011 2 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
- 16 Jan, 2011 1 commit
-
-
Igor Babaev authored
-
- 15 Jan, 2011 4 commits
-
-
Igor Babaev authored
-
Igor Babaev authored
Made sure that the optimal fields are used by TABLE_REF objects when building index access keys to joined tables. Fixed a bug in the template function that sorts the elements of a list using the bubble sort algorithm. The bug caused poor performance of the function. Also added an optimization that skips comparison with the most heavy elements that has been already properly placed in the list. Made the comparison of the fields belonging to the same Item_equal more granular: fields belonging to the same table are also ordered according to some rules.
-
Igor Babaev authored
-
Igor Babaev authored
An assertion failure was triggered for a 6-way join query that used two join buffers. The failure happened because every call of JOIN_CACHE::join_matching_records saved and restored status of all tables that were accessed before the table join_tab. It must do it only for those of them that follow the last table using a join buffer.
-
- 14 Jan, 2011 7 commits
-
-
Sergey Petrunya authored
- Backport testcases - We have a different fix because we've fixed part of the problem as part of fix for LPBUG#602574.
-
Sergey Petrunya authored
Backport testcase: BUG#45863 "Assertion failed: (fixed == 0), function fix_fields(), file item.cc, line 4448" (The fix was backported with subquery code backport)
-
Sergey Petrunya authored
3150 Olav Sandstaa 2010-05-07 Test cases for the following "ICP for InnoDB" bugs: Bug#40992 InnoDB: Crash when engine_condition_pushdown is on Bug#35080 Innodb crash at mem_block_get_len line 72 Bug#41996 multi-table delete crashes server (InnoDB table) Bug#43448 Server crashes on multi table delete with Innodb All these bugs are duplicates of either one or both of Bug 43360 or 36981. (backporting of olav@sun.com-20100226091930-qxvakxmcp6463t5w)
-
Sergey Petrunya authored
Test case backport for: Bug#42580 - Innodb's ORDER BY ..LIMIT returns no rows for null-safe operator <=> NULL
-
Sergey Petrunya authored
-
Sergey Petrunya authored
(the bug itself was fixed during the subquery code backport)
-
Sergey Petrunya authored
-