An error occurred fetching the project authors.
- 02 Oct, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
-
- 28 Sep, 2007 1 commit
-
-
evgen@moonbone.local authored
The change_to_use_tmp_fields function leaves the orig_table member of an expression's tmp table field filled for the new Item_field being created. Later orig_table is used by the Field::make_field function to provide some info about original table and field name to a user. This is ok for a field but for an expression it should be empty. The change_to_use_tmp_fields function now resets orig_table member of an expression's tmp table field to prevent providing a wrong info to a user. The Field::make_field function now resets the table_name and the org_col_name variables when the orig_table is set to 0.
-
- 24 Sep, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
When storing the VIEW the CREATE VIEW command is reconstructed from the parse tree. While constructing the command string the index hints specified should also be printed. Fixed by adding code to print the index hints when printing a table in the FROM clause.
-
- 14 Sep, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
The optimizer sets index traversal in reverse order only if there are used key parts that are not compared to a constant. However using the primary key as an ORDER BY suffix rendered the check incomplete : going in reverse order must still be used even if all the parts of the secondary key are compared to a constant. Fixed by relaxing the check and set reverse traversal even when all the secondary index keyparts are compared to a const. Also account for the case when all the primary keys are compared to a constant.
-
- 28 Aug, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
Currently the Last_query_cost session status variable shows only the cost of a single flat subselect. For complex queries (with subselects or unions etc) Last_query_cost is not valid as it was showing the cost for the last optimized subselect. Fixed by reseting to zero Last_query_cost when the complete cost of the query cannot be determined. Last_query_cost will be non-zero only for single flat queries.
-
- 27 Aug, 2007 1 commit
-
-
mhansson/martin@linux-st28.site authored
The optimization that uses a unique index to remove GROUP BY, did not ensure that the index was actually used, thus violating the ORDER BY that is impled by GROUP BY. Fixed by replacing GROUP BY with ORDER BY if the GROUP BY clause contains a unique index. In case GROUP BY ... ORDER BY null is used, GROUP BY is simply removed.
-
- 25 Aug, 2007 1 commit
-
-
evgen@moonbone.local authored
Additional fix for the bug#30245.
-
- 20 Aug, 2007 1 commit
-
-
gshchepa/uchum@gleb.loc authored
The server created temporary tables for filesort in the working directory instead of the specified tmpdir directory.
-
- 17 Aug, 2007 1 commit
-
-
evgen@moonbone.local authored
HEAP tables can't index BIT fields. Due to this when grouping by such fields is needed they are converted to a fields of the LONG type when temporary table is being created. But a side effect of this is that a wrong type of BIT fields is returned to a client. Now the JOIN::prepare and the create_distinct_group functions are create additional hidden copy of BIT fields to preserve original fields untouched. New hidden fields are used for grouping instead.
-
- 15 Aug, 2007 1 commit
-
-
igor@olga.mysql.com authored
The bug caused memory corruption for some queries with top OR level in the WHERE condition if they contained equality predicates and other sargable predicates in disjunctive parts of the condition. The corruption happened because the upper bound of the memory allocated for KEY_FIELD and SARGABLE_PARAM internal structures containing info about potential lookup keys was calculated incorrectly in some cases. In particular it was calculated incorrectly when the WHERE condition was an OR formula with disjuncts being AND formulas including equalities and other sargable predicates.
-
- 31 Jul, 2007 2 commits
-
-
sergefp@mysql.com authored
- Don't call mysql_select() several times for the select that enumerates a temporary table with the results of the UNION. Making this call for every subquery execution caused O(#enumerated-rows-in-the-outer-query) memory allocations. - Instead, call join->reinit() and join->exec(), and = disable constant table detection for such joins, = provide special handling for table-less constant subqueries.
-
holyfoot/hf@mysql.com/hfmain.(none) authored
SELECT statement itself returns empty. As a result of this bug 'SELECT AGGREGATE_FUNCTION(fld) ... GROUP BY' can return one row instead of an empty result set. When GROUP BY only has fields of constant tables (with a single row), the optimizer deletes the group_list. After that we lose the information about whether we had an GROUP BY statement. Though it's important as SELECT min(x) from empty_table; and SELECT min(x) from empty_table GROUP BY y; have to return different results - the first query should return one row, second - an empty result set. So here we add the 'group_optimized_away' flag to remember this case when GROUP BY exists in the query and is removed by the optimizer, and check this flag in end_send_group()
-
- 26 Jul, 2007 1 commit
-
-
sergefp@mysql.com authored
- make ha_berkeley::cmp_ref() take into account that auto-generated PKs are stored in LSB-first order. - Remove the temporary code that made the bugfix work for innodb only
-
- 23 Jul, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
Limit the fix for bug 28591 to InnoDB only
-
- 21 Jul, 2007 1 commit
-
-
igor@olga.mysql.com authored
This bug manifested itself for join queries with GROUP BY and HAVING clauses whose SELECT lists contained DISTINCT. It occurred when the optimizer could deduce that the result set would have not more than one row. The bug could lead to wrong result sets for queries of this type because HAVING conditions were erroneously ignored in some cases in the function remove_duplicates.
-
- 20 Jul, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
ORDER BY primary_key on InnoDB table Queries that use an InnoDB secondary index to retrieve data don't need to sort in case of ORDER BY primary key if the secondary index is compared to constant(s). They can also skip sorting if ORDER BY contains both the the secondary key parts and the primary key parts (in that order). This is because InnoDB returns the rows in order of the primary key for rows with the same values of the secondary key columns. Fixed by preventing temp table sort for the qualifying queries.
-
- 12 Jul, 2007 1 commit
-
-
igor@olga.mysql.com authored
A bug in the restore_prev_nj_state function allowed interleaving inner tables of outer join operations with outer tables. With the current implementation of the nested loops algorithm it could lead to wrong result sets for queries with nested outer joins. Another bug in this procedure effectively blocked evaluation of some valid execution plans for queries with nested outer joins.
-
- 06 Jul, 2007 1 commit
-
-
kostja@bodhi.(none) authored
The need arose when working on Bug 26141, where it became necessary to replace TABLE_LIST with its forward declaration in a few headers, and this involved a lot of s/TABLE_LIST/st_table_list/. Although other workarounds exist, this patch is in line with our general strategy of moving away from typedef-ed names. Sometime in future we might also rename TABLE_LIST to follow the coding style, but this is a huge change.
-
- 29 Jun, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
query / no aggregate of subquery The optimizer counts the aggregate functions that appear as top level expressions (in all_fields) in the current subquery. Later it makes a list of these that it uses to actually execute the aggregates in end_send_group(). That count is used in several places as a flag whether there are aggregates functions. While collecting the above info it must not consider aggregates that are not aggregated in the current context. It must treat them as normal expressions instead. Not doing that leads to incorrect data about the query, e.g. running a query that actually has no aggregate functions as if it has some (and hence is expected to return only one row). Fixed by ignoring the aggregates that are not aggregated in the current context. One other smaller omission discovered and fixed in the process : the place of aggregation was not calculated for user defined functions. Fixed by calling Item_sum::init_sum_func_check() and Item_sum::check_sum_func() as it's done for the rest of the aggregate functions.
-
- 24 Jun, 2007 1 commit
-
-
igor@olga.mysql.com authored
the loose scan optimization for grouping queries was applied returned a wrong result set when the query was used with the SQL_BIG_RESULT option. The SQL_BIG_RESULT option forces to use sorting algorithm for grouping queries instead of employing a suitable index. The current loose scan optimization is applied only for one table queries when the suitable index is covering. It does not make sense to use sort algorithm in this case. However the create_sort_index function does not take into account the possible choice of the loose scan to implement the DISTINCT operator which makes sorting unnecessary. Moreover the current implementation of the loose scan for queries with distinct assumes that sorting will never happen. Thus in this case create_sort_index should not call the function filesort.
-
- 23 Jun, 2007 1 commit
-
-
gshchepa/uchum@gleb.loc authored
INSERT into table from SELECT from the same table with ORDER BY and LIMIT was inserting other data than sole SELECT ... ORDER BY ... LIMIT returns. One part of the patch for bug #9676 improperly pushed LIMIT to temporary table in the presence of the ORDER BY clause. That part has been removed.
-
- 20 Jun, 2007 1 commit
-
-
gshchepa/uchum@gleb.loc authored
For a join query with GROUP BY and/or ORDER BY and a view reference in the FROM list the metadata erroneously showed empty table aliases and database names for the view columns.
-
- 18 Jun, 2007 1 commit
-
-
mhansson/martin@linux-st28.site authored
The method select_insert::send_error does two things, it rolls back a statement being executed and outputs an error message. But when a nonexistent column is referenced, an error message has been published already and there is no need to publish another. Fixed by moving all functionality beyond publishing an error message into select_insert::abort() and calling only that function.
-
- 11 Jun, 2007 1 commit
-
-
kaa@polly.local authored
In create_tmp_table() don't set full table path as a table name. Other code assumes table names to not exceed NAME_LEN bytes.
-
- 07 Jun, 2007 1 commit
-
-
igor@olga.mysql.com authored
a temporary table has grown out of heap memory reserved for it and the remaining disk space is not big enough to store the table as a MyISAM table. The crash happens because the function create_myisam_from_heap does not handle safely the mem_root structure associated with the converted table in the case when an error has occurred.
-
- 02 Jun, 2007 1 commit
-
-
igor@olga.mysql.com authored
using a derived table over a grouping subselect. This crash happens only when materialization of the derived tables requires creation of auxiliary temporary table, for example when a grouping operation is carried out with usage of a temporary table. The crash happened because EXPLAIN EXTENDED when printing the query expression made an attempt to use the objects created in the mem_root of the temporary table which has been already freed by the moment when printing is called. This bug appeared after the method Item_field::print() had been introduced.
-
- 31 May, 2007 2 commits
-
-
kaa@polly.local authored
Problem: HASH indexes on VARCHAR columns with binary collations did not ignore trailing spaces from strings before comparisons. This could result in duplicate records being successfully inserted into a MEMORY table with unique key constraints. As a direct consequence of the above, internal MEMORY tables used for GROUP BY calculation in testcases for bug #27643 contained duplicate rows which resulted in duplicate key errors when converting those temporary tables to MyISAM. Additionally, that error was incorrectly converted to the 'table is full' error. Solution: - ignore trailing spaces in VARCHAR fields with binary collations when calculating hashes. - return a proper error from create_myisam_from_heap() when conversion fails.
-
gshchepa/uchum@gleb.loc authored
mysqld crashed when a long-running explain query was killed from another connection. When the current thread caught a kill signal executing the function best_extension_by_limited_search it just silently returned to the calling function greedy_search without initializing elements of the join->best_positions array. However, the greedy_search function ignored thd->killed status after a calls to the best_extension_by_limited_search function, and after several calls the greedy_search function used an uninitialized data from the join->best_positions[idx] to search position in the join->best_ref array. That search failed, and greedy_search tried to call swap_variables function with NULL argument - that caused a crash.
-
- 30 May, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
Integer values with 10 digits may or may not fit into an int column (e.g. 2147483647 vs 6147483647). Thus when creating a temp table column for such an int we must use bigint instead. Fixed to use bigint. Also subsituted a "magic number" with a named constant.
-
- 26 May, 2007 2 commits
-
-
igor@olga.mysql.com authored
-
igor@olga.mysql.com authored
constant outer tables did not return null complemented rows when conditions were evaluated to FALSE. Wrong results were returned because the conditions over constant outer tables, when being pushed down, were erroneously enclosed into the guard function used for WHERE conditions.
-
- 24 May, 2007 1 commit
-
-
igor@olga.mysql.com authored
CHECK OPTION and a subquery in WHERE condition. The abort was triggered by setting the value of join->tables for subqueries in the function JOIN::cleanup. This function was called after an invocation of the JOIN::join_free method for subqueries used in WHERE condition.
-
- 22 May, 2007 1 commit
-
-
gkodinov/kgeorge@magare.gmz authored
When processing the USE/FORCE index hints the optimizer was not checking if the indexes specified are enabled (see ALTER TABLE). Fixed by: Backporting the fix for bug 20604 to 5.0
-
- 21 May, 2007 1 commit
-
-
mhansson@dl145s.mysql.com authored
-
- 15 May, 2007 1 commit
-
-
igor@olga.mysql.com authored
for a query over an empty table right after its creation. The crash is the result of an attempt made by JOIN::optimize to evaluate the WHERE condition when no records have been actually read. The added test case can reproduce the crash only with InnoDB tables and only with 5.0.x.
-
- 10 May, 2007 1 commit
-
-
igor@olga.mysql.com authored
ref access to a less expensive range access. This occurred only with InnoDB tables.
-
- 04 May, 2007 3 commits
-
-
gkodinov/kgeorge@magare.gmz authored
fixed coverage of out-of-mem errors
-
gkodinov/kgeorge@magare.gmz authored
When checking for applicability of join cache we must disable its usage only if there is no temp table in use. When a temp table is used we can use join cache (and it will not make the result-set unordered) to fill the temp table. The filesort() operation is then applied to the data in the temp table and hence is not affected by join cache usage. Fixed by narrowing the condition for disabling join cache to exclude the case where temp table is used.
-
gkodinov/kgeorge@magare.gmz authored
Non-correlated scalar subqueries may get executed in EXPLAIN at the optimization phase if they are part of a right hand sargable expression. If the scalar subquery uses a temp table to materialize its results it will replace the subquery structure from the parser with a simple select from the materialization table. As a result the EXPLAIN will crash as the temporary materialization table is not to be shown in EXPLAIN at all. Fixed by preserving the original query structure right after calling optimize() for scalar subqueries with temp tables executed during EXPLAIN.
-
- 02 May, 2007 1 commit
-
-
igor@olga.mysql.com authored
'not exists' optimization is applied. In fact 'not exists' optimization did not work anymore after the patch introducing the evaluate_join_record function had been applied. Corrected the evaluate_join_record function to respect the 'not_exists' optimization.
-