~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definitions.h

  • Committer: Monty Taylor
  • Date: 2008-11-17 07:23:53 UTC
  • mto: (589.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081117072353-tc8ykdsycno0cc5u
Split out a little more code. Removed table_list.h from common_includes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1022
1022
   MONOTONIC_STRICT_INCREASING /* F() is unary and (x < y) => (F(x) <  F(y)) */
1023
1023
} enum_monotonicity_info;
1024
1024
 
 
1025
enum tmp_table_type
 
1026
{
 
1027
  NO_TMP_TABLE, NON_TRANSACTIONAL_TMP_TABLE, TRANSACTIONAL_TMP_TABLE,
 
1028
  INTERNAL_TMP_TABLE, SYSTEM_TMP_TABLE, TMP_TABLE_FRM_FILE_ONLY
 
1029
};
 
1030
 
 
1031
/*
 
1032
  Values in this enum are used to indicate how a tables TIMESTAMP field
 
1033
  should be treated. It can be set to the current timestamp on insert or
 
1034
  update or both.
 
1035
  WARNING: The values are used for bit operations. If you change the
 
1036
  enum, you must keep the bitwise relation of the values. For example:
 
1037
  (int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
 
1038
  (int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
 
1039
  We use an enum here so that the debugger can display the value names.
 
1040
*/
 
1041
enum timestamp_auto_set_type
 
1042
{
 
1043
  TIMESTAMP_NO_AUTO_SET= 0, TIMESTAMP_AUTO_SET_ON_INSERT= 1,
 
1044
  TIMESTAMP_AUTO_SET_ON_UPDATE= 2, TIMESTAMP_AUTO_SET_ON_BOTH= 3
 
1045
};
 
1046
#define clear_timestamp_auto_bits(_target_, _bits_) \
 
1047
  (_target_)= (enum timestamp_auto_set_type)((int)(_target_) & ~(int)(_bits_))
 
1048
 
 
1049
/**
 
1050
  Category of table found in the table share.
 
1051
*/
 
1052
enum enum_table_category
 
1053
{
 
1054
  /**
 
1055
    Unknown value.
 
1056
  */
 
1057
  TABLE_UNKNOWN_CATEGORY=0,
 
1058
 
 
1059
  /**
 
1060
    Temporary table.
 
1061
    The table is visible only in the session.
 
1062
    Therefore,
 
1063
    - FLUSH TABLES WITH READ LOCK
 
1064
    - SET GLOBAL READ_ONLY = ON
 
1065
    do not apply to this table.
 
1066
    Note that LOCK Table t FOR READ/WRITE
 
1067
    can be used on temporary tables.
 
1068
    Temporary tables are not part of the table cache.
 
1069
  */
 
1070
  TABLE_CATEGORY_TEMPORARY=1,
 
1071
 
 
1072
  /**
 
1073
    User table.
 
1074
    These tables do honor:
 
1075
    - LOCK Table t FOR READ/WRITE
 
1076
    - FLUSH TABLES WITH READ LOCK
 
1077
    - SET GLOBAL READ_ONLY = ON
 
1078
    User tables are cached in the table cache.
 
1079
  */
 
1080
  TABLE_CATEGORY_USER=2,
 
1081
 
 
1082
  /**
 
1083
    Information schema tables.
 
1084
    These tables are an interface provided by the system
 
1085
    to inspect the system metadata.
 
1086
    These tables do *not* honor:
 
1087
    - LOCK Table t FOR READ/WRITE
 
1088
    - FLUSH TABLES WITH READ LOCK
 
1089
    - SET GLOBAL READ_ONLY = ON
 
1090
    as there is no point in locking explicitely
 
1091
    an INFORMATION_SCHEMA table.
 
1092
    Nothing is directly written to information schema tables.
 
1093
    Note that this value is not used currently,
 
1094
    since information schema tables are not shared,
 
1095
    but implemented as session specific temporary tables.
 
1096
  */
 
1097
  /*
 
1098
    TODO: Fixing the performance issues of I_S will lead
 
1099
    to I_S tables in the table cache, which should use
 
1100
    this table type.
 
1101
  */
 
1102
  TABLE_CATEGORY_INFORMATION
 
1103
};
 
1104
 
 
1105
/* Information for one open table */
 
1106
enum index_hint_type
 
1107
{
 
1108
  INDEX_HINT_IGNORE,
 
1109
  INDEX_HINT_USE,
 
1110
  INDEX_HINT_FORCE
 
1111
};
 
1112
 
1025
1113
 
1026
1114
#endif /* DRIZZLE_SERVER_DEFINITIONS_H */
1027
1115