

Public Member Functions | |
| GRANT_NAME (const char *h, const char *d, const char *u, const char *t, ulong p) | |
| GRANT_NAME (TABLE *form) | |
| virtual | ~GRANT_NAME () |
| virtual bool | ok () |
Public Attributes | |
| acl_host_and_ip | host |
| char * | db |
| char * | user |
| char * | tname |
| char * | hash_key |
| ulong | privs |
| ulong | sort |
| uint | key_length |
Definition at line 2216 of file sql_acl.cc.
| GRANT_NAME::GRANT_NAME | ( | const char * | h, | |
| const char * | d, | |||
| const char * | u, | |||
| const char * | t, | |||
| ulong | p | |||
| ) |
Definition at line 2247 of file sql_acl.cc.
References alloc_root(), db, files_charset_info, get_sort(), hash_key, host, acl_host_and_ip::hostname, key_length, lower_case_table_names, memex, my_casedn_str, sort, strdup_root(), strlen(), strmov(), tname, update_hostname(), and user.
02249 :privs(p) 02250 { 02251 /* Host given by user */ 02252 update_hostname(&host, strdup_root(&memex, h)); 02253 db = strdup_root(&memex,d); 02254 user = strdup_root(&memex,u); 02255 sort= get_sort(3,host.hostname,db,user); 02256 tname= strdup_root(&memex,t); 02257 if (lower_case_table_names) 02258 { 02259 my_casedn_str(files_charset_info, db); 02260 my_casedn_str(files_charset_info, tname); 02261 } 02262 key_length =(uint) strlen(d)+(uint) strlen(u)+(uint) strlen(t)+3; 02263 hash_key = (char*) alloc_root(&memex,key_length); 02264 strmov(strmov(strmov(hash_key,user)+1,db)+1,tname); 02265 }
Here is the call graph for this function:

| GRANT_NAME::GRANT_NAME | ( | TABLE * | form | ) |
Definition at line 2277 of file sql_acl.cc.
References alloc_root(), db, st_table::field, files_charset_info, fix_rights_for_table, get_field(), get_sort(), hash_key, host, acl_host_and_ip::hostname, key_length, lower_case_table_names, memex, my_casedn_str, privs, sort, strlen(), strmov(), tname, update_hostname(), user, and Field::val_int().
02278 { 02279 update_hostname(&host, get_field(&memex, form->field[0])); 02280 db= get_field(&memex,form->field[1]); 02281 user= get_field(&memex,form->field[2]); 02282 if (!user) 02283 user= (char*) ""; 02284 sort= get_sort(3, host.hostname, db, user); 02285 tname= get_field(&memex,form->field[3]); 02286 if (!db || !tname) 02287 { 02288 /* Wrong table row; Ignore it */ 02289 privs= 0; 02290 return; /* purecov: inspected */ 02291 } 02292 if (lower_case_table_names) 02293 { 02294 my_casedn_str(files_charset_info, db); 02295 my_casedn_str(files_charset_info, tname); 02296 } 02297 key_length = ((uint) strlen(db) + (uint) strlen(user) + 02298 (uint) strlen(tname) + 3); 02299 hash_key = (char*) alloc_root(&memex,key_length); 02300 strmov(strmov(strmov(hash_key,user)+1,db)+1,tname); 02301 privs = (ulong) form->field[6]->val_int(); 02302 privs = fix_rights_for_table(privs); 02303 }
Here is the call graph for this function:

| virtual GRANT_NAME::~GRANT_NAME | ( | ) | [inline, virtual] |
| virtual bool GRANT_NAME::ok | ( | ) | [inline, virtual] |
Reimplemented in GRANT_TABLE.
Definition at line 2228 of file sql_acl.cc.
References privs.
Referenced by grant_load().
02228 { return privs != 0; }
Here is the caller graph for this function:

| char* GRANT_NAME::db |
Definition at line 2220 of file sql_acl.cc.
Referenced by fill_schema_column_privileges(), fill_schema_table_privileges(), GRANT_NAME(), GRANT_TABLE::GRANT_TABLE(), mysql_revoke_all(), show_routine_grants(), and sp_revoke_privileges().
| char * GRANT_NAME::hash_key |
Definition at line 2219 of file sql_acl.cc.
Referenced by fill_schema_column_privileges(), fill_schema_table_privileges(), grant_load(), GRANT_NAME(), GRANT_TABLE::GRANT_TABLE(), handle_grant_struct(), mysql_revoke_all(), mysql_show_grants(), name_hash_search(), show_routine_grants(), and sp_revoke_privileges().
Definition at line 2221 of file sql_acl.cc.
Referenced by check_routine_level_acl(), fill_effective_table_privileges(), fill_schema_column_privileges(), fill_schema_table_privileges(), get_column_grant(), get_table_grant(), grant_load(), GRANT_NAME(), GRANT_TABLE::GRANT_TABLE(), mysql_show_grants(), GRANT_TABLE::ok(), ok(), replace_routine_table(), replace_table_table(), and show_routine_grants().
| char * GRANT_NAME::tname |
Definition at line 2220 of file sql_acl.cc.
Referenced by fill_schema_column_privileges(), fill_schema_table_privileges(), grant_load(), GRANT_NAME(), GRANT_TABLE::GRANT_TABLE(), mysql_revoke_all(), show_routine_grants(), and sp_revoke_privileges().
| char * GRANT_NAME::user |
Definition at line 2220 of file sql_acl.cc.
Referenced by fill_schema_column_privileges(), fill_schema_table_privileges(), grant_load(), GRANT_NAME(), GRANT_TABLE::GRANT_TABLE(), handle_grant_struct(), mysql_revoke_all(), mysql_show_grants(), show_routine_grants(), and sp_revoke_privileges().
1.4.7

