summaryrefslogtreecommitdiff
path: root/mysql-test/t
Commit message (Collapse)AuthorAgeFilesLines
* MWL#182: Explain running statementsSergey Petrunya2012-07-171-18/+40
| | | | | - Address feedback from the second code review.
* t/show_explain_ps.test needs debug system to work.Sergey Petrunya2012-07-111-0/+1
|
* Make test results stableSergey Petrunya2012-07-111-1/+1
|
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-07-101-0/+9
| | | | - switch SHOW EXPLAIN to using an INFORMATION_SCHEMA table.
* Enable PERFORMANCE_SCHEMA tracking for SHOW EXPLAIN's conditions.Sergey Petrunya2012-07-071-0/+48
|
* MWL#182: Explain running statementsSergey Petrunya2012-07-051-2/+49
| | | | | - Make SHOW EXPLAIN command be KILLable with KILL QUERY.
* - More "local" code in show_explain.testSergey Petrunya2012-06-301-0/+2
| | | | | | - Better comments - Make unittest compile on Windows
* MWL#182: Explain running statements: address review feedbackSergey Petrunya2012-06-291-3/+64
| | | | | | | - Fix the year in Monty Program Ab copyrights in the new files. - Fix permissions handling so that SHOW EXPLAIN's handling is the same as SHOW PROCESSLIST's.
* Test that SHOW EXPLAIN will print 'Distinct'.Sergey Petrunya2012-06-211-2/+32
|
* MDEV-327: SHOW EXPLAIN: Different select_type in plans produced by SHOW ↵Sergey Petrunya2012-06-191-0/+35
| | | | | | | EXPLAIN and EXPLAIN - SHOW EXPLAIN actually produced correct plan - Apply fix for lp:1013343 to make EXPLAIN and SHOW EXPLAIN uniform.
* MWL#182: Explain running statementsSergey Petrunya2012-06-151-0/+671
|\ | | | | | | - Merge with current 5.5-main
| * MDEV-323: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN loses 'UNION RESULT' lineSergey Petrunya2012-06-071-0/+27
| | | | | | | | | | - Make SHOW EXPLAIN code correctly print fake_select_lex: both in the case where it has not yet been executed, and when it has been executed.
| * MDEV-324: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN for a query with ↵Sergey Petrunya2012-06-071-1/+34
| | | | | | | | | | | | | | TEMPTABLE view loses 'DERIVED' line - Make SHOW EXPLAIN code take into account that st_select_lex object without joins can be a full-featured SELECTs which were already executed and cleaned up.
| * MDEV-297: SHOW EXPLAIN: Server gets stuck until timeout occurs while ↵Sergey Petrunya2012-06-071-0/+20
| | | | | | | | | | | | | | | | executing SHOW INDEX and SHOW EXPLAIN in parallel - Rework locking code to use the LOCK_thd_data mutex for all synchronization. This also fixed MDEV-301.
| * MDEV-299: SHOW EXPLAIN: Plan produced by SHOW EXPLAIN changes back and forth ↵Sergey Petrunya2012-06-041-0/+38
| | | | | | | | | | | | during query execution - Make SHOW EXPLAIN ignore range accesses when printing "Range checked for each record" plans.
| * MDEV-305: SHOW EXPLAIN: ref returned by SHOW EXPLAIN is different from the ↵Sergey Petrunya2012-06-041-3/+26
| | | | | | | | | | | | | | | | normal EXPLAIN ('const' vs empty string) - The problem was that create_ref_for_key() would act differently, depending on whether we're running EXPLAIN or the actual query. - As the first step, fixed the EXPLAIN printout not to depend on actions in create_ref_for_key().
| * MDEV-275: SHOW EXPLAIN: server crashes in JOIN::print_explain with IN ↵Sergey Petrunya2012-05-241-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | subquery and aggregate function - Don't try to produce plans after JOIN::cleanup() has been called, because: = JOIN::cleanup leaves data structures in partially-cleaned state = Walking them is hazardous (see this bug), and has funny effects (See previous commits, "Using join cache" may or may not be shown) = Changing data structures to be persisted may cause unwanted side effects - The consequence is that SHOW EXPLAIN will show "Query plan already deleted" when e.g. reading data after filesort.
| * Merge of recent changes in MWL#182 in 5.3 with {Merge of MWL#182 with 5.5}Sergey Petrunya2012-05-171-4/+301
| |\
| | * MDEV-273: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query ↵Sergey Petrunya2012-05-161-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with impossible WHERE - It turns out, there is a case where the join is degenerate, but join->table_count!= && join->tables_list!=NULL. Need to also check if join->zero_result_cause!=NULL, too. - There is a slight problem: The code sets zero_result_cause= "no matching row in const table" when NOT running EXPLAIN. The result is that SHOW EXPLAIN will show this line while regular EXPLAIN will not.
| | * MDEV-270: SHOW EXPLAIN: server crashes in JOIN::print_explain on a query with Sergey Petrunya2012-05-151-0/+34
| | | | | | | | | | | | | | | | | | select tables optimized away - Take into account, that for some degenerate joins instead of "join->table_count=0" the code sets "join->tables_list=0".
| | * MDEV-267: SHOW EXPLAIN: Server crashes in JOIN::print_explain on most of queriesSergey Petrunya2012-05-141-0/+43
| | | | | | | | | | | | - Make SHOW EXPLAIN code handle degenerate subquery cases (No tables, impossible where, etc)
| | * MDEV-240: SHOW EXPLAIN: Assertion `this->optimized == 2' failedSergey Petrunya2012-05-111-0/+25
| | | | | | | | | | | | | | | | | | - Fix the bug: SHOW EXPLAIN may hit a case where a join is partially optimized. - Change JOIN::optimized to use enum instead of numeric constants
| | * # MDEV-239: Assertion `field_types == 0 ... ' failed in Protocol_text::store...Sergey Petrunya2012-05-101-2/+25
| | | | | | | | | | | | | | | - Make all functions that produce parts of EXPLAIN output take explain_flags as parameter, instead of looking into thd->lex->describe
| | * MDEV-238: SHOW EXPLAIN: Server crashes in JOIN::print_explain with FROM ↵Sergey Petrunya2012-05-101-0/+22
| | | | | | | | | | | | | | | | | | subquery and GROUP BY - Support SHOW EXPLAIN for selects that have "Using temporary; Using filesort".
| | * MWL#182: Explain running statements:Sergey Petrunya2012-05-101-0/+46
| | | | | | | | | | | | | | | | | | Make SHOW EXPLAIN work for queries that do "Using temporary" and/or "Using filesort" - Patch#1: Don't lose "Using temporary/filesort" in the SHOW EXPLAIN output.
| | * MWL#182: Explain running statementsSergey Petrunya2012-04-261-4/+67
| | | | | | | | | | | | - Code cleanup
| | * MWL#182: Explain running statements: merge with 5.3-mainSergey Petrunya2012-04-131-0/+198
| | |\
| * | \ MWL#182: SHOW EXPLAIN: Merge 5.3->5.5Sergey Petrunya2012-05-161-0/+211
| |\ \ \
| | * | | Apply earlier patch: correct handling of subqueries that Sergey Petrunya2012-01-041-12/+25
| | | | | | | | | | | | | | | | | | | | were not yet optimized or already executed and deleted.
| | * | | MWL#182: Explain running statements: merge with 5.3-main (needs fixing)Sergey Petrunya2012-01-031-0/+198
| | |\ \ \ | | | | |/ | | | |/|
| | | * | MWL#182: Explain running statementsSergey Petrunya2011-10-281-1/+68
| | | | | | | | | | | | | | | | | | | | - Get subqueries to work, part #1.
| | | * | MWL#182: Explain running statementsSergey Petrunya2011-10-271-0/+131
| | | |\ \ | | | | | | | | | | | | | | | | | | - Merge with 5.3-main
| | | | * | Fix typo bug in UNION handling, add tests for SHOW EXPLAIN for UNION.Sergey Petrunya2011-10-271-1/+25
| | | | | |
| | | | * | Don't run show_explain.test for embedded server (the patch explains why)Sergey Petrunya2011-09-261-0/+22
| | | | | |
| | | | * | - Testing: add DBUG_EXECUTE_IF("show_explain_probe_2"... which fires Sergey Petrunya2011-09-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only for selects with given select_id. - Steps towards making SHOW EXPLAIN work for UNIONs.
| | | | * | MWL#182: Explain running statementsSergey Petrunya2011-09-241-23/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement new approach to testing (the DBUG_EXECUTE_IF variant) - add an 'evalp' mysqltest command that is like 'eval' except that it prints the original query. - Fix select_describe() not to change join_tab[i]->type - More tests
| | | | * | -Make show_explain.test stableSergey Petrunya2011-08-271-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix st_select_lex::set_explain_type() to allow producing exactly the same EXPLAINs as it did before. SHOW EXPLAIN output may produce select_type=SIMPLE instead or select_type=PRIMARY or vice versa (which is ok because values of select_type weren't self-consistent in this regard to begin with)
| | | | * | MWL#182: Explain running statementsSergey Petrunya2011-08-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | - Added TODO comments
| | | | * | MWL#182: Explain running statementsSergey Petrunya2011-08-241-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Further progress with the code - Testcases.
* | | | | | Merge BUG#1010351 from 5.2 to 5.5Sergey Petrunya2012-06-101-0/+30
|\ \ \ \ \ \
| * \ \ \ \ \ Merge BUG#1010351 from 5.1 to 5.2Sergey Petrunya2012-06-101-0/+30
| |\ \ \ \ \ \
| | * | | | | | BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymoreSergey Petrunya2012-06-101-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add the VIA_SYM token into keyword_sp list, which makes it allowed for use as keyword and SP label.
* | | | | | | | Changed last_insert_id() to be unsigned.Michael Widenius2012-06-081-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed MDEV-331: last_insert_id() returns a signed number mysql-test/r/auto_increment.result: Added test case mysql-test/t/auto_increment.test: Added test case sql/item_func.h: Changed last_insert_id() to be unsigned.
* | | | | | | | Mergeunknown2012-06-061-0/+16
|\ \ \ \ \ \ \ \ | |/ / / / / / /
| * | | | | | | Fixed bug lp:1000649unknown2012-06-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: When the method JOIN::choose_subquery_plan() decided to apply the IN-TO-EXISTS strategy, it set the unit and select_lex uncacheable flag to UNCACHEABLE_DEPENDENT_INJECTED unconditionally. As result, even if IN-TO-EXISTS injected non-correlated predicates, the subquery was still treated as correlated. Solution: Set the subquery as correlated only if the injected predicate(s) depend on the outer query.
* | | | | | | | mergeSergei Golubchik2012-06-067-9/+124
|\ \ \ \ \ \ \ \
| * | | | | | | | MDEV-136 Non-blocking "set read_only"Sergei Golubchik2012-06-042-17/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backport dmitry.shulga@oracle.com-20120209125742-w7hdxv0103ymb8ko from mysql-trunk: Patch for bug#11764747 (formerly known as 57612): SET GLOBAL READ_ONLY=1 cannot progress when a table is locked with LOCK TABLES. The reason for the bug was that mysql server makes a flush of all open tables during handling of statement 'SET GLOBAL READ_ONLY=1'. Therefore if some of these tables were locked by "LOCK TABLE ... READ" from a different connection, then execution of statement 'SET GLOBAL READ_ONLY=1' would be waiting for the lock for such table even if the table was locked in a compatible read mode. Flushing of all open tables before setting of read_only system variable is inherited from 5.1 implementation since this was the only possible approach to ensure that there isn't any pending write operations on open tables. Start from version 5.5 and above such behaviour is guaranteed by the fact that we acquire global_read_lock before setting read_only flag. Since acquiring of global_read_lock is successful only when there isn't any active write operation then we can remove flushing of open tables from processing of SET GLOBAL READ_ONLY=1. This modification changes the server behavior so that read locks held by other connections (LOCK TABLE ... READ) no longer will block attempts to enable read_only.
| * | | | | | | | merge with 5.3.Sergei Golubchik2012-06-046-0/+126
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | | | | | | | | | | | | | | | | | | Take only test cases from MDEV-136 Non-blocking "set read_only"
| | * | | | | | | Merge Sergey Petrunya2012-06-021-0/+33
| | |\ \ \ \ \ \ \
| | | * | | | | | | BUG#1006164: Multi-table DELETE that uses innodb + index_merge/intersect may ↵Sergey Petrunya2012-06-021-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fail to delete rows - Set index columns to be read when using index_merge, even if TABLE->no_keyread is set for the table (happens for multi-table UPDATEs)