MCPcopy Create free account
hub / github.com/MariaDB/server / check_some_access

Function check_some_access

sql/sql_parse.cc:7171–7190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7169*/
7170
7171bool check_some_access(THD *thd, privilege_t want_access, TABLE_LIST *table)
7172{
7173 DBUG_ENTER("check_some_access");
7174
7175 for (ulonglong bit= 1; bit < (ulonglong) want_access ; bit<<= 1)
7176 {
7177 if (bit & want_access)
7178 {
7179 privilege_t access= ALL_KNOWN_ACL & bit;
7180 if (!check_access(thd, access, table->db.str,
7181 &table->grant.privilege,
7182 &table->grant.m_internal,
7183 0, 1) &&
7184 !check_grant(thd, access, table, FALSE, 1, TRUE))
7185 DBUG_RETURN(0);
7186 }
7187 }
7188 DBUG_PRINT("exit",("no matching access rights"));
7189 DBUG_RETURN(1);
7190}
7191
7192#endif /*NO_EMBEDDED_ACCESS_CHECKS*/
7193

Callers 1

Calls 2

check_grantFunction · 0.85
check_accessFunction · 0.70

Tested by

no test coverage detected