summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2022-03-19 18:40:33 +0200
committerVicențiu Ciorbaru <cvicentiu@gmail.com>2022-03-19 18:40:33 +0200
commitaf33efc048918c816d6ecef6a4d17acbc580334d (patch)
tree12c220218b66e39f0b1c8a17652734646e1c8e28
parent51d0da3fc295df06624054300280fd59dafe8fd5 (diff)
downloadmariadb-git-af33efc048918c816d6ecef6a4d17acbc580334d.tar.gz
Cleanup Priv_spec only declare what's in use
-rw-r--r--sql/sql_acl.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 116f17ecf97..c82a25b2522 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -145,21 +145,15 @@ public:
const privilege_t access; // Privilege bits that need to be applied / removed.
PRIV_TYPE spec_type;
const LEX_CSTRING db;
- const LEX_CSTRING table;
- const LEX_CSTRING column;
- const LEX_CSTRING routine;
Priv_spec(privilege_t access, bool revoke, bool deny=false):
revoke{revoke}, deny{deny}, access{access}, spec_type{PRIV_TYPE::GLOBAL_PRIV},
- db({.str= nullptr, .length= 0}), table({.str= nullptr, .length= 0}),
- column({.str= nullptr, .length= 0}), routine({.str= nullptr, .length= 0})
- { }
+ db({.str= nullptr, .length= 0})
+ {}
Priv_spec(privilege_t access, bool revoke, const LEX_CSTRING &db, bool deny=false):
revoke{revoke}, deny{deny}, access{access},
- spec_type{PRIV_TYPE::DATABASE_PRIV}, db{db},
- table({.str= nullptr, .length= 0}), column({.str= nullptr, .length= 0}),
- routine({.str= nullptr, .length= 0})
+ spec_type{PRIV_TYPE::DATABASE_PRIV}, db{db}
{ /* TODO(cvicentiu) hack */
if (!db.str)
spec_type= PRIV_TYPE::GLOBAL_PRIV;