| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
- Address feedback from the second code review.
|
| |
|
| |
|
|
|
|
| |
- switch SHOW EXPLAIN to using an INFORMATION_SCHEMA table.
|
| |
|
|
|
|
|
| |
- Make SHOW EXPLAIN command be KILLable with KILL QUERY.
|
|
|
|
|
|
| |
- Better comments
- Make unittest compile on Windows
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
| |
EXPLAIN and EXPLAIN
- SHOW EXPLAIN actually produced correct plan
- Apply fix for lp:1013343 to make EXPLAIN and SHOW EXPLAIN uniform.
|
|\
| |
| |
| | |
- Merge with current 5.5-main
|
| |
| |
| |
| |
| | |
- 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.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
during query execution
- Make SHOW EXPLAIN ignore range accesses when printing "Range checked for each record" plans.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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".
|
| | |
| | |
| | |
| | | |
- Make SHOW EXPLAIN code handle degenerate subquery cases (No tables, impossible where, etc)
|
| | |
| | |
| | |
| | |
| | |
| | | |
- 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
|
| | |
| | |
| | |
| | |
| | | |
- Make all functions that produce parts of EXPLAIN output take
explain_flags as parameter, instead of looking into thd->lex->describe
|
| | |
| | |
| | |
| | |
| | |
| | | |
subquery and GROUP BY
- Support SHOW EXPLAIN for selects that have "Using temporary; Using filesort".
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
- Code cleanup
|
| | |\ |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
were not yet optimized or already executed and deleted.
|
| | |\ \ \
| | | | |/
| | | |/| |
|
| | | | |
| | | | |
| | | | |
| | | | | |
- Get subqueries to work, part #1.
|
| | | |\ \
| | | | | |
| | | | | |
| | | | | | |
- Merge with 5.3-main
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
only for selects with given select_id.
- Steps towards making SHOW EXPLAIN work for UNIONs.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- 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
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- 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)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Added TODO comments
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Further progress with the code
- Testcases.
|
|\ \ \ \ \ \ |
|
| |\ \ \ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Add the VIA_SYM token into keyword_sp list, which makes it allowed for
use as keyword and SP label.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / / |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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.
|
|\ \ \ \ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
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.
|
| |\ \ \ \ \ \ \ \
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | | |
Take only test cases from MDEV-136 Non-blocking "set read_only"
|
| | |\ \ \ \ \ \ \ |
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
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)
|