Commit graph

1143 commits

Author SHA1 Message Date
Sergey Vojtovich
d12c7adf71 MDEV-5314 - Compiling fails on OSX using clang
This is port of fix for MySQL BUG#17647863.

revno: 5572
revision-id: jon.hauglid@oracle.com-20131030232243-b0pw98oy72uka2sj
committer: Jon Olav Hauglid <jon.hauglid@oracle.com>
timestamp: Thu 2013-10-31 00:22:43 +0100
message:
  Bug#17647863: MYSQL DOES NOT COMPILE ON OSX 10.9 GM

  Rename test() macro to MY_TEST() to avoid conflict with libc++.
2014-02-19 14:05:15 +04:00
Sergei Golubchik
72c20282db 10.0-base merge 2014-02-03 15:22:39 +01:00
Sergei Golubchik
59d9d08e2b 5.5 merge 2014-02-01 00:54:03 +01:00
unknown
b0aaf5c6f5 Merge 5.3->5.5 2014-01-15 16:07:50 +02:00
unknown
57400ee681 MDEV-5414: RAND() in a subselect : different behavior in MariaDB and MySQL
Materialization forced in case if rand() used in view or derived table to avoud several calls of rand for gting value of a field.

Fixed set variable uncachable flag from - it shouldbe a side effect not a random value.
2013-12-18 15:59:51 +02:00
Sergei Golubchik
d28d3ba40d 10.0-base merge 2013-12-16 13:02:21 +01:00
Sergei Golubchik
6bf10fac44 5.5 merge 2013-12-15 15:57:26 +01:00
Sergei Golubchik
e68bccc743 5.3 merge 2013-12-13 13:00:38 +01:00
Igor Babaev
3ec4296ec4 Fixed bug mdev-5410.
The fix for bug #27937 was incomplete: it did not handle correctly the queries
containing UNION with global ORDER BY in subselects.
2013-12-12 13:55:33 -08:00
Sergei Golubchik
0fdb3bcfdb 10.0-base merge (roles) 2013-10-29 15:08:44 +01:00
Sergei Golubchik
0c303b52a9 New syntax:
CREATE ROLE xxx WITH ADMIN yyy
  GRANT xxx TO yyy WITH ADMIN OPTION
  REVOKE ADMIN OPTION FOR xxx FROM yyy
2013-10-18 12:23:15 -07:00
Sergei Golubchik
72d8b533cc Fixes for mysql-test failures
mysql-test/r/acl_roles_show_grants.result:
  one can do SHOW GRANTS for himself
mysql-test/t/acl_roles_set_role-table-column-priv.test:
  correct error message
mysql-test/t/acl_roles_show_grants.test:
  one can SHOW GRANTS for himself
sql/sql_acl.cc:
  bugfixing:
  * don't assign with && - it can shortcut and the second assignment won't be executed
  * correct the test in check_grant_all_columns() - want_access should not be modified
  *
sql/sql_cmd.h.OTHER:
  add new commands at the end
