summaryrefslogtreecommitdiff
path: root/sql/sql_expression_cache.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
|\
| * Update FSF addressMichal Schorm2019-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | Correct FSF addressiangilfillan2017-03-101-1/+1
| |
* | MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cacheSergei Petrunia2015-07-011-16/+18
| | | | | | | | | | | | | | Fixes over the original patch: - Fix variable/class/other names - Fix the JSON output to be in line with the output of other JSON constructs we produce
* | MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cacheOleksandr Byelkin2015-06-301-1/+47
|/
* fix the include guards and add missing gplv2 headersSergei Golubchik2012-02-171-0/+16
|
* Early check of subquery cache hit rate added to limit its performance impact ↵unknown2011-08-121-0/+1
| | | | | | | | | | in the worst case. sql/sql_expression_cache.cc: Early check of subquery cache hit rate added to limit its performance impact in the worst case. Disabling cache moved to method. sql/sql_expression_cache.h: Disabling cache moved to method.
* Subquery cache going on disk management fix: Do not go on disk if hit rate ↵unknown2011-07-281-0/+2
| | | | | | | | | | is not good. sql/sql_expression_cache.cc: Do not go on disk if hit rate is not good. Local hit/miss counters added. sql/sql_expression_cache.h: Local hit/miss counters added.
* Fixed LP BUG#800696.unknown2011-07-191-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that optimizer removes some outer references (it they are constant for example) and the list of outer items built during prepare phase is not actual during execution phase when we need it as the cache parameters. First solution was use pointer on pointer on outer reference Item and initialize temporary table on demand. This solved most problem except case when optimiser also reduce Item which contains outer references ('OR' in this bug test suite). The solution is to build the list of outer reference items on execution phase (after optimization) on demand (just before temporary table creation) by walking Item tree and finding outer references among Item_ident (Item_field/Item_ref) and Item_sum items. Removed depends_on list (because it is not neede any mnore for the cache, in the place where it was used it replaced with upper_refs). Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references (or other expression parameters in future). mysql-test/r/subselect_cache.result: A new test added. mysql-test/r/subselect_scache.result: Changes in creating the cache and its paremeters order or adding arguments of aggregate function (which is a parameter also, but this has no influence on the result). mysql-test/t/subselect_cache.test: Added a new test. sql/item.cc: depends_on removed. Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references. Item_cache_wrapper collect parameters befor initialization of its cache. sql/item.h: depends_on removed. Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references. sql/item_cmpfunc.cc: depends_on removed. Added processor (collect_outer_ref_processor) to collect outer references. sql/item_cmpfunc.h: Added processor (collect_outer_ref_processor) to collect outer references. sql/item_subselect.cc: depends_on removed. Added processor get_cache_parameters() method to collect outer references. sql/item_subselect.h: depends_on removed. Added processor get_cache_parameters() method to collect outer references. sql/item_sum.cc: Added processor (collect_outer_ref_processor) method to collect outer references. sql/item_sum.h: Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references. sql/opt_range.cc: depends_on removed. sql/sql_base.cc: depends_on removed. sql/sql_class.h: New iterator added. sql/sql_expression_cache.cc: Build of list of items resolved in outer query done just before creating expression cache on the first execution of the subquery which removes influence of optimizer removing items (all optimization already done). sql/sql_expression_cache.h: Build of list of items resolved in outer query done just before creating expression cache on the first execution of the subquery which removes influence of optimizer removing items (all optimization already done). sql/sql_lex.cc: depends_on removed. sql/sql_lex.h: depends_on removed. sql/sql_list.h: Added add_unique method to add only unique elements to the list. sql/sql_select.cc: Support of new Item list added. sql/sql_select.h: Support of new Item list added.
* Type of the variables fixed.unknown2010-10-271-1/+1
| | | | | | | sql/sql_expression_cache.cc: Type of the variable fixed. sql/sql_expression_cache.h: Type of the variable fixed.
* (no commit message)unknown2010-09-081-3/+0
|
* Fixed LP BUG#615760: Check on double cache assignment added into the ↵unknown2010-09-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | transformation methods. Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/compare.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/group_by.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect3.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect3_jcl6.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect4.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect_cache.result: Added test suite for LP BUG#615760 mysql-test/r/subselect_mat.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect_no_mat.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect_no_opts.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect_no_semijoin.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect_sj.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/r/subselect_sj_jcl6.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/suite/pbxt/r/subselect.result: Cache parameters print added in EXPLAIN EXTENDED output. mysql-test/t/subselect_cache.test: Cache parameters print added in EXPLAIN EXTENDED output. sql/item.cc: Item::set_expr_cache result fixed according to its description. Cache parameters print added in EXPLAIN EXTENDED output. sql/item.h: Cache parameters print added in EXPLAIN EXTENDED output. sql/item_cmpfunc.cc: Check on double cache assignment added into the transformation methods. sql/item_cmpfunc.h: Check on double cache assignment added into the transformation methods. sql/item_subselect.cc: Check on double cache assignment added into the transformation methods. sql/item_subselect.h: Check on double cache assignment added into the transformation methods. sql/sql_expression_cache.cc: Cache parameters print added. sql/sql_expression_cache.h: Cache parameters print added. sql/sql_select.cc: Removed unused method (now it is impossible to make double transformation with the cache). sql/sql_select.h: Removed unused method.
* Subquery cache (MWL#66) added.unknown2010-07-101-0/+80
libmysqld/Makefile.am: The new file added. mysql-test/r/index_merge_myisam.result: subquery_cache optimization option added. mysql-test/r/myisam_mrr.result: subquery_cache optimization option added. mysql-test/r/subquery_cache.result: The subquery cache tests added. mysql-test/r/subselect3.result: Subquery cache switched off to avoid changing read statistics. mysql-test/r/subselect3_jcl6.result: Subquery cache switched off to avoid changing read statistics. mysql-test/r/subselect_no_mat.result: subquery_cache optimization option added. mysql-test/r/subselect_no_opts.result: subquery_cache optimization option added. mysql-test/r/subselect_no_semijoin.result: subquery_cache optimization option added. mysql-test/r/subselect_sj.result: subquery_cache optimization option added. mysql-test/r/subselect_sj_jcl6.result: subquery_cache optimization option added. mysql-test/t/subquery_cache.test: The subquery cache tests added. mysql-test/t/subselect3.test: Subquery cache switched off to avoid changing read statistics. sql/CMakeLists.txt: The new file added. sql/Makefile.am: The new files added. sql/item.cc: Expression cache item (Item_cache_wrapper) added. Item_ref and Item_field fixed for correct usage of result field and fast resolwing in SP. sql/item.h: Expression cache item (Item_cache_wrapper) added. Item_ref and Item_field fixed for correct usage of result field and fast resolwing in SP. sql/item_cmpfunc.cc: Subquery cache added. sql/item_cmpfunc.h: Subquery cache added. sql/item_subselect.cc: Subquery cache added. sql/item_subselect.h: Subquery cache added. sql/item_sum.cc: Registration of subquery parameters added. sql/mysql_priv.h: subquery_cache optimization option added. sql/mysqld.cc: subquery_cache optimization option added. sql/opt_range.cc: Fix due to subquery cache. sql/opt_subselect.cc: Parameters of the function cahnged. sql/procedure.h: .h file guard added. sql/sql_base.cc: Registration of subquery parameters added. sql/sql_class.cc: Option to allow add indeces to temporary table. sql/sql_class.h: Item iterators added. Option to allow add indeces to temporary table. sql/sql_expression_cache.cc: Expression cache for caching subqueries added. sql/sql_expression_cache.h: Expression cache for caching subqueries added. sql/sql_lex.cc: Registration of subquery parameters added. sql/sql_lex.h: Registration of subqueries and subquery parameters added. sql/sql_select.cc: Subquery cache added. sql/sql_select.h: Subquery cache added. sql/sql_union.cc: A new parameter to the function added. sql/sql_update.cc: A new parameter to the function added. sql/table.cc: Procedures to manage temporarty tables index added. sql/table.h: Procedures to manage temporarty tables index added. storage/maria/ha_maria.cc: Fix of handler to allow destoy a table in case of error during the table creation. storage/maria/ha_maria.h: .h file guard added. storage/myisam/ha_myisam.cc: Fix of handler to allow destoy a table in case of error during the table creation.