Commit graph

33948 commits

Author SHA1 Message Date
Sergei Petrunia
424d5de89d Merge bb-10.1-explain-analyze into 10.1 2014-06-25 16:46:42 +04:00
Sergei Petrunia
b561a98a87 MDEV-406: ANALYZE $stmt: add some tests for joins 2014-06-25 16:01:09 +04:00
Sergei Petrunia
7711999d8b MDEV-406: ANALYZE $stmt: add support for BNL join buffering 2014-06-25 15:15:38 +04:00
Sergei Petrunia
c3cfb6910a MDEV-406: ANALYZE $stmt: Scans that never executed will have r_rows=NULL 2014-06-24 23:58:13 +04:00
Sergei Petrunia
c08de06246 MDEV-406: ANALYZE $stmt: get ANALYZE work for subqueries
- "ANALYZE $stmt" should discard select's output, but it should still
  evaluate the output columns (otherwise, subqueries in select list
  are not executed)
- SHOW EXPLAIN's code practice of calling JOIN::save_explain_data()
  after JOIN::exec() is disastrous for ANALYZE, because it resets
  all counters after the first execution. It is stopped
  = "Late" test_if_skip_sort_order() calls explicitly update their part
    of the query plan.
  = Also, I had to rewrite I_S optimization to actually have optimization
    and execution stages.
2014-06-24 19:41:43 +04:00
Sergei Golubchik
242e7f958d MDEV-4549 [PATCH] Clean up code working with ACL tables
* enum values to index different ACL tables, instead of hard-coded numbers
  (even different in diffent functions).
* move TABLE_LIST initialization into open_grant_tables()
  and use it everywhere
* change few my_bool's to bool's
2014-06-23 16:23:51 +02:00
Sergei Golubchik
f321d3e5f1 main.temp_table_frm failure on fulltest (--embedded, when TMPDIR=/tmp)
use more restrictive --list_files to hide the usual /tmp garbage
2014-06-21 08:56:49 +02:00
Sergei Golubchik
ce6a63ec41 MDEV-4260 Don't create frm files for temporary tables
* Don't write frm for tmp tables
* pass frm image down to open_table_uncached, when possible
* don't use truncate-by-recreate for temp tables - cannot recreate
  without frm, and delete_all_rows is faster anyway
2014-06-20 15:47:44 +02:00
Sergei Golubchik
dc64ba2187 MDEV-6137 better help for SET/ENUM sysvars
Auto-generate the allowed list of values for enum/set/flagset options
in --help output. But don't do that when the help text already has them.

Also, remove lists of values from help strings of various options, where
they were simply listed without any additional information.
2014-06-19 12:02:23 +02:00
Sergei Golubchik
0cb7c19fbe update sys_vars.innodb_compression_algorithm_basic to pass
it checked that the default is lz4. Which only worked on systems that
had lz4 and did not have lzo. Now it checks for the default to be zlib,
which works on systems that has neither lz4 or lzo. Like our package
builders in buildbot. This is intentional, we don't want introduce
additional dependencies (lz4, lzo) for our packages just yet.
This can (and will) be reconsidered, and this test can (and will)
be updated again.
2014-06-18 15:00:58 +02:00
Jan Lindström
5f02051f07 Merge branch '10.1' of github.com:MariaDB/server into 10.1 2014-06-17 11:33:50 +03:00
Jan Lindström
89e0514150 Fixed test failure introduced by adding a new dynamic
configuration variable innodb_compression_algorithm.
Removed unnecessary test for removed configuration
variable.
2014-06-17 08:40:54 +03:00
Sergei Petrunia
581b889771 Update analyze_stmt.result after the last commit 2014-06-16 13:34:03 +04:00
Sergei Golubchik
cf1a09e42f MDEV-6107 merge default_tmp_storage_engine
Adapt default_tmp_storage_engine implementation from mysql-5.6
New feature (as compared to 5.6), default_tmp_storage_engine=NULL
means that temporary tables will use default_storage_engine value.
This makes the behavior backward compatible.
2014-06-15 18:42:31 +02:00
Sergei Golubchik
f61f36b386 Merge branch '10.0' into 10.1
Conflicts:
	CMakeLists.txt
	VERSION
Modified:
	.gitignore