sql/sql_db.cc:
  don't call acl_get() if all privileges are already satisfied
  (crashes when run with --skip-grants, because acl data stuctures aren't initialized)
sql/sql_parse.cc:
  * test for current_user in get_current_user()
  * map explicitly specified user@host to current_user
2013-10-18 08:10:51 -07:00
Vicențiu Ciorbaru
4a58599930 Implemented SHOW GRANTS functionality 2013-10-18 06:40:25 -07:00
Vicențiu Ciorbaru
f2ab661999 Added SHOW GRANTS recursive role print.
The output is not completely correct due to recursive role grants not
being completly implemented. However, this will help with testing the
implementation of set role with recursive grants.
2013-10-18 06:34:07 -07:00
Vicențiu Ciorbaru
dcc9fd4c8e Implemented syntax recognition for REVOKE ROLE 2013-10-18 04:41:06 -07:00
Vicențiu Ciorbaru
ec92a4e0ff Implemented syntax recognition for DROP ROLE 2013-10-18 04:36:25 -07:00
Vicențiu Ciorbaru
51c631c2ae Implemented syntax recognition for CREATE ROLE 2013-10-18 04:35:18 -07:00
Vicențiu Ciorbaru
d40d356606 Added syntax detection for the GRANT role TO {user | role } command.
Also added syntax for GRANT privilege TO { role } command
2013-10-18 04:29:01 -07: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
1e36cbfa39 MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE
- Merge with 10.0-base
2013-10-15 11:51:41 +04: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
3c6ac6694d MDEV-3798: EXPLAIN UPDATE/DELETE
- Produce correct #rows for ORDER BY ... LIMIT N queries that take advantage of 
  ordered index read to read only N rows.
2013-10-09 13:07:46 +04:00
Sergey Petrunya
161d687594 MDEV-3798: EXPLAIN UPDATE/DELETE
- Generate correct contents of `Extra` column for UPDATEs/DELETEs that use quick selects
- UPDATEs with used_key_is_modified=true will show "Using buffer"
2013-10-09 09:40:33 +04:00
Sergey Petrunya
e5d13c1567 Merge 10.0-base -> 10.0 2013-10-16 13:38:42 +04:00
Sergey Petrunya
062b7bfa39 Better comments 2013-10-05 13:48:45 +04:00
Sergey Petrunya
abcf14e595 MDEV-3798: EXPLAIN UPDATE/DELETE
- Handle the case when EXPLAIN UPDATE/DELETE has pruned away all partitions.
2013-10-05 13:44:01 +04:00
Sergey Petrunya
72bc6d7364 MDEV-3798: EXPLAIN UPDATE/DELETE
- Address review feedback: more renames
2013-10-05 13:19:45 +04:00
Sergey Petrunya
fedf769f0b MDEV-3798: EXPLAIN UPDATE/DELETE
- Address review feedback: rename nearly any name used by the new EXPLAIN code.
2013-10-05 09:58:22 +04:00
Sergey Petrunya
d998a1635f MDEV-5045: Server crashes in QPF_query::print_explain with log_slow_verbosity='explain'
- Don't print a plan when the statement didn't produce it
- Also, add first testcase. We can't check the EXPLAIN from the slow log itself, though.
2013-09-20 17:45:24 +04:00
Sergei Golubchik
8b5938a127 remove unused LEX::contains_plaintext_password 2013-09-21 16:44:49 +02:00
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Sergey Petrunya
2add402891 MDEV-407: Print EXPLAIN [ANALYZE] in the slow query log
- Initial implementation.
2013-09-19 08:33:58 +04:00
Sergei Golubchik
4ec2e9d7ed 5.5 merge and fixes for compiler/test errors 2013-09-18 13:07:31 +02:00
Sergey Petrunya
ae6e95c498 Code cleanup. 2013-09-17 16:03:40 +04:00
Sergey Vojtovich
6fc98018a4 MDEV-4902 - sql_yacc.yy incompatible with bison 3
- YYPARSE_PARAM and YYLEX_PARAM are removed in Bison 3.0. Deprecated
  since Bison 1.875 in favor of %lex-param, %parse-param.
- %parse-param adds an argument to yyerror() as well, updated
  MYSQLerror() accordingly.
- %parse-param allows to declare proper type for argument. That's
  what 99% of this patch is about.
2013-08-30 11:00:29 +04:00
Sergey Petrunya
662bfed027 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Merge with current 10.0-base
2013-08-24 00:46:49 +04:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Sergei Golubchik
97e640b9ae 5.5 merge 2013-07-17 21:24:29 +02:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
unknown
69ca523810 MDEV-4547 [PATCH] Make REFRESH_* constants to be 64-bit in 32-bit compilation
REFRESH_FAST do not fit in 32 bit
2013-07-16 15:16:38 +03:00
Sergei Golubchik
0ce9391008 fix for alter_table_online test.
Map ALTER ONLINE TABLE to ALTER TABLE ... ALGORITHM=INPLACE.
Make MERGE engine to announce its support of inplace operations.
2013-07-10 12:48:56 +02:00
Sergey Petrunya
ef47cc1f09 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Merge with 10.0-base
2013-06-27 18:28:14 +04:00
Sergey Petrunya
c0f7efb1ae Code cleanup 2013-06-27 16:28:57 +04:00
Sergey Petrunya
99a8bfe68c [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Update view.result (old EXPLAIN didn't match the execution)
- Put in a stub code to work around the 
  SELECT ... UNION SELECT ... ORDER BY (subuqery) problem
2013-06-27 01:00:22 +04:00
Sergei Golubchik
31a1934c9c MDEV-4660 SHUTDOWN command
Based on James Briggs contribution.
2013-06-24 20:56:49 +02:00
Sergey Petrunya
af5e128e50 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Handle statements inside SPs:
  = regular statements
  = SET command, which does not have its own statement.

- Handle execution of subquery from range optimizer: 
  allocate subquery QPFs on the same MEM_ROOT as the whole 
  query plan was allocated.
2013-06-21 13:26:53 +04:00
Sergey Petrunya
52cfa54c1d [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
Single table UPDATE/DELETE
- Correctly print type=SIMPLE vs type=PRIMARY
- Handle UPDATE/DELETE of mergeable VIEWs: we get the 
  VIEW's select as the first subquery. 
  (MySQL 5.6 doesn't print it because it finds that the
   subquery is not attached to any select)
2013-06-20 20:58:26 +04:00
Sergey Petrunya
0a560289aa [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Introduce back QueryPlan/QueryPlanFootprint separation for 
  single-table UPDATEs/DELETEs
- Create an empty QueryPlanFootprint for all kinds of queries
2013-06-20 15:15:24 +04:00
Sergey Petrunya
1951d40a88 [SHOW] EXPLAIN UPDATE/DELETE, code re-structuring
- Make EXPLAIN UPDATE/DELETE use "Query Plan Footprints", too.
2013-06-18 21:08:34 +04:00