summaryrefslogtreecommitdiff
path: root/mysql-test
Commit message (Collapse)AuthorAgeFilesLines
* Merge 5.2->5.3 in preparation for the release of mariadb-5.3.4-rc.Igor Babaev2012-02-0133-715/+1340
|\
| * Fixed LP bug #919427.Igor Babaev2012-01-202-0/+95
| | | | | | | | | | | | | | The function subselect_uniquesubquery_engine::copy_ref_key has to take into account that when EXPLAIN is processed the array of store_key object created for any TABLE_REF may contain elements for constant items. These items should be ignored by thefunction.
| * plugin renamed socket_peercred -> unix_socket.Sergei Golubchik2011-12-302-0/+86
| | | | | | | | test added.
| * Back-ported the test case for bug #12616253 from mariadb-5.3 thatIgor Babaev2012-01-142-0/+62
| | | | | | | | was actually a duplicate of LP bug #888456 fixed in mariadb-5.2.
| * Back-ported the fix and the test case for bug #50257 from mariadb-5.3 code line.Igor Babaev2012-01-136-14/+39
| | | | | | | | Adjusted results for a few test cases.
| * Back-ported the test cases for bug #12763207 from mysql-5.6 code line into 5.2Igor Babaev2012-01-132-0/+106
| | | | | | | | | | | | | | | | | | | | | | | | Completed the fix for this bug. Note: in 5.3 the affected 'if' statement in Item_in_subselect::single_value_transformer() starting with the condition (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) should be removed altogether. The change from table.cc is not needed either. This is because in 5.3 - min/max transformation for subqueries are done at the optimization phase - evaluation of the expensive subqueries is done at the execution phase. Added an EXPLAIN EXTENDED to the test case for bug #12329653.
| * Fixed compiler and test failures found by buildbotMichael Widenius2012-01-084-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configure.in: Added testing of STRNDUP (not found on solaris) mysql-test/include/wait_until_connected_again.inc: Also test for error 2005 (can happen on windows) mysql-test/include/wait_until_disconnected.inc: Also test for error 2005 (can happen on windows) mysql-test/suite/innodb_plugin/r/innodb_bug30423.result: Number of rows is not stable (found difference on Solaris) mysql-test/suite/innodb_plugin/t/innodb_bug30423.test: Number of rows is not stable (found difference on Solaris) plugin/auth_pam/auth_pam.c: Use internal strndup if it doesn't exist on system (solaris) Changed code so that it should also compile on solaris.
| * Fix of LP BUG#793589 Wrong result with double ORDER BYunknown2012-01-052-0/+83
| | | | | | | | Problem was in caching 'eq_ref' dependency between calls of remove_const() for ORDER BY and GROUP BY lists.
| * Merge with 5.1Michael Widenius2012-01-042-0/+23
| |\
| | * Fixed LP bug #848652.Igor Babaev2011-12-292-0/+23
| | | | | | | | | | | | The cause of this bug was the same as for bug 902356 fixed for 5.3.
| * | Fixed LP bug #806057.Igor Babaev2011-12-292-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | A table expression with a natural join or a USING clause is transformed into an equivalent expression with equi-join ON conditions. If a reference to a virtual column happened to occur only in these generated equi-join conditions then it was not erroneously marked in the TABLE::vcol_set bitmap. This could lead to wrong results for queries containing natural join expressions or USING clauses.
| * | Fixed LP bug #777654.Igor Babaev2011-12-282-0/+24
| | | | | | | | | | | | | | | The method Item_sum_num::fix_fields() calculated the value of the flag Item_sum_num::maybe_null in some cases incorrectly.
| * | Fixed LP bug #879860.Igor Babaev2011-12-272-0/+42
| | | | | | | | | | | | | | | The MIN/MAX optimization cannot be applied to a subquery if its WHERE clause contains a conjunctive condition depending on an outer reference.
| * | Fixed LP bug #904345.Igor Babaev2011-12-279-29/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MIN/MAX optimizer code from the function opt_sum_query erroneously did not take into account conjunctive conditions that did not depend on any table, yet were not identified as constant items. These could be items containing rand() or PS/SP parameters. These items are supposed to be evaluated at the execution phase. That's why if such conditions can be extracted from the WHERE condition the MIN/MAX optimization is not applied as currently it is always done at the optimization phase. (In 5.3 expensive subqueries are also evaluated only at the execution phase. So, if a constant condition with such subquery can be extracted from the WHERE clause the MIN/MAX optimization should not be applied in 5.3.) IF an IN/ALL/SOME predicate with a constant left part is transformed into an EXISTS subquery the resulting subquery should not be considered uncacheable if the right part of the predicate is not uncacheable. Backported the function dbug_print_item() from 5.3. The function is used only for debugging.
| * | Supression condition made wider to cover some other system cases.unknown2011-12-211-123/+7
| | |
| * | Fixed LP bug #794005.Igor Babaev2011-12-202-0/+27
| | | | | | | | | | | | | | | | | | The function st_table::mark_virtual_columns_for_write() did not take into account the fact that for any table the value of st_table::vfield is 0 when there are no virtual columns in the table definition.
| * | Fixed LP bug #906322.Igor Babaev2011-12-193-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the sorted table belongs to a dependent subquery then the function create_sort_index() should not clear TABLE:: select and TABLE::select for this table after the sort of the table has been performed, because these members are needed for the second execution of the subquery.
* | | sort status variables alphabetically in mysqld.ccSergei Golubchik2012-01-311-5/+0
| | |
* | | BUG#923246: Loosescan reports different result than other semijoin methodsSergey Petrunya2012-01-304-1/+103
| | | | | | | | | | | | | | | - If LooseScan is used with quick select, require that quick select produces data in key order (this disables use of MRR, which can return data in arbitrary order).
* | | Merge fix for BUG#922254Sergey Petrunya2012-01-303-0/+57
|\ \ \
| * | | BUG#922254: Assertion `0' failed at item_cmpfunc.cc:5899: Item* ↵Sergey Petrunya2012-01-273-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_equal::get_first(JOIN_TAB*, Item*) Fixed Item* Item_equal::get_first(JOIN_TAB *context, Item *field_item) to work correctly in the case where: - context!= NO_PARTICULAR_TAB, it points to a table within SJ-Materialization nest - field_item points to an item_equal that has a constant Item_field but does not have any fields from tables that are within semi-join nests.
* | | | Fixed LP bug #922971.Igor Babaev2012-01-282-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | Applied the fix for bug #12546542 from the mysql-5.6 code line: JOIN_CACHE::join_records forgot to reset JOIN_TAB::first_unmatched in some cases.
* | | | Merge.Igor Babaev2012-01-273-0/+143
|\ \ \ \
| * | | | Back-ported test cases for bug #59919 of mysql-5.6 code line. The bug couldIgor Babaev2012-01-273-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not be reproduced in the latest release of mariadb-5.3 as it was was fixed by Sergey Petrunia when working on the problems concerning outer joins within in subqueries converted to semi-joins.
* | | | | Make testcase stable by adding --sorted_result for SHOW STATUS commands.Sergey Petrunya2012-01-271-0/+5
| |/ / / |/| | |
* | | | BUG#920713: Wrong result (missing rows) with firstmatch+BNL, IN subquery, ...Sergey Petrunya2012-01-253-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Disable use of join cache when we're using FirstMatch strategy, and the join order is such that subquery's inner tables are interleaved with outer. Join buffering code is incapable of handling such join orders. - The testcase requires use of @@debug_optimizer_prefer_join_prefix to hit the bug, but I'm pushing it anyway (including the mention of the variable in .test file), so that it can be found and enabled when/if we get something comparable in the main tree.
* | | | MergeSergey Petrunya2012-01-257-1/+227
|\ \ \ \ | |/ / / |/| | |
| * | | BUG#920255: Wrong result (extra rows) with loosescan and IN subquerySergey Petrunya2012-01-253-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that LooseScan execution code assumed that tab->key holds the index used for looseScan. This is only true when range or full index scan are used. In case of ref access, the index is in tab->ref.key (and tab->index==0 which explains how LooseScan passed tests with ref access: they used one index) Fixed by setting/using loosescan_key, which always the correct index#.
| * | | Update handler status variables after the last commit.Sergey Petrunya2012-01-254-4/+14
| | | |
| * | | Add MRR counters: Handler_mrr_init, Handler_mrr_extra_rowid_sorts, Sergey Petrunya2012-01-232-0/+129
| | | | | | | | | | | | | | | | | | | | Handler_mrr_extra_key_sorts.
* | | | Back-ported test cases for bugs #54437, #55955, #52329, #57623 from subquery_sjIgor Babaev2012-01-223-0/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of mysql-5.6 code line. The bugs could not be reproduced in the latest release of mariadb-5.3 as they were fixed either when the code of subquery optimization was back-ported from mysql-6.0 or later when some other bugs were fixed.
* | | | Back-ported test cases for bugs #53060, #53305, #50358, #49453 from subquery_sjIgor Babaev2012-01-215-0/+338
|/ / / | | | | | | | | | | | | | | | of mysql-5.6 code line. The bugs could not be reproduced in the latest release of mariadb-5.3 as they were fixed either when the code of subquery optimization was back-ported from mysql-6.0 or later when some other bugs were fixed.
* | | BUG#912513: Wrong result (missing rows) with ↵Sergey Petrunya2012-01-202-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | join_cache_hashed+materialization+semijoin=on - equality substitution code was geared towards processing WHERE/ON clauses. that is, it assumed that it was doing substitions on the code that = wasn't attached to any particular join_tab yet = was going to be fed to make_join_select() which would take the condition apart and attach various parts of it to tables inside/outside semi-joins. - However, somebody added equality substition for ref access. That is, if we have a ref access on TBL.key=expr, they would do equality substition in 'expr'. This possibility wasn't accounted for. - Fixed equality substition code by adding a mode that does equality substition under assumption that the processed expression will be attached to a certain particular table TBL.
* | | BUG#912538: Wrong result (missing rows) with semijoin=on, firstmatch=on, ...Sergey Petrunya2012-01-194-4/+61
| | | | | | | | | | | | | | | - setup_semijoin_dups_elimination() would incorrectly set join_tab->do_firstmatch when the join order had outer tables interleaved with inner.
* | | MergeIgor Babaev2012-01-185-5/+36
|\ \ \
| * | | Fixed LP bug #917990.Igor Babaev2012-01-185-5/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the expression for a derived table of a query contained a LIMIT clause the estimate of the number of rows in this derived table returned by the EXPLAIN command could be badly off since the optimizer ignored the limit number from the LIMIT clause when getting the estimate. The call of the method SELECT_LEX_UNIT->set_limit added in the code of mysql_derived_optimize() will be needed also in maria-5.5 where parameters in the LIMIT clause are supported.
* | | | Adjust test results after Monty's push of the newunknown2012-01-189-5/+54
| | | | | | | | | | | | | | | | handler counter Handler_read_rnd_deleted.
* | | | Added Handler_read_rnd_deleted, number of deleted rows found with ↵Michael Widenius2012-01-1315-3/+86
|/ / / | | | | | | | | | ha_read_rnd_first.
* | | Fix for LP BUG#908269 Wrong result with subquery in select list, EXISTS, ↵unknown2012-01-106-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | constant MyISAM/Aria table. Problem: When building the condition for JOIN::outer_ref_cond the optimizer forgot to take into account that this condition could depend on constant tables as well.
* | | Merge fix for BUG#912510Sergey Petrunya2012-01-103-0/+53
|\ \ \
| * | | BUG#912510: Crash in do_copy_not_null with semijoin=ON, firstmatch=ON, ↵Sergey Petrunya2012-01-083-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | aggregate ... - Create/use do_copy_nullable_row_to_notnull() function for ref access, which is used when copying from not-NULL field in table that can be NULL-complemented to not-NULL field.
* | | | Fixed that --sorted-result in mysql-test-run also works for execMichael Widenius2012-01-092-102/+106
|/ / / | | | | | | | | | | | | | | | | | | mysql-test/r/information_schema_all_engines.result: Update result mysql-test/t/information_schema_all_engines.test: Added --sorted-results as tables in information_schema are not sorted.
* | | Fixed LP bug #910083.Igor Babaev2012-01-022-0/+84
| | | | | | | | | | | | | | | | | | The patch for bug 685411 erroneously removed a call of engine->set_thd() from Item_subselect::fix_fields().
* | | Make test results stable.Sergey Petrunya2011-12-301-0/+1
| | |
* | | Continuation of the efforts in previous cset.Sergey Petrunya2011-12-302-10/+10
| | |
* | | Make test results stable (they weren't, because filesort() used to readSergey Petrunya2011-12-292-20/+20
| | | | | | | | | | | | | | | | | | | | | from a heap temptable, which uses pointers to records (that is, byte* pointers) as rowids. This meant that for rows with the same sort key value, the order was determined by memory layout.
* | | Update test results.Sergey Petrunya2011-12-281-1/+1
| | |
* | | MergeSergey Petrunya2011-12-283-2/+29
|\ \ \
| * | | BUG#906357: Incorrect result with outer join and full text matchSergey Petrunya2011-12-203-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - The problem was that const-table-reading code would try to evaluate MATCH() before init_ftfuncs() was called. - Fixed by making MATCH function "expensive" so that nobody tries to evaluate it at optimization phase.
* | | | Changed a test case from join_cache.test to make it platform independent.Igor Babaev2011-12-252-11/+1
| | | |