2014-06-13 16:10:25 +02:00
Sergei Golubchik
3d4dbe4d94 avoid uppercase table aliases tests - they're not portable 2014-06-11 19:08:06 +02:00
Sergei Golubchik
1eaf2106e5 MDEV-6253 MySQL Users Break when Migrating from MySQL 5.1 to MariaDB 10.0.10
When plugin=mysql_native_password (or mysql_old_password) take the password
from *either* password *or* authentication_string, whichever is set.
This makes no sense, but alas, that's what MySQL-5.6 does.
2014-06-11 10:09:29 +02:00
Sergei Golubchik
6e8d49b8f5 MDEV-6065 MySQL Bug#13623473 "MISSING ROWS ON SELECT AND JOIN WITH TIME/DATETIME COMPARE"
fix for ref like "indexed_time = datetime"
2014-06-11 10:08:08 +02:00
Sergei Golubchik
dc9b2a95bf MDEV-6249 mark P_S STABLE and disable it by default 2014-06-09 20:00:23 +02:00
Igor Babaev
2436d58e19 Merge 2014-06-10 15:32:56 -07:00
Sergey Petrunya
02720fd7ac Merge 2014-06-10 21:51:02 +02:00
Sergey Petrunya
b80a02cbc4 Merge 2014-06-10 21:46:27 +02:00
Igor Babaev
1f7e68044c Merge. 2014-06-10 12:45:20 -07:00
Igor Babaev
d42e6d3a99 Fixed bug mdev-6071.
The method JOIN_CACHE::init may fail (return 1) if some conditions on the
used join buffer is not satisfied. For example it fails if join_buffer_size
is greater than join_buffer_space_limit. The conditions should be checked
when running the EXPLAIN command for the query. That's why the method
JOIN_CACHE::init has to be called for EXPLAIN commands as well.
2014-06-10 10:34:58 -07:00
Alexey Botchkov
6b84ecdc37 MDEV-4440 IF NOT EXISTS in multi-action ALTER does not work when the problem is created by a previous part of the ALTER.
Loops added to the handle_if_exists_option() to check the
        CREATE/DROP lists for duplicates.
2014-06-10 17:02:46 +05:00
Sergey Petrunya
aeb62282a2 MDEV-5985: EITS: selectivity estimates look illogical for join and non-key equalities
Part#1. 

table_cond_selectivity() should discount selectivity of table' 
conditions only when ity counts that selectivity to begin with. 

For non-ref-based access methods (ALL/range/index_merge/etc),
we start with sel=1.0 and hence do not need to discount any
selectivities.
2014-06-10 12:25:16 +02:00
unknown
b1886e2bff merge of MDEV-6047 2014-06-09 13:47:20 +03:00
unknown
4cd676cbd9 MDEV-6047: Make exists_to_in optimization ON by default 2014-06-09 13:42:21 +03:00
Sergey Petrunya
349e31d5a7 Merge 2014-06-07 23:45:05 +02:00
Sergey Petrunya
71df035551 MDEV-6308: Server crashes in table_multi_eq_cond_selectivity with ...
- In table_cond_selectivity(), reset keyuse variable between the loops.
2014-06-07 19:00:26 +02:00
Alexander Barkov
216fbe2af3 MDEV-6102 Comparison between TIME and DATETIME does not use CURRENT_DATE
MDEV-6101 Hybrid functions do not add CURRENT_DATE when converting TIME to DATETIME
2014-06-06 10:29:52 +04:00
Sergei Golubchik
e27c338634 5.5.38 merge 2014-06-06 00:07:27 +02:00
Sergei Golubchik
6d75570e99 fix range.test 2014-06-05 19:25:51 +02:00
Sergey Petrunya
c7e5a1f70d MDEV-6105: Emoji unicode character string search query makes mariadb performance down
- When range optimizer cannot the lookup value into [VAR]CHAR(n) column,
  it should produce:
  = "Impossible range" for equality
  = "no range" for non-equalities.
