YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense alongwiththisprogram;ifnot,writetotheFreeSoftware
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#include"mariadb.h" #include"sql_acl.h"
bool Grant_privilege::add_column_privilege(THD *thd, const Lex_ident_sys &name,
privilege_t which_grant)
{
String *new_str= new (thd->mem_root) String((constchar*) name.str,
name.length,
system_charset_info); if (unlikely(new_str == NULL)) returntrue;
List_iterator <LEX_COLUMN> iter(m_columns); class LEX_COLUMN *point; while ((point=iter++))
{ if (Lex_ident_column::charset_info()->streq(point->column.to_lex_cstring(),
name)) break;
}
m_column_privilege_total|= which_grant; if (point)
{
point->rights |= which_grant; returnfalse;
}
LEX_COLUMN *col= new (thd->mem_root) LEX_COLUMN(*new_str, which_grant); if (unlikely(col == NULL)) returntrue; return m_columns.push_back(col, thd->mem_root);
}
m_db= ident.m_db; if (m_all_privileges)
m_object_privilege= ident.all_privileges_by_type();
m_object_privilege|= with_grant_option; switch (ident.m_type)
{ case Lex_grant_object_name::STAR: case Lex_grant_object_name::IDENT_STAR: case Lex_grant_object_name::STAR_STAR: if (!m_all_privileges && m_columns.elements)
{ // e.g. GRANT SELECT (a) ON db.*
my_error(ER_ILLEGAL_GRANT_FOR_TABLE, MYF(0)); returntrue;
} returnfalse; case Lex_grant_object_name::TABLE_IDENT:
m_db= ident.m_table_ident->db; return !sel->add_table_to_list(thd, ident.m_table_ident,
NULL, TL_OPTION_UPDATING);
} returnfalse; // Make gcc happy
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.