summaryrefslogtreecommitdiff
path: root/sql/sql_acl.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-07-05 13:36:36 +0300
committerunknown <bell@sanja.is.com.ua>2005-07-05 13:36:36 +0300
commit200f03fdd4b5a6272789c18a1250f1d790b9e177 (patch)
tree19204b6be884c68d59c350d709658364aa6ca45c /sql/sql_acl.h
parentbf851ae2a0d3fc1b45a81739046ab05d7285b666 (diff)
downloadmariadb-git-200f03fdd4b5a6272789c18a1250f1d790b9e177.tar.gz
added processing of view grants to table grants (BUG#9795)
mysql-test/r/grant.result: test of new table privileges mysql-test/r/system_mysql_db.result: added new table priveleges mysql-test/r/view_grant.result: error changed mysql-test/t/grant.test: test of new table privileges mysql-test/t/view_grant.test: error changed scripts/mysql_create_system_tables.sh: add new table privileges scripts/mysql_fix_privilege_tables.sql: fixed system tables fix script sql/sql_acl.h: fixed coding/decoding new tables grants
Diffstat (limited to 'sql/sql_acl.h')
-rw-r--r--sql/sql_acl.h11
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) | \