338
340
#define IS_EQUAL_PACK_LENGTH 2
342
Query type constants.
344
QT_ORDINARY -- ordinary SQL query.
345
QT_IS -- SQL query to be shown in INFORMATION_SCHEMA (in utf8 and without
346
character set introducers).
350
Move this out of here once Stew's done with UDF breakout. The following headers need it:
352
sql_lex.h --> included by session.h
370
* @TODO Move to a separate header?
372
* It's needed by item.h and field.h, which are both inter-dependent
373
* and contain forward declarations of many structs/classes in the
376
* What is needed is a separate header file that is included
377
* by *both* item.h and field.h to resolve inter-dependencies
379
* But, probably want to hold off on this until Stew finished the UDF cleanup
383
DERIVATION_IGNORABLE= 5,
384
DERIVATION_COERCIBLE= 4,
385
DERIVATION_SYSCONST= 3,
386
DERIVATION_IMPLICIT= 2,
388
DERIVATION_EXPLICIT= 0
392
* Opening modes for open_temporary_table and open_table_from_share
394
* @TODO Put this into an appropriate header. It is only needed in:
406
enum enum_parsing_place
415
enum enum_mysql_completiontype {
418
, ROLLBACK_AND_CHAIN= 7
421
, COMMIT_AND_CHAIN= 6
424
enum enum_check_fields
428
, CHECK_FIELD_ERROR_FOR_NULL
439
343
typedef uint64_t query_id_t;
440
344
typedef void *range_seq_t;
601
505
#define HA_CHECK_DUP_UNIQUE 2
602
506
#define HA_CHECK_DUP (HA_CHECK_DUP_KEY + HA_CHECK_DUP_UNIQUE)
604
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
605
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
606
ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, ROW_TYPE_PAGE };
608
enum column_format_type { COLUMN_FORMAT_TYPE_NOT_USED= -1,
609
COLUMN_FORMAT_TYPE_DEFAULT= 0,
610
COLUMN_FORMAT_TYPE_FIXED= 1,
611
COLUMN_FORMAT_TYPE_DYNAMIC= 2 };
613
/* struct to hold information about the table that should be created */
615
509
/* Bits in used_fields */
616
510
#define HA_CREATE_USED_AUTO (1L << 0)
688
580
#define HA_MRR_NO_NULL_ENDPOINTS 128
690
enum enum_ha_read_modes { RFIRST, RNEXT, RPREV, RLAST, RKEY, RNEXT_SAME };
692
enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED,
693
ISO_REPEATABLE_READ, ISO_SERIALIZABLE};
696
enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED};
699
583
#define MYF(v) (myf) (v)
702
When a command is added here, be sure it's also added in mysqld.cc
703
in "struct show_var_st status_vars[]= {" ...
705
If the command returns a result set or is not allowed in stored
706
functions or triggers, please also make sure that
707
sp_get_flags_for_command (sp_head.cc) returns proper flags for the
711
enum enum_sql_command {
712
SQLCOM_SELECT, SQLCOM_CREATE_TABLE, SQLCOM_CREATE_INDEX, SQLCOM_ALTER_TABLE,
713
SQLCOM_UPDATE, SQLCOM_INSERT, SQLCOM_INSERT_SELECT,
714
SQLCOM_DELETE, SQLCOM_TRUNCATE, SQLCOM_DROP_TABLE, SQLCOM_DROP_INDEX,
715
SQLCOM_SHOW_DATABASES, SQLCOM_SHOW_TABLES, SQLCOM_SHOW_FIELDS,
716
SQLCOM_SHOW_KEYS, SQLCOM_SHOW_VARIABLES, SQLCOM_SHOW_STATUS,
717
SQLCOM_SHOW_ENGINE_STATUS, SQLCOM_SHOW_ENGINE_MUTEX,
718
SQLCOM_SHOW_PROCESSLIST,
720
SQLCOM_SHOW_CREATE_DB,
721
SQLCOM_SHOW_TABLE_STATUS,
724
SQLCOM_UNLOCK_TABLES,
725
SQLCOM_CHANGE_DB, SQLCOM_CREATE_DB, SQLCOM_DROP_DB, SQLCOM_ALTER_DB,
726
SQLCOM_REPLACE, SQLCOM_REPLACE_SELECT,
727
SQLCOM_OPTIMIZE, SQLCOM_CHECK,
728
SQLCOM_ASSIGN_TO_KEYCACHE,
729
SQLCOM_FLUSH, SQLCOM_KILL, SQLCOM_ANALYZE,
730
SQLCOM_ROLLBACK, SQLCOM_ROLLBACK_TO_SAVEPOINT,
731
SQLCOM_COMMIT, SQLCOM_SAVEPOINT, SQLCOM_RELEASE_SAVEPOINT,
732
SQLCOM_SLAVE_START, SQLCOM_SLAVE_STOP,
735
SQLCOM_SHOW_OPEN_TABLES,
736
SQLCOM_DELETE_MULTI, SQLCOM_UPDATE_MULTI,
743
When a command is added here, be sure it's also added in mysqld.cc
744
in "struct show_var_st status_vars[]= {" ...
746
/* This should be the last !!! */
750
enum enum_duplicates { DUP_ERROR, DUP_REPLACE, DUP_UPDATE };
752
585
#define MY_I_S_MAYBE_NULL 1
753
586
#define MY_I_S_UNSIGNED 2
778
611
#define MY_COLL_ALLOW_CONV 3
779
612
#define MY_COLL_DISALLOW_NONE 4
780
613
#define MY_COLL_CMP_CONV 7
785
NO_TMP_TABLE, NON_TRANSACTIONAL_TMP_TABLE, TRANSACTIONAL_TMP_TABLE,
786
INTERNAL_TMP_TABLE, SYSTEM_TMP_TABLE, TMP_TABLE_FRM_FILE_ONLY
790
Values in this enum are used to indicate how a tables TIMESTAMP field
791
should be treated. It can be set to the current timestamp on insert or
793
WARNING: The values are used for bit operations. If you change the
794
enum, you must keep the bitwise relation of the values. For example:
795
(int) TIMESTAMP_AUTO_SET_ON_BOTH must be equal to
796
(int) TIMESTAMP_AUTO_SET_ON_INSERT | (int) TIMESTAMP_AUTO_SET_ON_UPDATE.
797
We use an enum here so that the debugger can display the value names.
799
enum timestamp_auto_set_type
801
TIMESTAMP_NO_AUTO_SET= 0, TIMESTAMP_AUTO_SET_ON_INSERT= 1,
802
TIMESTAMP_AUTO_SET_ON_UPDATE= 2, TIMESTAMP_AUTO_SET_ON_BOTH= 3
804
614
#define clear_timestamp_auto_bits(_target_, _bits_) \
805
615
(_target_)= (enum timestamp_auto_set_type)((int)(_target_) & ~(int)(_bits_))
808
Category of table found in the table share.
810
enum enum_table_category
815
TABLE_UNKNOWN_CATEGORY=0,
819
The table is visible only in the session.
821
- FLUSH TABLES WITH READ LOCK
822
- SET GLOBAL READ_ONLY = ON
823
do not apply to this table.
824
Note that LOCK Table t FOR READ/WRITE
825
can be used on temporary tables.
826
Temporary tables are not part of the table cache.
828
TABLE_CATEGORY_TEMPORARY=1,
832
These tables do honor:
833
- LOCK Table t FOR READ/WRITE
834
- FLUSH TABLES WITH READ LOCK
835
- SET GLOBAL READ_ONLY = ON
836
User tables are cached in the table cache.
838
TABLE_CATEGORY_USER=2,
841
Information schema tables.
842
These tables are an interface provided by the system
843
to inspect the system metadata.
844
These tables do *not* honor:
845
- LOCK Table t FOR READ/WRITE
846
- FLUSH TABLES WITH READ LOCK
847
- SET GLOBAL READ_ONLY = ON
848
as there is no point in locking explicitely
849
an INFORMATION_SCHEMA table.
850
Nothing is directly written to information schema tables.
851
Note that this value is not used currently,
852
since information schema tables are not shared,
853
but implemented as session specific temporary tables.
856
TODO: Fixing the performance issues of I_S will lead
857
to I_S tables in the table cache, which should use
860
TABLE_CATEGORY_INFORMATION
863
enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE };
864
enum enum_delay_key_write { DELAY_KEY_WRITE_NONE, DELAY_KEY_WRITE_ON,
865
DELAY_KEY_WRITE_ALL };
866
enum enum_mark_columns
867
{ MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE};
869
enum enum_filetype { FILETYPE_CSV, FILETYPE_XML };
871
enum find_item_error_report_type {REPORT_ALL_ERRORS, REPORT_EXCEPT_NOT_FOUND,
872
IGNORE_ERRORS, REPORT_EXCEPT_NON_UNIQUE,
873
IGNORE_EXCEPT_NON_UNIQUE};
875
enum enum_schema_table_state
878
PROCESSED_BY_CREATE_SORT_INDEX,
879
PROCESSED_BY_JOIN_EXEC
883
618
* The following are for the interface with the .frm file