43
43
/*************************************************************************/
47
NO_TMP_TABLE, NON_TRANSACTIONAL_TMP_TABLE, TRANSACTIONAL_TMP_TABLE,
48
INTERNAL_TMP_TABLE, SYSTEM_TMP_TABLE, TMP_TABLE_FRM_FILE_ONLY
51
46
bool mysql_frm_type(Session *session, char *path, enum legacy_db_type *dbt);
55
Values in this enum are used to indicate how a tables TIMESTAMP field
56
should be treated. It can be set to the current timestamp on insert or
58
WARNING: The values are used for bit operations. If you change the
59
enum, you must keep the bitwise relation of the values. For example:
60
(int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
61
(int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
62
We use an enum here so that the debugger can display the value names.
64
enum timestamp_auto_set_type
66
TIMESTAMP_NO_AUTO_SET= 0, TIMESTAMP_AUTO_SET_ON_INSERT= 1,
67
TIMESTAMP_AUTO_SET_ON_UPDATE= 2, TIMESTAMP_AUTO_SET_ON_BOTH= 3
69
#define clear_timestamp_auto_bits(_target_, _bits_) \
70
(_target_)= (enum timestamp_auto_set_type)((int)(_target_) & ~(int)(_bits_))
72
49
class Field_timestamp;
76
Category of table found in the table share.
78
enum enum_table_category
83
TABLE_UNKNOWN_CATEGORY=0,
87
The table is visible only in the session.
89
- FLUSH TABLES WITH READ LOCK
90
- SET GLOBAL READ_ONLY = ON
91
do not apply to this table.
92
Note that LOCK Table t FOR READ/WRITE
93
can be used on temporary tables.
94
Temporary tables are not part of the table cache.
96
TABLE_CATEGORY_TEMPORARY=1,
100
These tables do honor:
101
- LOCK Table t FOR READ/WRITE
102
- FLUSH TABLES WITH READ LOCK
103
- SET GLOBAL READ_ONLY = ON
104
User tables are cached in the table cache.
106
TABLE_CATEGORY_USER=2,
109
Information schema tables.
110
These tables are an interface provided by the system
111
to inspect the system metadata.
112
These tables do *not* honor:
113
- LOCK Table t FOR READ/WRITE
114
- FLUSH TABLES WITH READ LOCK
115
- SET GLOBAL READ_ONLY = ON
116
as there is no point in locking explicitely
117
an INFORMATION_SCHEMA table.
118
Nothing is directly written to information schema tables.
119
Note that this value is not used currently,
120
since information schema tables are not shared,
121
but implemented as session specific temporary tables.
124
TODO: Fixing the performance issues of I_S will lead
125
to I_S tables in the table cache, which should use
128
TABLE_CATEGORY_INFORMATION
130
52
typedef enum enum_table_category TABLE_CATEGORY;
132
54
TABLE_CATEGORY get_table_category(const LEX_STRING *db,