372
370
void resetTable(Session *session, TableShare *share, uint32_t db_stat_arg);
374
372
/* SHARE methods */
375
inline const TableShare *getShare() const { assert(s); return s; } /* Get rid of this long term */
376
inline bool hasShare() const { return s ? true : false ; } /* Get rid of this long term */
377
inline TableShare *getMutableShare() { assert(s); return s; } /* Get rid of this long term */
378
inline void setShare(TableShare *new_share) { s= new_share; } /* Get rid of this long term */
379
inline uint32_t sizeKeys() { return s->sizeKeys(); }
380
inline uint32_t sizeFields() { return s->sizeFields(); }
381
inline uint32_t getRecordLength() const { return s->getRecordLength(); }
382
inline uint32_t sizeBlobFields() { return s->blob_fields; }
383
inline uint32_t *getBlobField() { return &s->blob_field[0]; }
373
virtual const TableShare *getShare() const { assert(_share); return _share; } /* Get rid of this long term */
374
virtual TableShare *getMutableShare() { assert(_share); return _share; } /* Get rid of this long term */
375
inline bool hasShare() const { return _share ? true : false ; } /* Get rid of this long term */
376
inline void setShare(TableShare *new_share) { _share= new_share; } /* Get rid of this long term */
377
inline uint32_t sizeKeys() { return _share->sizeKeys(); }
378
inline uint32_t sizeFields() { return _share->sizeFields(); }
379
inline uint32_t getRecordLength() const { return _share->getRecordLength(); }
380
inline uint32_t sizeBlobFields() { return _share->blob_fields; }
381
inline uint32_t *getBlobField() { return &_share->blob_field[0]; }
385
383
Field_blob *getBlobFieldAt(uint32_t arg) const
387
if (arg < s->blob_fields)
388
return (Field_blob*) field[s->blob_field[arg]]; /*NOTE: Using 'Table.field' NOT SharedTable.field. */
385
if (arg < getShare()->blob_fields)
386
return (Field_blob*) field[getShare()->blob_field[arg]]; /*NOTE: Using 'Table.field' NOT SharedTable.field. */
392
inline uint8_t getBlobPtrSize() { return s->blob_ptr_size; }
393
inline uint32_t getNullBytes() { return s->null_bytes; }
394
inline uint32_t getNullFields() { return s->null_fields; }
395
inline unsigned char *getDefaultValues() { return s->getDefaultValues(); }
396
inline const char *getSchemaName() const { return s->getSchemaName(); }
397
inline const char *getTableName() const { return s->getTableName(); }
390
inline uint8_t getBlobPtrSize() { return getShare()->blob_ptr_size; }
391
inline uint32_t getNullBytes() { return getShare()->null_bytes; }
392
inline uint32_t getNullFields() { return getShare()->null_fields; }
393
inline unsigned char *getDefaultValues() { return getMutableShare()->getDefaultValues(); }
394
inline const char *getSchemaName() const { return getShare()->getSchemaName(); }
395
inline const char *getTableName() const { return getShare()->getTableName(); }
399
inline bool isDatabaseLowByteFirst() { return s->db_low_byte_first; } /* Portable row format */
400
inline bool isNameLock() const { return s->isNameLock(); }
401
inline bool isReplaceWithNameLock() { return s->replace_with_name_lock; }
397
inline bool isDatabaseLowByteFirst() { return getShare()->db_low_byte_first; } /* Portable row format */
398
inline bool isNameLock() const { return getShare()->isNameLock(); }
399
inline bool isReplaceWithNameLock() { return getShare()->replace_with_name_lock; }
403
401
uint32_t index_flags(uint32_t idx) const
405
return s->storage_engine->index_flags(s->getKeyInfo(idx).algorithm);
403
return getShare()->storage_engine->index_flags(getShare()->getKeyInfo(idx).algorithm);
408
406
inline plugin::StorageEngine *getEngine() const /* table_type for handler */
410
return s->storage_engine;
408
return getShare()->storage_engine;
413
411
Cursor &getCursor() const /* table_type for handler */