331
331
#define HA_ADMIN_INVALID -5
332
332
#define HA_ADMIN_REJECT -6
334
/* Bits in table_flags() to show what database can do */
336
#define HA_NO_TRANSACTIONS (1 << 0) /* Doesn't support transactions */
337
#define HA_PARTIAL_COLUMN_READ (1 << 1) /* read may not return all columns */
338
#define HA_TABLE_SCAN_ON_INDEX (1 << 2) /* No separate data/index file */
341
Reading keys in random order is as fast as reading keys in sort order
342
(Used in records.cc to decide if we should use a record cache and by
343
filesort to decide if we should sort key + data or key + pointer-to-row
345
#define HA_FAST_KEY_READ (1 << 5)
347
Set the following flag if we on delete should force all key to be read
348
and on update read all keys that changes
350
#define HA_REQUIRES_KEY_COLUMNS_FOR_DELETE (1 << 6)
351
#define HA_NULL_IN_KEY (1 << 7) /* One can have keys with NULL */
352
#define HA_DUPLICATE_POS (1 << 8) /* ha_position() gives dup row */
353
#define HA_NO_BLOBS (1 << 9) /* Doesn't support blobs */
354
#define HA_CAN_INDEX_BLOBS (1 << 10)
355
#define HA_AUTO_PART_KEY (1 << 11) /* auto-increment in multi-part key */
356
#define HA_REQUIRE_PRIMARY_KEY (1 << 12) /* .. and can't create a hidden one */
357
#define HA_STATS_RECORDS_IS_EXACT (1 << 13) /* stats.records is exact */
359
If we get the primary key columns for free when we do an index read
360
It also implies that we have to retrive the primary key when using
361
position() and rnd_pos().
363
#define HA_PRIMARY_KEY_IN_READ_INDEX (1 << 15)
365
If HA_PRIMARY_KEY_REQUIRED_FOR_POSITION is set, it means that to position()
366
uses a primary key. Without primary key, we can't call position().
368
#define HA_PRIMARY_KEY_REQUIRED_FOR_POSITION (1 << 16)
369
334
#define HA_NOT_DELETE_WITH_CACHE (1 << 18)
371
The following is we need to a primary key to delete (and update) a row.
372
If there is no primary key, all columns needs to be read on update and delete
374
#define HA_PRIMARY_KEY_REQUIRED_FOR_DELETE (1 << 19)
375
#define HA_NO_PREFIX_CHAR_KEYS (1 << 20)
376
#define HA_NO_AUTO_INCREMENT (1 << 23)
377
#define HA_HAS_CHECKSUM (1 << 24)
378
#define HA_NEED_READ_RANGE_BUFFER (1 << 29) /* for read_multi_range */
379
#define HA_ANY_INDEX_MAY_BE_UNIQUE (1 << 30)
380
#define HA_HAS_RECORDS (INT64_C(1) << 32) /* records() gives exact count*/
381
#define HA_MRR_CANT_SORT (INT64_C(1) << 34)
383
336
/* bits in index_flags(index_number) for what you can do with index */
384
337
#define HA_READ_NEXT 1 /* TODO really use this flag */
512
465
#define MY_I_S_UNSIGNED 2
515
#define SKIP_OPEN_TABLE 0 // do not open table
516
#define OPEN_FRM_ONLY 1 // open FRM file only
517
#define OPEN_FULL_TABLE 2 // open FRM,MYD, MYI files
520
469
"Declared Type Collation"
521
470
A combination of collation and its derivation.