Merge mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-rev-1.2004.2.1

into  mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.1-tree


mysql-test/r/trigger-grant.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/trigger-grant.test:
  Merged.
sql/sql_trigger.cc:
  Merged.
This commit is contained in:
unknown 2006-02-06 15:23:17 +03:00
commit 18f4a81db2
7 changed files with 572 additions and 375 deletions

View file

@ -2172,6 +2172,8 @@ public:
/* Is this item represents row from NEW or OLD row ? */
enum row_version_type {OLD_ROW, NEW_ROW};
row_version_type row_version;
/* Is this item used for reading or updating the value? */
enum access_types { AT_READ = 0x1, AT_UPDATE = 0x2 };
/* Next in list of all Item_trigger_field's in trigger */
Item_trigger_field *next_trg_field;
/* Index of the field in the TABLE::field array */
@ -2181,18 +2183,24 @@ public:
Item_trigger_field(Name_resolution_context *context_arg,
row_version_type row_ver_arg,
const char *field_name_arg)
const char *field_name_arg,
access_types access_type_arg)
:Item_field(context_arg,
(const char *)NULL, (const char *)NULL, field_name_arg),
row_version(row_ver_arg), field_idx((uint)-1)
row_version(row_ver_arg), field_idx((uint)-1),
access_type(access_type_arg), table_grants(NULL)
{}
void setup_field(THD *thd, TABLE *table);
void setup_field(THD *thd, TABLE *table, GRANT_INFO *table_grant_info);
enum Type type() const { return TRIGGER_FIELD_ITEM; }
bool eq(const Item *item, bool binary_cmp) const;
bool fix_fields(THD *, Item **);
void print(String *str);
table_map used_tables() const { return (table_map)0L; }
void cleanup();
private:
access_types access_type;
GRANT_INFO *table_grants;
};