~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/definitions.h

  • Committer: Brian Aker
  • Date: 2008-11-18 23:19:19 UTC
  • mfrom: (584.1.16 devel)
  • Revision ID: brian@tangent.org-20081118231919-w9sr347dtiwhccml
Merge of Monty's work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
 
391
391
  Move this out of here once Stew's done with UDF breakout.  The following headers need it:
392
392
 
393
 
    sql_lex.h --> included by sql_class.h
 
393
    sql_lex.h --> included by session.h
394
394
    item.h
395
395
    table.h
396
396
    item_func.h
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
 
 
1113
 
 
1114
enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE };
 
1115
enum enum_delay_key_write { DELAY_KEY_WRITE_NONE, DELAY_KEY_WRITE_ON,
 
1116
                            DELAY_KEY_WRITE_ALL };
 
1117
enum enum_slave_exec_mode { SLAVE_EXEC_MODE_STRICT,
 
1118
                            SLAVE_EXEC_MODE_IDEMPOTENT,
 
1119
                            SLAVE_EXEC_MODE_LAST_BIT};
 
1120
enum enum_mark_columns
 
1121
{ MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE};
 
1122
 
 
1123
enum enum_filetype { FILETYPE_CSV, FILETYPE_XML };
 
1124
 
 
1125
enum find_item_error_report_type {REPORT_ALL_ERRORS, REPORT_EXCEPT_NOT_FOUND,
 
1126
                                  IGNORE_ERRORS, REPORT_EXCEPT_NON_UNIQUE,
 
1127
                                  IGNORE_EXCEPT_NON_UNIQUE};
 
1128
 
 
1129
enum enum_schema_table_state
 
1130
{
 
1131
  NOT_PROCESSED= 0,
 
1132
  PROCESSED_BY_CREATE_SORT_INDEX,
 
1133
  PROCESSED_BY_JOIN_EXEC
 
1134
};
1025
1135
 
1026
1136
#endif /* DRIZZLE_SERVER_DEFINITIONS_H */
1027
1137