An error occurred fetching the project authors.
- 05 Mar, 2011 1 commit
-
-
Sergey Petrunya authored
- put the code that sets HA_NULL_PART bit back - Fix test_if_ref/part_of_refkey() so that = NULL-ability of lookup columns does not prevent the equality from being removed (we now have early/late NULLs filtering which will filter out NULL values) = equality is not removed if it is ref_or_null access, and the value of the lookup column can alternate between the lookup value and NULL.
-
- 13 Jan, 2011 1 commit
-
-
Sergey Petrunya authored
Date: Mon, 01 Nov 2010 15:15:25 -0000 3272 Roy Lyseng 2010-11-01 Bug#52068: Optimizer generates invalid semijoin materialization plan When MaterializeScan semijoin strategy was used and there were one or more outer dependent tables before the semijoin tables, the scan over the materialized table was not properly reset for each row of the prefix outer tables. Example: suppose we have a join order: ot1 SJ-Mat-Scan(it2 it3) ot4 Notice that this is called a MaterializeScan, even though there is an outer table ahead of the materialized tables. Usually a MaterializeScan has the outer tables after the materialized table, but this is a special (but legal) case with outer dependent tables both before and after the materialized table. For each qualifying row from ot1, a new scan over the materialized table must be set up. The code failed to do that, so all scans after the first one returned zero rows from the materialized table.
-
- 03 Nov, 2010 1 commit
-
-
Igor Babaev authored
plans or wrong results due to the fact that JOIN_CACHE functions ignored the possibility of interleaving materialized semijoin tables with tables whose records were stored in join buffers. This fixes would become mostly unnecessary if the new code of mwl 90 was merged into 5.3 right now. Yet the fix the code of optimize_wo_join_buffering was needed in any case.
-
- 18 Oct, 2010 2 commits
-
-
Igor Babaev authored
about the employed join algorithms. Refactored constructors of the JOIN_CACHE* classes.
-
Sergey Petrunya authored
- Fix a crash in nested semi-join subquery processing
-
- 12 Oct, 2010 1 commit
-
-
Sergey Petrunya authored
-
- 28 Sep, 2010 1 commit
-
-
Igor Babaev authored
Applied the fix for bug #47217 from the mysql-6.0 codebase. The patch adds not null predicates generated for the left parts of the equality predicates used for ref accesses. This is done for such predicates both in where conditions and on conditions. For the where conditions the not null predicates were generated but in 5.0/5.1 they actually never were used due to some lame merge from 4.1 to 5.0. The fix for bug #47217 made these predicates to be used in the condition pushed to the tables. Yet only this patch generates not null predicates for equality predicated from on conditions of outer joins. This patch introduces a performance regression that can be observed on a test case from null_key.test. The regression will disappear after the fix for bug #57024 from mariadb-5.1 is pulled into mariadb-5.3. The patch contains many changes in the outputs of the EXPLAIN commands since generated not null predicates are considered as parts of the conditions pushed to join tables and may add 'Usingwhere' in some rows of EXPLAINs where there used to be no such comments.
-
- 06 Sep, 2010 1 commit
-
-
unknown authored
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.
-
- 31 Aug, 2010 1 commit
-
-
unknown authored
mysql-test/r/compare.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/explain.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/group_by.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect3.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect3_jcl6.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect4.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect_mat.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect_no_mat.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect_no_opts.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect_no_semijoin.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect_sj.result: Expression cache added to EXPLAIN EXTENDED output. mysql-test/r/subselect_sj_jcl6.result: Expression cache added to EXPLAIN EXTENDED output. sql/item.h: Expression cache added to EXPLAIN EXTENDED output.
-
- 16 Jul, 2010 1 commit
-
-
Sergey Petrunya authored
- Let "mysqld --help --verbose" list all optimizer options - Make it possible to add new @@optimizer_switch flags w/o causing .result changes all over the testsuite: = Remove "select @@optimizer_switch" from tests that do not need all switches = Move @@optimizer_switch-specific tests to t/optimizer_switch.test
-
- 10 Jul, 2010 1 commit
-
-
unknown authored
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.
-
- 26 Jun, 2010 1 commit
-
-
Sergey Petrunya authored
5.3 had handler::index_only_read_time(uint keynr, double records) while 5.2 got: handler::keyread_read_time(uint index, uint ranges, ha_rows rows) which causes floor()'ing of rows parameter, which makes all further costs different.
-
- 11 Mar, 2010 1 commit
-
-
unknown authored
This patch does three things: - It adds the possibility to force the execution of top-level [NOT] IN subquery predicates via the IN=>EXISTS transformation. This is done by setting both optimizer switches partial_match_rowid_merge and partial_match_table_scan to "off". - It adjusts all test cases where the complete optimizer_switch is selected because now we have two more switches. - For those test cases where the plan changes because of the new available strategies, we switch off both partial match strategies in order to force the "old" IN=>EXISTS strategy. This is done because most of these test cases specifically test bugs in this strategy. sql/opt_subselect.cc: Adds the possibility to force the execution of top-level [NOT] IN subquery predicates via the IN=>EXISTS transformation. This is done by setting both optimizer switches partial_match_rowid_merge and partial_match_table_scan to "off".
-
- 21 Feb, 2010 1 commit
-
-
Sergey Petrunya authored
for table elimination in debug builds.
-
- 17 Feb, 2010 2 commits
-
-
Sergey Petrunya authored
-
Sergey Petrunya authored
-
- 17 Jan, 2010 2 commits
-
-
Sergey Petrunya authored
- Fix valgrind failure - Test result fixes (not finished)
-
Sergey Petrunya authored
There are still test failures because of: - Wrong query results in outer join + semi join - EXPLAIN output differences
-
- 23 Dec, 2009 1 commit
-
-
Georgi Kodinov authored
subselect_single_select_engine::exec() When a subquery doesn't need to be evaluated because it returns only aggregate functions and these aggregates can be calculated from the metadata about the table it was not updating all the relevant members of the JOIN structure to reflect that this is a constant query. This caused problems to the enclosing subquery ('<> SOME' in the test case above) trying to read some data about the tables. Fixed by setting const_tables to the number of tables when the SELECT is optimized away.
-
- 19 Jan, 2010 1 commit
-
-
Georgi Kodinov authored
-
- 18 Jan, 2010 1 commit
-
-
Georgi Kodinov authored
error in the query. Fixes a leak after materializing a GROUP BY subquery to a temp table when the subquery has a blob column in the SELECT list. Fixed by correctly destructing temporary buffers after doing the conversion.
-
- 02 Feb, 2010 1 commit
-
-
Georgi Kodinov authored
error in the query. Fixes a leak after materializing a GROUP BY subquery to a temp table when the subquery has a blob column in the SELECT list. Fixed by correctly destructing temporary buffers for re-usable queries
-
- 15 Dec, 2009 3 commits
-
-
Georgi Kodinov authored
int join_read_key(JOIN_TAB*) The eq_ref access method TABLE_REF (accessed through JOIN_TAB) to save state and to track if this is the first row it finds or not. This state was not reset on subquery re-execution causing an assert. Fixed by resetting the state before the subquery re-execution.
-
Georgi Kodinov authored
int join_read_key(JOIN_TAB*) The eq_ref access method TABLE_REF (accessed through JOIN_TAB) to save state and to track if this is the first row it finds or not. This state was not reset on subquery re-execution causing an assert. Fixed by resetting the state before the subquery re-execution.
-
Sergey Petrunya authored
WL#2474 "Multi Range Read: Change the default MRR implementation to implement new MRR interface" WL#2475 "Batched range read functions for MyISAM/InnoDb" "Index condition pushdown for MyISAM/InnoDB" Igor's fix from sp1r-igor@olga.mysql.com-20080330055902-07614: There could be observed the following problems: 1. EXPLAIN did not mention pushdown conditions from on expressions in the 'extra' column. As a result if a query had no where conditions pushed down to a table, but had on conditions pushed to this table the 'extra' column in the EXPLAIN for the table missed 'using where'. 2. Conditions for ref access were not eliminated from on expressions though such conditions were eliminated from the where condition.
-
- 25 Nov, 2009 2 commits
-
-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 3181 > revision-id: alexey.kopytov@sun.com-20091016201951-fsht0wm8xn8vkzsx > parent: joerg@mysql.com-20091016164025-kb4sbrggq5o7zufc > committer: Alexey Kopytov <Alexey.Kopytov@Sun.com> > branch nick: mysql-5.1-bugteam > timestamp: Sat 2009-10-17 00:19:51 +0400 > message: > Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN > > The problem was in incorrect handling of predicates involving > NULL as a constant value by the range optimizer. > > For example, when creating a SEL_ARG node from a condition of > the form "field < const" (which would normally result in the > "NULL < field < const" SEL_ARG), the special case when "const" > is NULL was not taken into account, so "NULL < field < NULL" > was produced for the "field < NULL" condition. > > As a result, SEL_ARG structures of this form could not be > further optimized which in turn could lead to incorrectly > constructed SEL_ARG trees. In particular, code assuming SEL_ARG > structures to always form a sequence of ordered disjoint > intervals could enter an infinite loop under some > circumstances. > > Fixed by changing get_mm_leaf() so that for any sargable > predicate except "<=>" involving NULL as a constant, "empty" > SEL_ARG is returned, since such a predicate is always false.
-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 1810.3961.6 > revision-id: joro@sun.com-20091030094044-quadg0bwjy7cwqzw > parent: joro@sun.com-20091029152429-ks55fhrp4lhknyij > committer: Georgi Kodinov <joro@sun.com> > branch nick: B48293-5.0-bugteam > timestamp: Fri 2009-10-30 11:40:44 +0200 > message: > Bug #48293: crash with procedure analyse, view with > 10 columns, > having clause... > > The fix for bug 46184 was not very complete. It was not covering > views using temporary tables and multiple tables in a FROM clause. > Fixed by reverting the fix for 46184 and making a more general > check that is checking at the right execution stage and for all > of the non-supported cases. > Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden. > Updated the analyse.test and subselect.test accordingly.
-
- 03 Nov, 2009 1 commit
-
-
Kristofer Pettersson authored
-
- 30 Oct, 2009 1 commit
-
-
Georgi Kodinov authored
having clause... The fix for bug 46184 was not very complete. It was not covering views using temporary tables and multiple tables in a FROM clause. Fixed by reverting the fix for 46184 and making a more general check that is checking at the right execution stage and for all of the non-supported cases. Now PROCEDURE ANALYZE on non-top level SELECT is also forbidden. Updated the analyse.test and subselect.test accordingly.
-
- 16 Oct, 2009 1 commit
-
-
Alexey Kopytov authored
The problem was in incorrect handling of predicates involving NULL as a constant value by the range optimizer. For example, when creating a SEL_ARG node from a condition of the form "field < const" (which would normally result in the "NULL < field < const" SEL_ARG), the special case when "const" is NULL was not taken into account, so "NULL < field < NULL" was produced for the "field < NULL" condition. As a result, SEL_ARG structures of this form could not be further optimized which in turn could lead to incorrectly constructed SEL_ARG trees. In particular, code assuming SEL_ARG structures to always form a sequence of ordered disjoint intervals could enter an infinite loop under some circumstances. Fixed by changing get_mm_leaf() so that for any sargable predicate except "<=>" involving NULL as a constant, "empty" SEL_ARG is returned, since such a predicate is always false. mysql-test/r/partition_pruning.result: Fixed a broken test case. mysql-test/r/range.result: Added a test case for bug #47123. mysql-test/r/subselect.result: Fixed a broken test cases. mysql-test/t/range.test: Added a test case for bug #47123. sql/opt_range.cc: Fixed get_mm_leaf() so that for any sargable predicate except "<=>" involving NULL as a constant, "empty" SEL_ARG is returned, since such a predicate is always false.
-
- 30 Sep, 2009 2 commits
-
-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 2796 > revision-id: sergey.glukhov@sun.com-20090827102219-sgjz0v5t1rfccs14 > parent: joro@sun.com-20090824122803-1d5jlaysjc7a7j6q > committer: Sergey Glukhov <Sergey.Glukhov@sun.com> > branch nick: mysql-5.0-bugteam > timestamp: Thu 2009-08-27 15:22:19 +0500 > message: > Bug#46184 Crash, SELECT ... FROM derived table procedure analyze > The crash happens because select_union object is used as result set > for queries which have derived tables. > select_union use temporary table as data storage and if > fields count exceeds 10(count of values for procedure ANALYSE()) > then we get a crash on fill_record() function.
-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 2791.2.3 > revision-id: joro@sun.com-20090827114042-h55n7qp9990bl6ge > parent: anurag.shekhar@sun.com-20090831073231-e55y1hsck6n08ux8 > committer: Georgi Kodinov <joro@sun.com> > branch nick: B46749-5.0-bugteam > timestamp: Thu 2009-08-27 14:40:42 +0300 > message: > Bug #46749: Segfault in add_key_fields() with outer subquery level > field references > > This error requires a combination of factors : > 1. An "impossible where" in the outermost SELECT > 2. An aggregate in the outermost SELECT > 3. A correlated subquery with a WHERE clause that includes an outer > field reference as a top level WHERE sargable predicate > > When JOIN::optimize detects an "impossible WHERE" it will bail out > without doing the rest of the work and initializations. It will not > call make_join_statistics() as well. And make_join_statistics fills > in various structures for each table referenced. > When processing the result of the "impossible WHERE" the query must > send a single row of data if there are aggregate functions in it. > In this case the server marks all the aggregates as having received > no rows and calls the relevant Item::val_xxx() method on the SELECT > list. However if this SELECT list happens to contain a correlated > subquery this subquery is evaluated in a normal evaluation mode. > And if this correlated subquery has a reference to a field from the > outermost "impossible where" SELECT the add_key_fields will mistakenly > consider the outer field reference as a "local" field reference when > looking for sargable predicates. > But since the SELECT where the outer field reference refers to is not > completely initialized due to the "impossible WHERE" in this level > we'll get a NULL pointer reference. > Fixed by making a better condition for discovering if a field is "local" > to the SELECT level being processed. > It's not enough to look for OUTER_REF_TABLE_BIT in this case since > for outer references to constant tables the Item_field::used_tables() > will return 0 regardless of whether the field reference is from the > local SELECT or not.
-
- 22 Sep, 2009 2 commits
-
-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 3092.1.2 [merge] > revision-id: joro@sun.com-20090831134035-wndnw04gy8kzogpm > parent: anurag.shekhar@sun.com-20090831075609-tkpqu41hxtupdeip > parent: joro@sun.com-20090827114042-h55n7qp9990bl6ge > committer: Georgi Kodinov <joro@sun.com> > branch nick: B46749-5.1-bugteam > timestamp: Mon 2009-08-31 16:40:35 +0300 > message: > automerge > ------------------------------------------------------------ > Use --include-merges or -n0 to see merged revisions.
-
MySQL Build Team authored
> ------------------------------------------------------------ > revno: 3085 [merge] > revision-id: sergey.glukhov@sun.com-20090827105925-j56pdghdzb8nlw3p > parent: alfranio.correia@sun.com-20090827093227-9exafl3k6362bvq7 > parent: sergey.glukhov@sun.com-20090827102219-sgjz0v5t1rfccs14 > committer: Sergey Glukhov <Sergey.Glukhov@sun.com> > branch nick: mysql-5.1-bugteam > timestamp: Thu 2009-08-27 15:59:25 +0500 > message: > 5.0-bugteam->5.1-bugteam merge > ------------------------------------------------------------ > Use --include-merges or -n0 to see merged revisions.
-
- 27 Aug, 2009 2 commits
-
-
Georgi Kodinov authored
field references This error requires a combination of factors : 1. An "impossible where" in the outermost SELECT 2. An aggregate in the outermost SELECT 3. A correlated subquery with a WHERE clause that includes an outer field reference as a top level WHERE sargable predicate When JOIN::optimize detects an "impossible WHERE" it will bail out without doing the rest of the work and initializations. It will not call make_join_statistics() as well. And make_join_statistics fills in various structures for each table referenced. When processing the result of the "impossible WHERE" the query must send a single row of data if there are aggregate functions in it. In this case the server marks all the aggregates as having received no rows and calls the relevant Item::val_xxx() method on the SELECT list. However if this SELECT list happens to contain a correlated subquery this subquery is evaluated in a normal evaluation mode. And if this correlated subquery has a reference to a field from the outermost "impossible where" SELECT the add_key_fields will mistakenly consider the outer field reference as a "local" field reference when looking for sargable predicates. But since the SELECT where the outer field reference refers to is not completely initialized due to the "impossible WHERE" in this level we'll get a NULL pointer reference. Fixed by making a better condition for discovering if a field is "local" to the SELECT level being processed. It's not enough to look for OUTER_REF_TABLE_BIT in this case since for outer references to constant tables the Item_field::used_tables() will return 0 regardless of whether the field reference is from the local SELECT or not.
-
Sergey Glukhov authored
The crash happens because select_union object is used as result set for queries which have derived tables. select_union use temporary table as data storage and if fields count exceeds 10(count of values for procedure ANALYSE()) then we get a crash on fill_record() function. mysql-test/r/analyse.result: test result mysql-test/r/subselect.result: result fix mysql-test/t/analyse.test: test case mysql-test/t/subselect.test: test fix sql/sql_yacc.yy: The crash happens because select_union object is used as result set for queries which have derived tables. select_union use temporary table as data storage and if fields count exceeds 10(count of values for procedure ANALYSE()) then we get a crash on fill_record() function.
-
- 18 Jul, 2009 1 commit
-
-
Evgeny Potemkin authored
When during the optimization an item is moved to the upper select the item's context left unchanged. This caused wrong result in the PS/SP mode. The Item_ident::remove_dependence_processor now sets the context of the select to which the item is moved to. mysql-test/r/subselect.result: The test case for the bug#46051 is adjusted. mysql-test/t/subselect.test: The test case for the bug#46051 is adjusted. sql/item.cc: Bug#46051: Incorrectly market field caused wrong result. The Item_ident::remove_dependence_processor now sets the context of the select to which the item is moved to.
-
- 16 Jul, 2009 1 commit
-
-
Evgeny Potemkin authored
In a subselect all fields from outer selects are marked as dependent on selects they are belong to. In some cases optimizer substitutes it for an equivalent expression. For example "a_field IN (SELECT outer_field)" is substituted with "a_field = outer_field". As we moved the outer_field to the upper select it's not really outer anymore. But it was left marked as outer. If exists an index over a_field optimizer choose wrong execution plan and thus return wrong result. Now the Item_in_subselect::single_value_transformer function removes dependent marking from fields when a subselect is optimized away. mysql-test/r/subselect.result: Added a test case for the bug#46051. mysql-test/t/subselect.test: Added a test case for the bug#46051. sql/item_subselect.cc: Bug#46051: Incorrectly market field caused wrong result. Now the Item_in_subselect::single_value_transformer function removes dependent marking from fields when a subselect is optimized away.
-
- 09 Jun, 2009 1 commit
-
-
Sergey Petrunia authored
- Make elimination work with aggregate functions. The problem was that aggregate functions reported all table bits in used_tables(), and that prevented table elimination. Fixed by making aggregate functions return more correct value from used_tables(). mysql-test/r/ps_11bugs.result: MWL#17: Table elimination - Update test results. The difference is because of Item_ref change: outer references to constants are now recognized as constants, too. mysql-test/r/subselect.result: - Update test results. The difference is because of Item_ref change: outer references to constants are now recognized as constants, too. mysql-test/r/table_elim.result: MWL#17: Table elimination - Check that elimination works in presense of aggreagate functions mysql-test/t/table_elim.test: MWL#17: Table elimination - Check that elimination works in presense of aggreagate functions sql/item.h: MWL#17: Table elimination - Add Item_ref::const_item() which calls (*ref)->const_item(). Before this diff Item_ref used the default implementation of const_item(){ return used_tables()==0; }. This is no longer true, as COUNT(*) now has used_tables()==0 but const_item()==FALSE. sql/item_sum.cc: MWL#17: Table elimination - Make Item_sum() and it descendants not to return all bits in used_tables(). This is needed because otherwise table elimination can't work in presense of aggregate functions - COUNT(*) now has used_tables()==0 and const_item()==FALSE. Had to change Item_ref::const_item() to account for this. sql/item_sum.h: MWL#17: Table elimination - Add comments
-
- 09 Feb, 2009 1 commit
-
-
Matthias Leich authored
Bug#42003 tests missing the disconnect of connections <> default second slice Content: 1. wait_until_count_sessions.inc - One PB run of a test using this routine failed because 5 seconds timeout were exceeded. Although I have some doubts if the assigned timeout was really too small, I increase the value to 10. We waste the additional 5 seconds only if the tests fails anyway. - Print the content of the PROCESSLIST if the poll routine fails 2. minor improvements of formatting 3. query_cache_notembedded: Activate the wait_until_count_sessions.inc routine which was unfortunately forgotten in the changeset before.
-