summaryrefslogtreecommitdiff
path: root/sql/privilege.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2020-02-12 18:26:18 +0400
committerAlexander Barkov <bar@mariadb.com>2020-02-28 15:58:31 +0400
commite26056e181e92332eb622ae096f7faa4e333b4f3 (patch)
treef6dda57f6c071ddcca953c8d664eee7a1ad69260 /sql/privilege.h
parent0c35e80dc9ff24bcb8e710cb8cb16428c8c9986f (diff)
downloadmariadb-git-e26056e181e92332eb622ae096f7faa4e333b4f3.tar.gz
MDEV-21704 Add a new JSON field "version_id" into mysql.global_priv.priv
Diffstat (limited to 'sql/privilege.h')
-rw-r--r--sql/privilege.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/privilege.h b/sql/privilege.h
index 6f12546796e..5dbc0b6dbdf 100644
--- a/sql/privilege.h
+++ b/sql/privilege.h
@@ -58,7 +58,7 @@ enum privilege_t: unsigned long long
EVENT_ACL = (1UL << 26),
TRIGGER_ACL = (1UL << 27),
CREATE_TABLESPACE_ACL = (1UL << 28),
- DELETE_HISTORY_ACL = (1UL << 29),
+ DELETE_HISTORY_ACL = (1UL << 29), // Added in 10.3.4
/*
don't forget to update
1. static struct show_privileges_st sys_privileges[]
@@ -66,12 +66,19 @@ enum privilege_t: unsigned long long
3. mysql_system_tables.sql and mysql_system_tables_fix.sql
4. acl_init() or whatever - to define behaviour for old privilege tables
5. sql_yacc.yy - for GRANT/REVOKE to work
- 6. ALL_KNOWN_ACL
+ 6. Add a new ALL_KNOWN_ACL_VERSION
+ 7. Change ALL_KNOWN_ACL to ALL_KNOWN_ACL_VERSION
+ 8. Update User_table_json::get_access()
*/
- ALL_KNOWN_ACL = (1UL << 30) - 1 // A combination of all defined bits
+
+ // A combination of all bits defined in 10.3.4 (and earlier)
+ ALL_KNOWN_ACL_100304 = (1UL << 30) - 1
};
+constexpr privilege_t ALL_KNOWN_ACL= ALL_KNOWN_ACL_100304;
+
+
// Unary operators
static inline constexpr ulonglong operator~(privilege_t access)
{