Commit graph

86283 commits

Author SHA1 Message Date
unknown
a6e28ce5e6 MDEV-5084: Missing C++ support in ma_dyncol.h 2013-10-07 10:30:54 +03:00
unknown
4b74214c7b MDEV-5085: Dynamic columns require inclusion of my_sys.h and my_global.h 2013-10-07 10:25:02 +03:00
Alexander Barkov
426d246f5b MDEV-5163 Merge WEIGHT_STRING function from MySQL-5.6 2013-10-23 20:25:52 +04:00
Sergey Petrunya
de8e306b69 Update perfschema/r/nesting.result after MDEV-3798: EXPLAIN UPDATE/DELETE
- now apc_target is activated in different location, which causes 
  THD::LOCK_thd_data event to occur at a different point in the query.
2013-10-21 21:43:25 +04:00
Sergey Petrunya
cc97d22627 Merge 10.0-base -> 10.0 2013-10-21 10:12:37 +04:00
Sergey Petrunya
dd6bd8bfbd Fix valgrind failure in subselect3.test, "Conditional jump or move
depends on uninitialised value(s) in JOIN::save_explain_data_intern"
- Make find_best()  /* the old join optimizer code */ also use table
  condition selectivity.
2013-10-17 09:45:31 +04:00
Alexander Barkov
b88bf50ec1 Merge 5.5 -> 10.0-base 2013-10-16 20:41:50 +04:00
Alexander Barkov
1039182354 Merge 5.5 -> 10.0-base 2013-10-16 20:26:16 +04:00
Alexander Barkov
70f066eba4 Merge 5.5 -> 10.0-base 2013-10-16 20:24:02 +04:00
Alexander Barkov
3bf20bc7de A clean-up for "MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE".
Local variable table_name_buffer went out of scope while
its content was still being used by a String instance.
Moved the variable to the function scope.
2013-10-16 20:17:22 +04:00
Alexander Barkov
11005f3413 Merge 5.3->5.5 2013-10-16 18:17:51 +04:00
Alexander Barkov
bff85079d3 Merge 5.2->5.3 2013-10-16 18:13:13 +04:00
Alexander Barkov
5064d03b80 Merge 5.3 -> 5.5. 2013-10-16 17:58:54 +04:00
Alexander Barkov
2b60ad3637 Merge 5.1->5.2 2013-10-16 17:58:15 +04:00
Alexander Barkov
049000101a Merge 5.1 -> 5.3 2013-10-16 17:48:31 +04:00
Alexander Barkov
de4ca539b8 MDEV-4890 Valgrind warnings on shutdown on a build with openSSL 2013-10-16 17:37:11 +04:00
unknown
73f8b4dac2 MDEV-4981: Account for queries handled by query-cache in USER_STATISTICS (and in HOST_STATISTICS)
fix for SP & PS
2013-10-16 16:07:25 +03:00
Sergey Petrunya
4bed7aa858 MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE, Memory leak in binlog.binlog_base64_flag:
- It turns out, there are statements that will call lex_start(thd->lex) 
  after parsing has been finished. lex_start() will set lex->explain=NULL,
  which will lose the pointer to already allocated Explain_plan object.
- To get rid of this, switch to lazy creation of lex->explain.  Now, it is 
  created only when we get a part ot query plan.
2013-10-16 12:13:51 +04:00
Sergey Petrunya
207f008220 Fix valgrind failure caused by calling c_ptr() of an empty StringBuffer<N>. 2013-10-15 19:24:43 +04:00
Sergey Petrunya
c0a741f005 Fix buildbot failures:
- MYSQL_MULTI_DELETE_DONE probe compile failure
- show_explain_non_select.test
2013-10-15 16:39:54 +04:00
Sergey Petrunya
7be365ea9c MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE
- When showing EXPLAIN output in the slow query log, 
  format it so that one could use grep or other tool
  to get the output.