2014-06-05 19:18:35 +04:00
Sergei Golubchik
2d2697ea8d MDEV-6221 SQL_CALC_FOUND_ROWS yields wrong result again
replace another old "was there a filesort?" test with
a correct "did filesort calculate found_rows?" test.
2014-06-05 15:59:46 +02:00
Sergei Golubchik
fde6ee61bb revert the fix for MDEV-5898, restore the fix for MDEV-5549.
simplify test case for MDEV-5898
2014-06-05 15:59:41 +02:00
Sergei Golubchik
37d353770f MDEV-5998 MySQL Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS DATABASE SECURITY
Merge from mysql-5.6:
revno: 3257
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
branch nick: mysql-trunk-bug11756966
timestamp: Thu 2011-07-14 09:32:01 +0200
message:
  Bug#11756966 - 48958: STORED PROCEDURES CAN BE LEVERAGED TO BYPASS
                 DATABASE SECURITY

  The problem was that CREATE PROCEDURE/FUCTION could be used to
  check the existence of databases for which the user had no
  privileges and therefore should not be allowed to see.

  The reason was that existence of a given database was checked
  before privileges. So trying to create a stored routine in
  a non-existent database would give a different error than trying
  to create a stored routine in a restricted database.

  This patch fixes the problem by changing the order of the checks
  for CREATE PROCEDURE/FUNCTION so that privileges are checked first.
  This means that trying to create a stored routine in a
  non-existent database and in a restricted database both will
  give ER_DBACCESS_DENIED_ERROR error.

  Test case added to grant.test.
2014-06-05 15:59:35 +02:00
Sergei Golubchik
e22c3810f0 MDEV-6243 mysql_install_db or mysql_upgrade fails when default_engine=archive
don't use the default storage engine for mysql.gtid_slave_pos, prefer innodb.
but alter it to myisam in mtr, because many tests run without innodb.
2014-06-05 09:04:43 +02:00
Sergei Golubchik
59cea2e1bf MDEV-6258 MariaDB 10.0 performance schema timestamps relative to epoch
don't use the interval timer when absolute time values are needed
2014-06-05 09:03:55 +02:00
Alexander Barkov
284479c085 Merge 5.3->5.5 2014-06-04 21:53:15 +04:00
Alexander Barkov
661daf16f1 MDEV-4858 Wrong results for a huge unsigned value inserted into a TIME column
MDEV-6099 Bad results for DATE_ADD(.., INTERVAL 2000000000000000000.0 SECOND)
MDEV-6097 Inconsistent results for CAST(int,decimal,double AS DATETIME)
MDEV-6100 No warning on CAST(9000000 AS TIME)
2014-06-04 20:32:57 +04:00
unknown
113333d447 MDEV-6046: MySQL Bug#11766684 59851: UNINITIALISED VALUE IN ITEM_FUNC_LIKE::SELECT_OPTIMIZE WITH SUBQUERY AND 2014-06-04 13:03:55 +03:00
unknown
55bfabf971 MDEV-6163: Error while executing an update query that has the same table in a sub-query
We have to run the derived table prepare before the unique table check to mark the derived table (in this case the unique table check can turn that table to materialized one).
2014-06-04 10:10:19 +03:00
Sergei Petrunia
917b22393f MDEV-406: ANALYZE $stmt
- Testcase for ANALYZE UNION
- Provide r_rows for union result.
2014-06-03 19:04:59 +04:00
Sergei Petrunia
5621aa3230 MDEV-406: ANALYZE $stmt
- Support tracking for UNIONs, temporary-table based ORDER BYs,
  and both.
2014-06-03 17:59:01 +04:00
Sergey Vojtovich
23a5b2eb6d MDEV-6103 - Adding/removing non-materialized virtual column triggers
table recreation

Relaxed InnoDB/XtraDB checks to allow online add/drop of
non-materialized virtual columns.
2014-06-03 16:57:29 +04:00
Sergey Petrunya
b6b5b748e7 MDEV-5884: EXPLAIN UPDATE ... ORDER BY LIMIT shows wrong #rows
- Make get_index_for_order() return correct #rows. 
  changed EXPLAIN outputs are checked - only #rows is different.
2014-06-04 00:26:27 +04:00
Sergei Golubchik
57d15d62f1 Add a test case for MySQL's:
Bug #18167356: EXPLAIN W/ EXISTS(SELECT* UNION SELECT*)
                 WHERE ONE OF SELECT* IS DISTINCT FAILS.

the bugfix itself was not merged - MariaDB doesn't have this bug.
2014-06-03 10:52:36 +02:00
Sergei Golubchik
5d16592d44 mysql-5.5.38 merge 2014-06-03 09:55:08 +02:00
Sergei Golubchik
e5daa0946f 5.3 merge 2014-06-02 19:08:59 +02:00