summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Implementation of MWL#172: Add support for prepared statements to HANDLER READMichael Widenius2011-01-0445-466/+1110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It includes speed optimizations for HANDLER READ by caching as much as possible in HANDLER OPEN Other things: - Added mysqld option --disable-thr-alarm to be able to benchmark things without thr_alarm - Changed 'Locked' state to 'System lock' and 'Table lock' (these where used in the code but never shown to end user) - Better error message if mysql_install_db.sh fails - Moved handler function prototypes to sql_handler.h - Remove not anymore used 'thd->locked' member include/thr_alarm.h: Added my_disable_thr_alarm include/thr_lock.h: Add new member to THR_LOCK_DATA to remember original lock type state. This is needed as thr_unlock() resets type to TL_UNLOCK. mysql-test/include/check_no_concurrent_insert.inc: Locked -> Table lock mysql-test/include/handler.inc: Locked -> Table lock mysql-test/r/handler_innodb.result: Updated results for new tests mysql-test/r/handler_myisam.result: Updated results for new tests mysql-test/r/sp-threads.result: Locked -> Table lock mysql-test/suite/binlog/t/binlog_stm_row.test: Locked -> Table lock mysql-test/suite/funcs_1/datadict/processlist_val.inc: Locked -> Table lock mysql-test/suite/pbxt/t/lock_multi.test: Locked -> Table lock mysql-test/suite/sys_vars/r/concurrent_insert_func.result: Locked -> Table lock mysql-test/suite/sys_vars/t/concurrent_insert_func.test: Locked -> Table lock mysql-test/suite/sys_vars/t/delayed_insert_limit_func.test: Locked -> Table lock mysql-test/suite/sys_vars/t/query_cache_wlock_invalidate_func.test: Locked -> Table lock mysql-test/suite/sys_vars/t/sql_low_priority_updates_func.test: Locked -> Table lock mysql-test/t/insert_notembedded.test: Locked -> Table lock mysql-test/t/lock_multi.test: Locked -> Table lock mysql-test/t/merge-big.test: Locked -> Table lock mysql-test/t/multi_update.test: Locked -> Table lock mysql-test/t/query_cache_28249.test: Locked -> Table lock mysql-test/t/sp_notembedded.test: Locked -> Table lock mysql-test/t/sp_sync.test: Locked -> Table lock mysql-test/t/status.test: Locked -> Table lock mysql-test/t/trigger_notembedded.test: Locked -> Table lock mysys/thr_alarm.c: Added option to disable thr_alarm mysys/thr_lock.c: Detect loops scripts/mysql_install_db.sh: Give better error message if something goes wrong sql/Makefile.am: Added sql_handler.h sql/lock.cc: Split functions to allow one to cache value if store_lock() (for HANDLER functions). - Split mysql_lock_tables() into two functions, where first one allocates MYSQL_LOCK and other other one uses it. - Made get_lock_data() an external function. - Added argument to mysql_unlock_tables() to not free sql_lock. - Added argument to reset_lock_data() to reset lock structure to initial state (as after get_lock_data()) sql/mysql_priv.h: Moved handler function prototypes to sql_handler.h Added new lock functions. sql/mysqld.cc: Added --thread-alarm startup option sql/net_serv.cc: Don't call vio_blocking() if not needed sql/sql_base.cc: include sql_handler.h sql/sql_class.cc: include sql_handler.h Remove not anymore used 'thd->locked' member sql/sql_class.h: Remove not anymore used 'thd->locked' member sql/sql_db.cc: include sql_handler.h sql/sql_delete.cc: include sql_handler.h sql/sql_handler.cc: Rewrote all code to use SQL_HANDLER instead of TABLE_LIST (original interface) Rewrote mysql_ha_open() to cache all things from TABLE_LIST and items for field list, where etc. In mysql_ha_open() also cache MYSQL_LOCK structure from get_lock_data(). Split functions into smaller sub functions (needed to be able to implement mysql_ha_read_prepare()) Added mysql_ha_read_prepare() to allow one to prepare HANDLER READ. sql/sql_handler.h: Interface to sql_handler.cc sql/sql_parse.cc: include sql_handler.h sql/sql_prepare.cc: Added mysql_test_handler_read(), prepare for HANDLER READ sql/sql_rename.cc: include sql_handler.h sql/sql_show.cc: Removed usage of thd->locked sql/sql_table.cc: include sql_handler.h sql/sql_trigger.cc: include sql_handler.h
* MergeIgor Babaev2010-12-253-3/+82
|\
| * Fixed LP bug#694092.Igor Babaev2010-12-243-2/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the function make_cond_for_index() was mistaken when detecting index only pushdown conditions for a table: a pushdown condition that was not index only could be marked as such. It happened because the procedure erroneously used the markers for index only conditions that remained from the calls of this function that extracted the index conditions for other tables. Fixed by erasing index only markers as soon as they are need anymore.
* | MergeIgor Babaev2010-12-249-28/+466
|\ \ | |/ |/|
| * Fixed LP bug #670380.Igor Babaev2010-12-229-28/+469
| | | | | | | | | | Lifted the limitation that hash join could not be used over varchar fields with non-binary collation.
* | Fix compile error on Windows: instead of round(X) use floor(X+0.5)Sergey Petrunya2010-12-221-1/+1
| |
* | MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-2142-525/+3231
|\ \ | |/ |/| | | - Merge with 5.3-main
| * BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join bufferSergey Petrunya2010-12-202-11/+30
| | | | | | | | | | - Fixes for the second fix: take into account case where we don't need to save/restore the scan.
| * BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join bufferSergey Petrunya2010-12-192-63/+33
| | | | | | | | | | | | | | Switch from "Disable identical key handling optimization when IndexConditionPushdown is used" approach To an approach where we save/restore index tuple and so can use index condition pushdown.
| * Fix a compiler warning on sparc32Sergey Petrunya2010-12-171-0/+7
| |
| * Small code cleanupsSergey Petrunya2010-12-172-3/+3
| |
| * Better commentsSergey Petrunya2010-12-161-6/+8
| |
| * MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-162-30/+26
| | | | | | | | | | - Address Monty's review feedback, portion 3
| * MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-163-75/+67
| | | | | | | | - Address Monty's review feedback, portion 2
| * - Fix compiler warningSergey Petrunya2010-12-152-1/+8
| | | | | | | | - Better warnings
| * MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-135-24/+21
| | | | | | | | - Address review feedback: change return type of RANGE_SEQ_IF::next()
| * Merge DS-MRR/CPK improvements into 5.3-mainSergey Petrunya2010-12-1341-508/+3224
| |\
| | * Fix crashes on sparc-32 bit: use memcpy when we need to access non-aligned Sergey Petrunya2010-12-101-8/+16
| | | | | | | | | | | | pointers.
| | * BUG#671340: Diverging results in with mrr_sort_keys=ON|OFF and ↵Sergey Petrunya2010-12-094-2/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | join_cache_level=5 - Make Mrr_ordered_index_reader() save the rowid across scan interruptions Also - Fix compiler warning for setup_buffer_sizes() - Add commented key_copy/key_restore for better handling of a similar issue with index record being destroyed by scan interruption (which causes incorrect evaluation of pushed index condition later on).
| | * BUG#623315: Query returns less rows when run with join_cache_level=6 on ↵Sergey Petrunya2010-12-022-0/+97
| | | | | | | | | | | | | | | | | | maria-5.3-dsmrr-cpk - Testcase (but iself is no longer repeatable)
| | * BUG#623300: Query with join_cache_level = 6 returns extra rows in ↵Sergey Petrunya2010-12-022-0/+169
| | | | | | | | | | | | | | | | | | maria-5.3-dsmrr-cpk - Testcase (the bug itself was fixed by development on BKA side)
| | * MWL#121-125 DS-MRR improvementsSergey Petrunya2010-12-022-100/+108
| | | | | | | | | | | | | | | | | | - Address Monty's review feedback, part 6: rename "handler *h" variable in all DS-MRR classes to something else.
| | * Update .result file (checked)Sergey Petrunya2010-12-021-1/+1
| | |
| | * MergeSergey Petrunya2010-12-0210-164/+206
| | |\
| | | * MWL#121-125 DS-MRR improvements Sergey Petrunya2010-12-0210-164/+206
| | | | | | | | | | | | | | | | | | | | - Address Monty's review feedback, part 5
| | * | Make suite/optimizer_unfixed_bugs/t/bug43617.test work with --ps-protocolSergey Petrunya2010-11-302-6/+4
| | | | | | | | | | | | | | | | | | | | - dodge some bug in mysql-test-run that makes it to consider multiple statements as one (most likely it doesn't understand quotes in /* comments */)
| | * | Make suite/optimizer_unfixed_bugs/t/bug43618.test work in any timezone.Sergey Petrunya2010-11-292-0/+6
| | |/
| | * Make suite/optimizer_unfixed_bugs/t/bug43617.test work in any timezone.Sergey Petrunya2010-11-292-1/+7
| | |
| | * Merge maria-5.3-mwl128 -> maria-5.2-mwl128-dsmrr-cpkSergey Petrunya2010-11-298-1395/+1822
| | |\
| | * | Fix trivial error in previous pushSergey Petrunya2010-11-291-3/+1
| | | |
| | * | Fix buildbot failure: keep rowid_buf_elem_size to its original value, otherwise Sergey Petrunya2010-11-281-3/+4
| | | | | | | | | | | | | | | | subsequent asserts have the wrong meaning.
| | * | Fix trivial error Sergey Petrunya2010-11-261-1/+2
| | | |
| | * | Fix buildbot failureSergey Petrunya2010-11-262-3/+14
| | | |
| | * | Merge MWL#121-125 DS-MRR improvements Sergey Petrunya2010-11-252-18/+30
| | | | | | | | | | | | | | | | | | | | - Address Monty's review feedback, part 4
| | * | MWL#121-125 DS-MRR improvementsSergey Petrunya2010-11-232-55/+57
| | | | | | | | | | | | | | | | - Address Monty's review feedback, part 3
| | * | MWL#121-125 DS-MRR improvementsSergey Petrunya2010-11-225-55/+87
| | | | | | | | | | | | | | | | | | | | - Address Monty's review feedback, part 1 - Fix buildbot failure
| | * | Merge MWL#121-125 DS-MRR improvements Sergey Petrunya2010-11-225-26/+28
| | | | | | | | | | | | | | | | - Address Monty's review feedback, part 1
| | * | Remove .moved filesSergey Petrunya2010-11-153-582/+0
| | | |
| | * | Merge MWL#121-125 DS-MRR improvements into MWL#128 Classic hash join treeSergey Petrunya2010-11-1538-452/+3122
| | |\ \
| | | * | BUG#671361: virtual int Mrr_ordered_index_reader::refill_buffer(): Assertion ↵Sergey Petrunya2010-11-094-6/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `!know_key_tuple_params - Make sure we have enough space for both rowids and keys.
| | | * | Add optimizer_unfixed_bugs tests/results to the list of installed filesSergey Petrunya2010-11-091-1/+3
| | | | |
| | | * | Merge in: Include optimizer_unfixed_bugs testsuite in buildbot runsSergey Petrunya2010-11-092-2/+4
| | | |\ \
| | | | * | Include optimizer_unfixed_bugs testsuite in buildbot runsSergey Petrunya2010-11-092-2/+4
| | | | | |
| | | * | | BUG#670417: Diverging results in maria-5.3-mwl128-dsmrr-cpk with join ↵Sergey Petrunya2010-11-084-1/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer, attempt 4 - Disable identical key handling optimization when IndexConditionPushdown is used
| | | * | | DS-MRR improvementsSergey Petrunya2010-11-082-61/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Code cleanup - Always propagate the error code we got from storage engine all the way up
| | | * | | Merge {DS-DRR improvements:code cleanup} into MWL#128+DS-MRR treeSergey Petrunya2010-11-032-209/+126
| | | |\ \ \ | | | | |/ /
| | | | * | Code cleanupSergey Petrunya2010-11-032-58/+76
| | | | | |
| | | | * | Code cleanupSergey Petrunya2010-11-022-155/+54
| | | | | |
| | | * | | Address problems uncovered by buildbotSergey Petrunya2010-11-025-34/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Update test results - Handle the case where MRR implementation doesn't get any key tuples at all
| | | * | | Post-merge fixes#2:Sergey Petrunya2010-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - A certain problem with NULLs filtering was solved in two different ways. Use MWL#128's approach (it's more generic) and rollback DS-MRR's.