2013-10-15 13:21:06 +04:00
Sergey Petrunya
282ff783b1 MDEV-5117: Explain for a query executed as a PS is not written into the slow log
- Save the query plan after the statement was executed so that its gets into
  the slow query log.
2013-10-15 13:14:44 +04:00
Sergey Petrunya
1e36cbfa39 MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE
- Merge with 10.0-base
2013-10-15 11:51:41 +04:00
Sergey Petrunya
25d0175fde MDEV-3798: EXPLAIN UPDATE/DELETE:
- Port grant_explain_non_select.{test,result} from mysql-5.6
- Per Sanja's hint, fix mysql_make_view() to take into 
  account that EXPLAIN now is not necessarily EXPLAIN SELECT.
2013-10-15 11:43:34 +04:00
Sergey Petrunya
e522ebc221 Update test results for the last cset. 2013-10-15 10:36:39 +04:00
Sergey Petrunya
a06170c8d8 MDEV-3798: EXPLAIN UPDATE/DELETE
- Fix a problem with EXPLAIN multi_table UPDATE: 
  = Do use multi_update object, because multi_update::prepare() does
    various setup, e.g. it disables index-only for the tables to be updated.
  = Protect multi_update::prepare() from being invoked multiple times. 
    If the query has subqueries, they may try to invoke it, for some reason.
2013-10-15 10:34:46 +04:00
Sergey Petrunya
a356cfbefb MDEV-3798: EXPLAIN UPDATE/DELETE
- eliminate join_save_qpf() function.
2013-10-15 08:00:48 +04:00
Igor Babaev
eb2c6f4513 Merge 5.5->10.0-base 2013-10-14 13:39:18 -07:00
Sergey Petrunya
1ec399ce03 Code cleanup. 2013-10-15 00:30:32 +04:00
Igor Babaev
eae0a45f4e Merge 2013-10-14 12:30:20 -07:00
Igor Babaev
1381585244 Merge 5.3->5.5 2013-10-14 12:08:55 -07:00
Igor Babaev
81623bdc35 Fixed bug mdev-5135.
The patch for bug mdev-5105 incorrectly counted conditions in nested joins.
2013-10-14 10:29:24 -07:00
Alexey Botchkov
4e243be509 MDEV-5131 create_embedded_thd is not thread safe, libmysqld.
The emb_free_embedded_thd() has the thread-unsafe code
        so should be 'mutexed' also.
