An error occurred fetching the project authors.
- 17 Jul, 2006 1 commit
-
-
igor@rurik.mysql.com authored
-
- 15 Jul, 2006 2 commits
-
-
igor@rurik.mysql.com authored
The bug caused a crash of the server if a subquery with ORDER BY DESC used the range access method. The bug happened because the method QUICK_SELECT_DESC::reset was not reworked after MRR interface had been introduced.
-
igor@olga.mysql.com authored
The bug was due to a loss happened during a refactoring made on May 30 2005 that modified the function JOIN::reinit. As a result of it for any subquery the value of offset_limit_cnt was not restored for the following executions. Yet the first execution of the subquery made it equal to 0. The fix restores this value in the function JOIN::reinit.
-
- 14 Jul, 2006 1 commit
-
-
igor@olga.mysql.com authored
DESCRIBE returned the type BIGINT for a column of a view if the column was specified by an expression over values of the type INT. E.g. for the view defined as follows: CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1 DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are columns of the INT type. At the same time DESCRIBE returned type INT for the only column of the table defined by the statement: CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1. This inconsistency was removed by the patch. Now the code chooses between INT/BIGINT depending on the precision of the aggregated column type. Thus both DESCRIBE commands above returns type INT for v1 and t2.
-
- 11 Jul, 2006 1 commit
-
-
evgen@moonbone.local authored
may return a wrong result. An Item_sum_hybrid object has the was_values flag which indicates whether any values were added to the sum function. By default it is set to true and reset to false on any no_rows_in_result() call. This method is called only in return_zero_rows() function. An ALL/ANY subquery can be optimized by MIN/MAX optimization. The was_values flag is used to indicate whether the subquery has returned at least one row. This bug occurs because return_zero_rows() is called only when we know that the select will return zero rows before starting any scans but often such information is not known. In the reported case the return_zero_rows() function is not called and the was_values flag is not reset to false and yet the subquery return no rows Item_func_not_all and Item_func_nop_all functions return a wrong comparison result. The end_send_group() function now calls no_rows_in_result() for each item in the fields_list if there is no rows were found for the (sub)query.
-
- 10 Jul, 2006 1 commit
-
-
evgen@moonbone.local authored
The ALL/ANY subqueries are the subject of MIN/MAX optimization. The matter of this optimization is to embed MIN() or MAX() function into the subquery in order to get only one row by which we can tell whether the expression with ALL/ANY subquery is true or false. But when it is applied to a subquery like 'select a_constant' the reported bug occurs. As no tables are specified in the subquery the do_select() function isn't called for the optimized subquery and thus no values have been added to a MIN()/MAX() function and it returns NULL instead of a_constant. This leads to a wrong query result. For the subquery like 'select a_constant' there is no reason to apply MIN/MAX optimization because the subquery anyway will return at most one row. Thus the Item_maxmin_subselect class is more appropriate for handling such subqueries. The Item_in_subselect::single_value_transformer() function now checks whether tables are specified for the subquery. If no then this subselect is handled like a UNION using an Item_maxmin_subselect object.
-
- 27 Jun, 2006 1 commit
-
-
kroki@mysql.com authored
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT statement from internal structures based on value set later at runtime, not the original value set by the user. The solution is to remember that original value.
-
- 25 May, 2006 1 commit
-
-
gkodinov@mysql.com authored
The unsigned flag in Item was not propagated through the single value subqueries. This caused the result to be treated as signed.
-
- 17 May, 2006 1 commit
-
-
evgen@moonbone.local authored
The convert_constant_item() function converts constant items to ints on prepare phase to optimize execution speed. In this case it tries to evaluate subselect which contains a derived table and is contained in a derived table. All derived tables are filled only after all derived tables are prepared. So evaluation of subselect with derived table at the prepare phase will return a wrong result. A new flag with_subselect is added to the Item class. It indicates that expression which this item represents is a subselect or contains a subselect. It is set to 0 by default. It is set to 1 in the Item_subselect constructor for subselects. For Item_func and Item_cond derived classes it is set after fixing any argument in Item_func::fix_fields() and Item_cond::fix_fields accordingly. The convert_constant_item() function now doesn't convert a constant item if the with_subselect flag set in it.
-
- 11 May, 2006 1 commit
-
-
gkodinov@mysql.com authored
When a view statement is compiled on CREATE VIEW time, most of the optimizations should not be done. Finding the right optimization for a subquery is one of them. Unfortunately the optimizer is resolving the column references of the left expression of IN subqueries in the process of deciding witch optimization to use (if needed). So there should be a special case in Item_in_subselect::fix_fields() : check the validity of the left expression of IN subqueries in CREATE VIEW mode and then proceed as normal.
-
- 10 May, 2006 1 commit
-
-
sergefp@mysql.com authored
Re-work best_access_path() and find_best() to reuse E(#rows(range access)) as E(#rows(ref[_or_null](const) access) only when it is appropriate. [This is the final cumulative patch]
-
- 03 May, 2006 1 commit
-
-
igor@rurik.mysql.com authored
This performance degradation was due to the fact that some cost evaluation code added into 4.1 in the function find_best was not merged into the code of the function best_access_path added together with other code for greedy optimizer. Added a parameter to the function print_plan. The parameter contains accumulated cost for a given partial join. The patch does not include a special test case since this performance degradation is hard to reproduse with a simple example. TODO: make the function find_best use the function best_access_path in order to remove duplication of code which might result in incomplete merges in the future.
-
- 28 Apr, 2006 1 commit
-
-
gkodinov@lsmy3.wdf.sap.corp authored
In the code that converts IN predicates to EXISTS predicates it is changing the select list elements to constant 1. Example : SELECT ... FROM ... WHERE a IN (SELECT c FROM ...) is transformed to : SELECT ... FROM ... WHERE EXISTS (SELECT 1 FROM ... HAVING a = c) However there can be no FROM clause in the IN subquery and it may not be a simple select : SELECT ... FROM ... WHERE a IN (SELECT f(..) AS c UNION SELECT ...) This query is transformed to : SELECT ... FROM ... WHERE EXISTS (SELECT 1 FROM (SELECT f(..) AS c UNION SELECT ...) x HAVING a = c) In the above query c in the HAVING clause is made to be an Item_null_helper (a subclass of Item_ref) pointing to the real Item_field (which is not referenced anywhere else in the query anymore). This is done because Item_ref_null_helper collects information whether there are NULL values in the result. This is OK for directly executed statements, because the Item_field pointed by the Item_null_helper is already fixed when the transformation is done. But when executed as a prepared statement all the Item instances are "un-fixed" before the recompilation of the prepared statement. So when the Item_null_helper gets fixed it discovers that the Item_field it points to is not fixed and issues an error. The remedy is to keep the original select list references when there are no tables in the FROM clause. So the above becomes : SELECT ... FROM ... WHERE EXISTS (SELECT c FROM (SELECT f(..) AS c UNION SELECT ...) x HAVING a = c) In this way c is referenced directly in the select list as well as by reference in the HAVING clause. So it gets correctly fixed even with prepared statements. And since the Item_null_helper subclass of Item_ref_null_helper is not used anywhere else it's taken out.
-
- 01 Apr, 2006 1 commit
-
-
igor@rurik.mysql.com authored
Multiple equalities were not adjusted after reading constant tables. It resulted in neglecting good index based methods that could be used to access of other tables.
-
- 23 Mar, 2006 1 commit
-
-
ramil@mysql.com authored
-
- 13 Mar, 2006 1 commit
-
-
evgen@sunlight.local authored
When there is conjunction of conds, the substitute_for_best_equal_field() will call the eliminate_item_equal() function in loop to build final expression. But if eliminate_item_equal() finds that some cond will always evaluate to 0, then that cond will be substituted by Item_int with value == 0. In this case on the next iteration eliminate_item_equal() will get that Item_int and treat it as Item_cond. This is leads to memory corruption and server crash on cleanup phase. To the eliminate_item_equal() function was added DBUG_ASSERT for checking that all items treaten as Item_cond are really Item_cond. The substitute_for_best_equal_field() now checks that if eliminate_item_equal() returns Item_int and it's value is 0 then this value is returned as the result of whole conjunction.
-
- 24 Feb, 2006 1 commit
-
-
monty@mysql.com authored
(Needed for "list of pushes" web page and autopush)
-
- 17 Feb, 2006 1 commit
-
-
jimw@mysql.com authored
-
- 14 Feb, 2006 1 commit
-
-
igor@rurik.mysql.com authored
A subquery transformation changes the HAVING clause of the embedding query if the subquery contains a GROUP BY clause. Yet the split_sum_func2 function was not applied to the modified HAVING clause. This could result in wrong answers.
-
- 15 Oct, 2005 2 commits
-
-
igor@rurik.mysql.com authored
allowed set functions aggregated in outer subqueries, allowed nested set functions.
-
hf@deer.(none) authored
-
- 12 Oct, 2005 2 commits
-
-
guilhem@mysql.com authored
-
grog@mysql.com authored
Bug #10308: Parse 'purge master logs' with subselect correctly. subselect.test: Bug #10308: Test for 'purge master logs' with subselect. subselect.result: Bug #10308: Test result for 'purge master logs' with subselect.
-
- 23 Aug, 2005 1 commit
-
-
timour@mysql.com authored
* Provide backwards compatibility extension to name resolution of coalesced columns. The patch allows such columns to be qualified with a table (and db) name, as it is in 4.1. Based on a patch from Monty. * Adjusted tests accordingly to test both backwards compatible name resolution of qualified columns, and ANSI-style resolution of non-qualified columns. For this, each affected test has two versions - one with qualified columns, and one without.
-
- 19 Aug, 2005 1 commit
-
-
bell@sanja.is.com.ua authored
-
- 16 Aug, 2005 2 commits
-
-
igor@rurik.mysql.com authored
Added missing drop statement subselect.test: Added missing drop statement.
-
igor@rurik.mysql.com authored
Fixed bug #11479. The JOIN::reinit method cannot call setup_tables after the optimization phase since this function removes some optimization settings for joined tables. E.g. it resets values of the null_row flag to 0. subselect.result, subselect.test: Added a test case for bug #11479.
-
- 13 Aug, 2005 2 commits
-
-
sanja@hasky.mysql.fi authored
postmerge fix subselect.result: new 5.0 result (postmerge)
-
bell@50.0.168.192.in-addr.arpa authored
-
- 12 Aug, 2005 1 commit
-
-
timour@mysql.com authored
"Process NATURAL and USING joins according to SQL:2003". * Some of the main problems fixed by the patch: - in "select *" queries the * expanded correctly according to ANSI for arbitrary natural/using joins - natural/using joins are correctly transformed into JOIN ... ON for any number/nesting of the joins. - column references are correctly resolved against natural joins of any nesting and combined with arbitrary other joins. * This patch also contains a fix for name resolution of items inside the ON condition of JOIN ... ON - in this case items must be resolved only against the JOIN operands. To support such 'local' name resolution, the patch introduces a stack of name resolution contexts used at parse time. NOTICE: - This patch is not complete in the sense that - there are 2 test cases that still do not pass - one in join.test, one in select.test. Both are marked with a comment "TODO: WL#2486". - it does not include a new test specific for the task
-
- 08 Aug, 2005 2 commits
-
-
igor@rurik.mysql.com authored
Added a test case for bug #12392. item_cmpfunc.cc: Fixed bug #12392. Missing handling of rows containing NULL components when evaluating IN predicates caused a crash.
-
monty@mysql.com authored
- Fixed some error condtion when handling dates with 'T' - Added extra test for bug #11867 (Wrong result with "... WHERE ROW( a, b ) IN ( SELECT DISTINCT a, b WHERE ...)" to show it's not yet fixed - Safety fixes and cleanups
-
- 07 Aug, 2005 2 commits
-
-
igor@rurik.mysql.com authored
Correction after manual merge.
-
igor@rurik.mysql.com authored
Added test case for bug #11867. Fixed results for two existing test cases. subselect.test: Added test case for bug #11867. item_subselect.cc: Fixed bug #11867. Added missing code in Item_in_subselect::row_value_transformer that caused problems for queries with ROW(elems) IN (SELECT DISTINCT cols FROM ...).
-
- 30 Jul, 2005 1 commit
-
-
evgen@moonbone.local authored
Item_type_holder doesn't store information about length and exact type of original item which results in redefining length to max_length and geometry type to longtext. Changed the way derived tables except unions are built. Now they are created from original field list instead of list of Item_type_holder.
-
- 12 Jul, 2005 1 commit
-
-
sergefp@mysql.com authored
MAX(field).
-
- 23 Jun, 2005 2 commits
-
-
bell@sanja.is.com.ua authored
-
igor@rurik.mysql.com authored
Fixed buf #11487. Added a call of QUICK_RANGE_SELECT::init to the QUICK_RANGE_SELECT::reset method. Without it the second evaluation of a subquery employing the range access failed. subselect.result, subselect.test: Added a test case for bug #11487.
-
- 20 May, 2005 2 commits
-
-
monty@mysql.com authored
-
bell@sanja.is.com.ua authored
-