Nirbhay Choubey
90e4f7f9d3
* bzr merge -rtag:mariadb-10.0.9 maria/10.0
...
* Fix for post-merge build failures.
2014-03-26 14:27:24 -04:00
Sergey Vojtovich
b95c8ce530
MDEV-5675 - Performance: my_hash_sort_bin is called too often
...
Reduced number of my_hash_sort_bin() calls from 4 to 1 per query.
Reduced number of memory accesses done by my_hash_sort_bin().
Details:
- let MDL subsystem use pre-calculated hash value for hash
inserts and deletes
- let table cache use pre-calculated MDL hash value
- MDL namespace is excluded from hash value calculation, so that
hash value can be used by table cache as is
- hash value for MDL is calculated as resulting hash value + MDL
namespace
- extended hash implementation to accept user defined hash function
2014-03-06 16:19:12 +04:00
Sergei Golubchik
0dc23679c8
10.0-base merge
2014-02-26 15:28:07 +01:00
Sergei Golubchik
0b9a0a3517
5.5 merge
2014-02-25 16:04:35 +01:00
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
84651126c0
MySQL-5.5.36 merge
...
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Sergei Golubchik
dba4e82a84
MDEV-5525 Assertion `status == 0' fails on creating user after granting it role admin option
...
don't add entries to acl_roles_mappings hash for non-existing grantees.
2014-01-29 11:00:06 +01:00
Sergei Golubchik
416148a4cf
MDEV-5526 Assertion `proxied_user->host.length' fails on GRANT PROXY ON <role>
...
recognize the context better:
always treat the barename as a username in the username context
2014-01-29 00:05:24 +01:00
Sergei Golubchik
5a385146ae
MDEV-5523 Server crashes on DROP USER <rolename>
...
use 'user_name' for the error message (fixed, after get_current_user()),
not the original tmp_user_name, as it comes from the parser (host == NULL).
2014-01-28 21:11:56 +01:00
Sergei Golubchik
03b428d2cd
MDEV-5520 Connection lost on wrong CREATE ROLE
2014-01-28 21:01:21 +01:00
Jan Lindström
d43afb8828
Merge MariaDB-10.0.7 revision 3961.
2014-01-25 11:02:49 +02:00
Murthy Narkedimilli
c92223e198
Updated/added copyright headers
2014-01-06 10:52:35 +05:30
Vicentiu Ciorbaru
ad5ddaff12
Fix for:
...
MDEV-5221: User auto-creation does not work upon GRANT <role>
2013-12-18 15:39:09 +02:00
Sergei Golubchik
ff485d2dc4
MDEV-5438 A view can mask a table that supports discovery
2013-12-13 14:26:10 +01:00
Sergei Golubchik
cec76b3861
correct old assert in add_role_user_mapping_action to match changed function prototypes.
...
fix the element deleting logic for roles_mappings_hash
2013-12-09 12:39:31 +01:00
Sergei Golubchik
517b1f4fb4
cleanups:
...
* comments from WL#5602 in sql_acl.cc
* rename global memroots in sql_acl.cc
* remove the second empty lex string constant
2013-12-09 12:38:30 +01:00
Sergei Golubchik
e252af7b7e
reuse new safe_net_field_length_ll function where appropriate
2013-12-09 12:38:09 +01:00
Sergei Golubchik
bec1d903d9
Do the partial merge of WL#5602 correctly:
...
Remove unused code (that should not have been merged)
Add protocol extension (that should have been merged)
Fix bugs (see pack.c)
2013-12-09 12:38:02 +01:00
Seppo Jaakola
496e22cf3b
merge with MariaDB 5.6 bzr merge lp:maria --rtag:mariadb-10.0.6
...
and a number of fixes to make this buildable.
Run also few short multi-master high conflict rate tests, with no issues
2013-12-04 10:32:43 +02:00
Sergei Golubchik
5290811c5c
MDEV-5367 Server crashes in acl_authenticate on concurrent thread connection, FLUSH PRIVILEGES
...
fix a copy-paste error, introduced in role refactoring
2013-12-01 12:16:24 +01:00
Sergei Golubchik
09b63917be
MDEV-5238 Server crashes in find_role_grant_pair on SHOW GRANTS for an anonymous user
2013-11-10 17:50:52 +01:00
Sergei Golubchik
0150dc6ed9
10.0-base merge
2013-11-04 21:47:54 +01:00
Sergei Golubchik
79d2e6c82f
MDEV-5232 SET ROLE checks privileges differently from check_access()
...
use the same inconsistent priv_user@host pair for SET ROLE privilege checks,
just as check_access() does
2013-11-04 13:37:39 +01:00
Sergei Golubchik
ed4a31e8d5
10.0-base merge
2013-11-02 17:59:16 +01:00
Sergei Golubchik
1f0368658b
MDEV-5225 Server crashes on CREATE USER|ROLE CURRENT_ROLE or DROP ROLE CURRENT_ROLE
2013-11-02 16:26:01 +01:00
Sergei Golubchik
0fdb3bcfdb
10.0-base merge (roles)
2013-10-29 15:08:44 +01:00
Sergei Golubchik
fef4166990
Don't allow authentication clauses for roles, in particular:
...
GRANT ... IDENTIFIED BY [ PASSWORD ] ...
GRANT ... IDENTIFIED VIA ... [ USING ... ]
GRANT ... REQUIRE ...
GRANT ... MAX_xxx ...
SET PASSWORD FOR ... = ...
2013-10-28 07:46:17 +01:00
Sergei Golubchik
d5c9712225
post-review cleanup
2013-10-27 08:19:21 +01:00
Sergei Golubchik
e46eea8660
remove inherited routine grants when a routine is dropped
2013-10-26 15:52:29 +02:00
Vicențiu Ciorbaru
2eed3b7d07
Implemented REVOKE ALL FROM for Roles and role grants.
2013-10-26 15:38:48 +02:00
Sergei Golubchik
65eee0be5f
MDEV-5176 Server crashes in fill_schema_applicable_roles on select from APPLICABLE_ROLES after a suicide
...
Don't assume that thd->security_ctx->priv_user is an actually existing user account
2013-10-23 09:54:10 -07:00
Sergei Golubchik
7761a278f6
MDEV-5170 Assertion `(&(&acl_cache->lock)->m_mutex)->count > 0 && pthread_equal(pthread_self(), (&(&acl_cache->lock)->m_mutex)->thread)' fails after restarting server with a pre-created role grants
...
lock acl_cache->lock mutex for the duration of acl_load
2013-10-23 09:49:47 -07:00
Sergei Golubchik
f6b8f6d156
reset the db privilege cache when revoking db priviges on DROP ROLE
2013-10-23 05:09:17 -07:00
Sergei Golubchik
614478921f
MDEV-5172 safe_mutex: Trying to lock mutex when the mutex was already locked on using a role and I_S role tables
...
don't forget to unlock if the current role isn't found
2013-10-23 03:28:41 -07:00
Sergei Golubchik
fd826cc3bd
properly propagate privilege changes on DROP ROLE
2013-10-23 03:26:09 -07:00
Sergei Golubchik
82037f9c0e
don't rebuild all parent_grantees/role_grants arrays when a role is dropped,
...
only remove this role from the arrays where it is present.
2013-10-23 03:25:24 -07:00
Sergei Golubchik
779693f409
fixes for builbot 1
2013-10-20 16:39:51 -07:00
Sergei Golubchik
c1c0a83772
ACL_USER methods for comparing ACL_USER objects
2013-10-20 08:51:49 +02:00
Sergei Golubchik
ce68878947
fixes for embedded
2013-10-18 18:56:28 -07:00
Sergei Golubchik
cb9d3bec46
post-review changes
2013-10-18 15:54:41 -07:00
Sergei Golubchik
40c43c395b
remove old incorrect bugfix that moved reading of procs_priv table into a separate function.
...
FLUSH PRIVILEGES no longer returns an error, when it was successful.
LOCK_grant is no longed unlocked/relocked between tables_priv and procs_priv
2013-10-18 15:52:33 -07:00
Sergei Golubchik
f74b9eca6e
remove ER_RESERVED_ROLE.
...
Only allow NONE instead of a role name in SET ROLE.
Don't allow PUBLIC as a role name anywhere (to be fixed later)
Fix db_access calculations on SET ROLE
Reduce the size of role_grants and parent_grantee per-user/role arrays.
Fix the wording and specify the correct sqlstate for ER_INVALID_ROLE
2013-10-18 15:52:26 -07:00
Sergei Golubchik
4ec26a7c2d
replication of GRANT role statement
2013-10-18 13:18:03 -07:00
Sergei Golubchik
4d3e4c2984
make functions static, remove unused constructors, other small cleanups
2013-10-18 13:17:42 -07:00
Sergei Golubchik
d2c683527f
recursive privilege propagation for roles.
...
functions for traversing the role graph in either direction.
merging of global, database, table, column, routine privileges.
debug status variables for counting number of privilege merges.
tests.
2013-10-18 13:06:41 -07:00
Sergei Golubchik
b221ec6529
enforce privileges for GRANT role
2013-10-18 12:34:59 -07:00
Sergei Golubchik
2f2699f97b
cleanup.
...
mainly to avoid the pattern of
* get username/hostname/rolename
* optionally find the corresponding ACL_USER and ACL_ROLE
* allocate memory, concatenate username/hostname/rolename
* call a function passing only this memory as an argument
** use concatenated username/etc to find ACL_USER and ACL_ROLE again
** do something
* free the object
Also to undo push_dynamic we use pop_dynamic now,
not a linear search/scan through the dynamic array.
as a bonus, role@ is now an invalid way to refer to a role.
2013-10-18 12:34:44 -07:00
Sergei Golubchik
f1a71b6815
bugfix: missing restore_record when modifying roles_mapping() table.
...
(and an assert in myisam to catch these bugs easier in the future)
update tests/results
2013-10-18 12:27:07 -07:00
Sergei Golubchik
e5211e0cde
information_schema.applicable_roles.is_grantable column
2013-10-18 12:26:43 -07:00
Sergei Golubchik
67985b283a
require SUPER to specify an arbitrary admin
2013-10-18 12:26:29 -07:00