2013-10-14 21:23:09 +05:00
Sergey Petrunya
105e3ae6c9 MDEV-3798: EXPLAIN UPDATE/DELETE
Update the SHOW EXPLAIN code to work with the 
new architecture (part#1):
Before, SHOW EXPLAIN operated on real query plan structures, 
which meant it had to check when SELECTs are created/deleted.
SELECTs would call apc_target->enable() when they got a query 
plan and disable() when their query plan was deleted.

Now, Explain data structure becomes available at once (and we
call apc_target->enable()) and then it stays until it is deleted
(when that happens, we call apc_target->disable()).
2013-10-14 20:09:33 +04:00
Sergey Petrunya
f67f8fd00f MDEV-3798: EXPLAIN UPDATE/DELETE
- Fix EXPLAIN INSERT DELAYED ... : do call end_delayed_insert().
2013-10-14 20:01:28 +04:00
Igor Babaev
ddc46740a5 Merge 5.5->10.0-base 2013-10-13 18:10:19 -07:00
Igor Babaev
c7db46a242 Merge 5.3-5.5 2013-10-13 13:43:29 -07:00
Alexey Botchkov
e37639e934 MDEV-5131 create_embedded_thd is not thread safe, libmysqld.
LOCK_thread_count locked when we do threads.append().
2013-10-13 23:25:57 +05:00
Igor Babaev
78b580b779 Fixed bug mdev-5132.
Objects of the classes Item_func_isnull and Item_func_isnotnull
must have the flag sargable set to TRUE.
Set the value of the flag sargable only in constructors of the 
classes inherited from Item_int_func.
2013-10-11 23:24:57 -07:00
Igor Babaev
092a238864 Fixed a problem of the patch for mdev-5105 that caused valgrind complains. 2013-10-11 12:50:30 -07:00
Sergey Petrunya
3e8f7c8516 MDEV-5122: "Commands out of sync", "Malformed packet" or client hang up...
- When INSERT catches an error, it should not attempt to send parts of 
  EXPLAIN output.
2013-10-11 19:27:53 +04:00
unknown
3cc3bcfcc5 MDEV-5107:Left Join Yields All Nulls Instead of Appropriate Matches
MDEV-5034:Wrong result on LEFT JOIN with a SELECT SQ or a merge view, UNION in IN subquery

Make reset null_row same as it was set in evaluate_null_complemented_join_record().

The problem was that view firlds detect null_row by not-yet-reset table.
2013-10-11 15:57:19 +03:00
unknown
d61cffa6b1 MDEV-5130: More precise binlog position reporting for IO thread when reconnecting with GTID
Make IO thread check for end of event group, so that upon
disconnect at the end of an event group it can report the last
read GTID as expected. Also inject a fake Rotate event at
reconnect when skipping part of an initial event group, to
give SQL thread the correct Read_Master_Log_Pos.

Reported by Pavel Ivanov.
2013-10-11 11:21:18 +02:00
Sergey Petrunya
a1705b762e Update tests: log_slow_verbosity now supports query_plan=explan. 2013-10-11 12:40:25 +04:00
Alexander Barkov
032dc20541 MDEV-4425 Regexp enhancements
Mark a few PCRE CMake variables as advanced,
so the are not presented in cmake-gui by default.
2013-10-11 08:52:24 +04:00
Igor Babaev
7c87385e30 Fixed bug mdev-5105.
The bug caused a memory overwrite in the function update_ref_and_keys()
It happened due to a wrong value of SELECT_LEX::cond_count. This value
historically was calculated by the fix_fields method. Now the logic of
calling this method became too complicated and, as a result, this value
is calculated not always correctly.
The patch changes the way how and when  the values of SELECT_LEX::cond_count
and of SELECT_LEX::between_count are calculated. The new code does it just at
the beginning of update_ref_and_keys().
2013-10-10 10:08:26 -07:00
Sergey Petrunya
094f70fd19 MDEV-5106: Server crashes in Explain_union::print_explain on ER_TOO_BIG_SELECT
- Don't save UNION's EXPLAIN data if optimization failed with 
  an error. We could end up saving incomplete plan, which will 
  cause a crash when we attempt to print it.
2013-10-10 20:30:32 +04:00
Alexey Botchkov
508d40fbdb MDEV-4788 check mysql-5.5 changes in spatial.cc.
Additional patch for the 5.5.
2013-10-10 14:20:35 +05:00
Sergey Petrunya
582ecb2a25 MDEV-3798: EXPLAIN UPDATE/DELETE:
Backport mysql-test/t/myisam_explain_non_select_all.test from mysql-5.6
- the .result file was modified because MariaDB choses different 
  query plans in a number cases. Also, we don't have some of the 
  "incorrect EXPLAIN output" bugs that they still have.

The .test file and includes were taken verbatim with one 
exception: two tests were disabled with --disable parsing:

1. @@sql_safe_updates is not enforced EXPLAINs of multitable 
   updates. In MariaDB, the execution itself will produce 
   ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE, but EXPLAIN won't.
2. Their case #71 hits some old bug in MyISAM (See their comments
   in explain_non_select.inc for details).
2013-10-09 17:20:42 +04:00
Sergey Petrunya
7e919c52a5 MDEV-3798: EXPLAIN UPDATE/DELETE
- Produce correct `key_len` when type=index.
2013-10-09 17:15:34 +04:00