diff options
author | bell@sanja.is.com.ua <> | 2005-07-05 13:36:36 +0300 |
---|---|---|
committer | bell@sanja.is.com.ua <> | 2005-07-05 13:36:36 +0300 |
commit | bfbd0e241b8ece9f212310116a69af20692790a0 (patch) | |
tree | 19204b6be884c68d59c350d709658364aa6ca45c /sql/sql_acl.h | |
parent | 1b59ffb8a8f0964b3bb5734908d139bbe80b417c (diff) | |
download | mariadb-git-bfbd0e241b8ece9f212310116a69af20692790a0.tar.gz |
added processing of view grants to table grants (BUG#9795)
Diffstat (limited to 'sql/sql_acl.h')
-rw-r--r-- | sql/sql_acl.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sql/sql_acl.h b/sql/sql_acl.h index f2896889669..eba000a627a 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -106,8 +106,15 @@ (((A) & DB_CHUNK2) >> 6) | \ (((A) & DB_CHUNK3) >> 9) | \ (((A) & DB_CHUNK4) >> 2)) -#define fix_rights_for_table(A) (((A) & 63) | (((A) & ~63) << 4)) -#define get_rights_for_table(A) (((A) & 63) | (((A) & ~63) >> 4)) +#define TBL_CHUNK0 DB_CHUNK0 +#define TBL_CHUNK1 DB_CHUNK1 +#define TBL_CHUNK2 (CREATE_VIEW_ACL | SHOW_VIEW_ACL) +#define fix_rights_for_table(A) (((A) & TBL_CHUNK0) | \ + (((A) << 4) & TBL_CHUNK1) | \ + (((A) << 11) & TBL_CHUNK2)) +#define get_rights_for_table(A) (((A) & TBL_CHUNK0) | \ + (((A) & TBL_CHUNK1) >> 4) | \ + (((A) & TBL_CHUNK2) >> 11)) #define fix_rights_for_column(A) (((A) & 7) | (((A) & ~7) << 8)) #define get_rights_for_column(A) (((A) & 7) | ((A) >> 8)) #define fix_rights_for_procedure(A) ((((A) << 18) & EXECUTE_ACL) | \ |