InnoDB Plugin  1.0
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
dict0mem.h File Reference
#include "univ.i"
#include "dict0types.h"
#include "data0type.h"
#include "mem0mem.h"
#include "row0types.h"
#include "rem0types.h"
#include "btr0types.h"
#include "lock0types.h"
#include "que0types.h"
#include "sync0rw.h"
#include "ut0mem.h"
#include "ut0lst.h"
#include "ut0rnd.h"
#include "ut0byte.h"
#include "hash0hash.h"
#include "trx0types.h"
#include "fts0fts.h"
#include "os0once.h"
#include <set>
#include <algorithm>
#include <iterator>
#include "dict0mem.ic"
Include dependency graph for dict0mem.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dict_col_t
struct  dict_field_t
struct  zip_pad_info_t
struct  dict_index_t
struct  dict_foreign_t
struct  dict_foreign_print
struct  dict_foreign_compare
struct  dict_foreign_with_index
struct  dict_foreign_different_tables
struct  dict_foreign_matches_id
struct  dict_foreign_not_exists
struct  dict_foreign_set_free
struct  dict_table_t
struct  dict_foreign_add_to_referenced_table

Macros

#define DICT_TF2_FLAG_SET(table, flag)   (table->flags2 |= (flag))
#define DICT_TF2_FLAG_IS_SET(table, flag)   (table->flags2 & (flag))
#define DICT_TF2_FLAG_UNSET(table, flag)   (table->flags2 &= ~(flag))
#define DICT_FK_MAX_RECURSIVE_LOAD   20
#define FK_MAX_CASCADE_DEL   255
#define DICT_ANTELOPE_MAX_INDEX_COL_LEN   REC_ANTELOPE_MAX_INDEX_COL_LEN
 DICT_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and is the maximum indexed column length (or indexed prefix length) in ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT. Also, in any format, any fixed-length field that is longer than this will be encoded as a variable-length field.
#define DICT_MAX_FIELD_LEN_BY_FORMAT(table)
#define DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG(flags)
#define DICT_MAX_FIXED_COL_LEN   DICT_ANTELOPE_MAX_INDEX_COL_LEN
#define ZIP_PAD_ROUND_LEN   (128)
#define ZIP_PAD_SUCCESSFUL_ROUND_LIMIT   (5)
#define ZIP_PAD_INCR   (128)
#define MAX_KEY_LENGTH_BITS   12
#define DICT_INDEX_MAGIC_N   76789786
#define DICT_TABLE_IN_DDL   -1
#define DICT_TABLE_MAGIC_N   76333786
#define DICT_CLUSTERED   1
#define DICT_UNIQUE   2
#define DICT_UNIVERSAL   4
#define DICT_IBUF   8
#define DICT_CORRUPT   16
#define DICT_FTS
#define DICT_IT_BITS   6
#define DICT_TF_REDUNDANT   0
#define DICT_TF_COMPACT   1
#define DICT_N_COLS_COMPACT   0x80000000UL
#define DICT_TF_WIDTH_COMPACT   1
#define DICT_TF_WIDTH_ZIP_SSIZE   4
#define DICT_TF_WIDTH_ATOMIC_BLOBS   1
#define DICT_TF_WIDTH_DATA_DIR   1
#define DICT_TF_BITS
#define DICT_TF_BIT_MASK   (~(~0 << DICT_TF_BITS))
#define DICT_TF_POS_COMPACT   0
#define DICT_TF_POS_ZIP_SSIZE
#define DICT_TF_POS_ATOMIC_BLOBS
#define DICT_TF_POS_DATA_DIR
#define DICT_TF_POS_UNUSED
#define DICT_TF_MASK_COMPACT
#define DICT_TF_MASK_ZIP_SSIZE
#define DICT_TF_MASK_ATOMIC_BLOBS
#define DICT_TF_MASK_DATA_DIR
#define DICT_TF_GET_COMPACT(flags)
#define DICT_TF_GET_ZIP_SSIZE(flags)
#define DICT_TF_HAS_ATOMIC_BLOBS(flags)
#define DICT_TF_HAS_DATA_DIR(flags)
#define DICT_TF_GET_UNUSED(flags)   (flags >> DICT_TF_POS_UNUSED)
#define DICT_TF2_BITS   7
 Table Flags set number 2.
#define DICT_TF2_BIT_MASK   ~(~0 << DICT_TF2_BITS)
#define DICT_TF2_TEMPORARY   1
#define DICT_TF2_FTS_HAS_DOC_ID   2
#define DICT_TF2_FTS   4
#define DICT_TF2_FTS_ADD_DOC_ID   8
#define DICT_TF2_USE_TABLESPACE   16
#define DICT_TF2_DISCARDED   32
#define DICT_TF2_FTS_AUX_HEX_NAME   64
#define DICT_FOREIGN_ON_DELETE_CASCADE   1
#define DICT_FOREIGN_ON_DELETE_SET_NULL   2
#define DICT_FOREIGN_ON_UPDATE_CASCADE   4
#define DICT_FOREIGN_ON_UPDATE_SET_NULL   8
#define DICT_FOREIGN_ON_DELETE_NO_ACTION   16
#define DICT_FOREIGN_ON_UPDATE_NO_ACTION   32
#define DICT_TABLE_IN_USED   -1
#define DICT_STATS_PERSISTENT_ON   (1 << 1)
#define DICT_STATS_PERSISTENT_OFF   (1 << 2)
#define DICT_STATS_AUTO_RECALC_ON   (1 << 1)
#define DICT_STATS_AUTO_RECALC_OFF   (1 << 2)
#define BG_STAT_NONE   0
#define BG_STAT_IN_PROGRESS   (1 << 0)
#define BG_STAT_SHOULD_QUIT   (1 << 1)

Typedefs

typedef std::set
< dict_foreign_t
*, dict_foreign_compare
dict_foreign_set

Enumerations

enum  online_index_status { ONLINE_INDEX_COMPLETE = 0, ONLINE_INDEX_CREATION, ONLINE_INDEX_ABORTED, ONLINE_INDEX_ABORTED_DROPPED }

Functions

UNIV_INTERN dict_table_tdict_mem_table_create (const char *name, ulint space, ulint n_cols, ulint flags, ulint flags2)
UNIV_INTERN void dict_mem_table_free (dict_table_t *table)
UNIV_INTERN void dict_mem_table_add_col (dict_table_t *table, mem_heap_t *heap, const char *name, ulint mtype, ulint prtype, ulint len)))
UNIV_INTERN void dict_mem_table_col_rename (dict_table_t *table, unsigned nth_col, const char *from, const char *to))
UNIV_INTERN void dict_mem_fill_column_struct (dict_col_t *column, ulint col_pos, ulint mtype, ulint prtype, ulint col_len)
UNIV_INLINE void dict_mem_fill_index_struct (dict_index_t *index, mem_heap_t *heap, const char *table_name, const char *index_name, ulint space, ulint type, ulint n_fields)
UNIV_INTERN dict_index_tdict_mem_index_create (const char *table_name, const char *index_name, ulint space, ulint type, ulint n_fields)
UNIV_INTERN void dict_mem_index_add_field (dict_index_t *index, const char *name, ulint prefix_len)
UNIV_INTERN void dict_mem_index_free (dict_index_t *index)
UNIV_INTERN dict_foreign_tdict_mem_foreign_create (void)
UNIV_INTERN void dict_mem_foreign_table_name_lookup_set (dict_foreign_t *foreign, ibool do_alloc)
UNIV_INTERN void dict_mem_referenced_table_name_lookup_set (dict_foreign_t *foreign, ibool do_alloc)
UNIV_INTERN char * dict_mem_create_temporary_tablename (mem_heap_t *heap, const char *dbtab, table_id_t id)
void dict_mem_init (void)
std::ostream & operator<< (std::ostream &out, const dict_foreign_t &foreign)
std::ostream & operator<< (std::ostream &out, const dict_foreign_set &fk_set)
bool dict_foreign_set_validate (const dict_foreign_set &fk_set)
bool dict_foreign_set_validate (const dict_table_t &table)
void dict_foreign_free (dict_foreign_t *foreign)
void dict_table_autoinc_destroy (dict_table_t *table)
void dict_table_autoinc_alloc (void *table_void)
void dict_index_zip_pad_alloc (void *index_void)
void dict_table_autoinc_create_lazy (dict_table_t *table)
void dict_index_zip_pad_mutex_create_lazy (dict_index_t *index)
void dict_index_zip_pad_mutex_destroy (dict_index_t *index)
void dict_index_zip_pad_unlock (dict_index_t *index)
bool dict_table_autoinc_own (const dict_table_t *table)

Variables

ulong zip_failure_threshold_pct
ulong zip_pad_max

Detailed Description

Data dictionary memory object creation

Created 1/8/1996 Heikki Tuuri

Macro Definition Documentation

#define BG_STAT_IN_PROGRESS   (1 << 0)

BG_STAT_IN_PROGRESS is set in stats_bg_flag when the background stats code is working on this table. The DROP TABLE code waits for this to be cleared before proceeding.

#define BG_STAT_SHOULD_QUIT   (1 << 1)

BG_STAT_SHOULD_QUIT is set in stats_bg_flag when DROP TABLE starts waiting on BG_STAT_IN_PROGRESS to be cleared, the background stats thread will detect this and will eventually quit sooner

#define DICT_ANTELOPE_MAX_INDEX_COL_LEN   REC_ANTELOPE_MAX_INDEX_COL_LEN

DICT_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and is the maximum indexed column length (or indexed prefix length) in ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT. Also, in any format, any fixed-length field that is longer than this will be encoded as a variable-length field.

It is set to 3*256, so that one can create a column prefix index on 256 characters of a TEXT or VARCHAR column also in the UTF-8 charset. In that charset, a character may take at most 3 bytes. This constant MUST NOT BE CHANGED, or the compatibility of InnoDB data files would be at risk!

#define DICT_CLUSTERED   1
Type flags of an index: OR'ing of the flags is allowed to define a

combination of types clustered index

#define DICT_CORRUPT   16

bit to store the corrupted flag in SYS_INDEXES.TYPE

#define DICT_FK_MAX_RECURSIVE_LOAD   20
Tables could be chained together with Foreign key constraint. When

first load the parent table, we would load all of its descedents. This could result in rescursive calls and out of stack error eventually. DICT_FK_MAX_RECURSIVE_LOAD defines the maximum number of recursive loads, when exceeded, the child table will not be loaded. It will be loaded when the foreign constraint check needs to be run.

#define DICT_FOREIGN_ON_DELETE_CASCADE   1
The flags for ON_UPDATE and ON_DELETE can be ORed; the default is that

a foreign key constraint is enforced, therefore RESTRICT just means no flag ON DELETE CASCADE

#define DICT_FOREIGN_ON_DELETE_NO_ACTION   16

ON DELETE NO ACTION

#define DICT_FOREIGN_ON_DELETE_SET_NULL   2

ON UPDATE SET NULL

#define DICT_FOREIGN_ON_UPDATE_CASCADE   4

ON DELETE CASCADE

#define DICT_FOREIGN_ON_UPDATE_NO_ACTION   32

ON UPDATE NO ACTION

#define DICT_FOREIGN_ON_UPDATE_SET_NULL   8

ON UPDATE SET NULL

#define DICT_FTS
Value:
32 /* FTS index; can't be combined with the
other flags */
#define DICT_IBUF   8

insert buffer tree

#define DICT_INDEX_MAGIC_N   76789786
#define DICT_IT_BITS   6

number of bits used for SYS_INDEXES.TYPE

#define DICT_MAX_FIELD_LEN_BY_FORMAT (   table)
Value:
? (REC_ANTELOPE_MAX_INDEX_COL_LEN - 1) \
Find out maximum indexed column length by its table format.

For ROW_FORMAT=REDUNDANT and ROW_FORMAT=COMPACT, the maximum field length is REC_ANTELOPE_MAX_INDEX_COL_LEN - 1 (767). For Barracuda row formats COMPRESSED and DYNAMIC, the length could be REC_VERSION_56_MAX_INDEX_COL_LEN (3072) bytes

#define DICT_MAX_FIELD_LEN_BY_FORMAT_FLAG (   flags)
Value:
? (REC_ANTELOPE_MAX_INDEX_COL_LEN - 1) \
#define DICT_MAX_FIXED_COL_LEN   DICT_ANTELOPE_MAX_INDEX_COL_LEN

Defines the maximum fixed length column size

#define DICT_N_COLS_COMPACT   0x80000000UL
This bitmask is used in SYS_TABLES.N_COLS to set and test whether

the Compact page format is used, i.e ROW_FORMAT != REDUNDANT

#define DICT_TABLE_MAGIC_N   76333786
#define DICT_TF2_BITS   7

Table Flags set number 2.

These flags will be stored in SYS_TABLES.MIX_LEN. All unused flags will be written as 0. The column may contain garbage for tables created with old versions of InnoDB that only implemented ROW_FORMAT=REDUNDANT. InnoDB engines do not check these flags for unknown bits in order to protect backward incompatibility. Total number of bits in table->flags2.

#define DICT_TF2_DISCARDED   32

Set when we discard/detach the tablespace

#define DICT_TF2_FTS   4

The table has an FTS index

#define DICT_TF2_FTS_ADD_DOC_ID   8
Need to add Doc ID column for FTS index build.

This is a transient bit for index build

#define DICT_TF2_FTS_AUX_HEX_NAME   64
This bit is set if all aux table names (both common tables and

index tables) of a FTS table are in HEX format.

#define DICT_TF2_FTS_HAS_DOC_ID   2

The table has an internal defined DOC ID column

#define DICT_TF2_TEMPORARY   1

TEMPORARY; TRUE for tables from CREATE TEMPORARY TABLE.

#define DICT_TF2_USE_TABLESPACE   16
This bit is used during table creation to indicate that it will

use its own tablespace instead of the system tablespace.

#define DICT_TF_BIT_MASK   (~(~0 << DICT_TF_BITS))

A mask of all the known/used bits in table flags

#define DICT_TF_BITS
Value:

Width of all the currently known table flags

#define DICT_TF_COMPACT   1

dict_table_t::flags bit 0 is equal to 1 if the row format = Compact Compact row format.

#define DICT_TF_GET_COMPACT (   flags)
Value:

Return the value of the COMPACT field

#define DICT_TF_GET_UNUSED (   flags)    (flags >> DICT_TF_POS_UNUSED)

Return the contents of the UNUSED bits

#define DICT_TF_GET_ZIP_SSIZE (   flags)
Value:

Return the value of the ZIP_SSIZE field

#define DICT_TF_HAS_ATOMIC_BLOBS (   flags)
Value:

Return the value of the ATOMIC_BLOBS field

#define DICT_TF_HAS_DATA_DIR (   flags)
Value:

Return the value of the ATOMIC_BLOBS field

#define DICT_TF_MASK_ATOMIC_BLOBS
Value:

Bit mask of the ATOMIC_BLOBS field

#define DICT_TF_MASK_COMPACT
Value:

Bit mask of the COMPACT field

#define DICT_TF_MASK_DATA_DIR
Value:

Bit mask of the DATA_DIR field

#define DICT_TF_MASK_ZIP_SSIZE
Value:

Bit mask of the ZIP_SSIZE field

#define DICT_TF_POS_ATOMIC_BLOBS
Value:

Zero relative shift position of the ATOMIC_BLOBS field

#define DICT_TF_POS_COMPACT   0

Zero relative shift position of the COMPACT field

#define DICT_TF_POS_DATA_DIR
Value:

Zero relative shift position of the DATA_DIR field

#define DICT_TF_POS_UNUSED
Value:

Zero relative shift position of the start of the UNUSED bits

#define DICT_TF_POS_ZIP_SSIZE
Value:

Zero relative shift position of the ZIP_SSIZE field

#define DICT_TF_REDUNDANT   0

dict_table_t::flags bit 0 is equal to 0 if the row format = Redundant Redundant row format.

#define DICT_TF_WIDTH_ATOMIC_BLOBS   1
Width of the ATOMIC_BLOBS flag.  The Antelope file formats broke up

BLOB and TEXT fields, storing the first 768 bytes in the clustered index. Brracuda row formats store the whole blob or text field off-page atomically. Secondary indexes are created from this external data using row_ext_t to cache the BLOB prefixes.

#define DICT_TF_WIDTH_COMPACT   1

Width of the COMPACT flag

#define DICT_TF_WIDTH_DATA_DIR   1
If a table is created with the MYSQL option DATA DIRECTORY and

innodb-file-per-table, an older engine will not be able to find that table. This flag prevents older engines from attempting to open the table and allows InnoDB to update_create_info() accordingly.

#define DICT_TF_WIDTH_ZIP_SSIZE   4

Width of the ZIP_SSIZE flag

#define DICT_UNIQUE   2

unique index

#define DICT_UNIVERSAL   4

index which can contain records from any other index

#define FK_MAX_CASCADE_DEL   255
Similarly, when tables are chained together with foreign key constraints

with on cascading delete/update clause, delete from parent table could result in recursive cascading calls. This defines the maximum number of such cascading deletes/updates allowed. When exceeded, the delete from parent table will fail, and user has to drop excessive foreign constraint before proceeds.

#define ZIP_PAD_INCR   (128)

Amount by which padding is increased.

#define ZIP_PAD_ROUND_LEN   (128)

PADDING HEURISTIC BASED ON LINEAR INCREASE OF PADDING TO AVOID COMPRESSION FAILURES (Note: this is relevant only for compressed indexes) GOAL: Avoid compression failures by maintaining information about the compressibility of data. If data is not very compressible then leave some extra space 'padding' in the uncompressed page making it more likely that compression of less than fully packed uncompressed page will succeed.

This padding heuristic works by increasing the pad linearly until the desired failure rate is reached. A "round" is a fixed number of compression operations. After each round, the compression failure rate for that round is computed. If the failure rate is too high, then padding is incremented by a fixed value, otherwise it's left intact. If the compression failure is lower than the desired rate for a fixed number of consecutive rounds, then the padding is decreased by a fixed value. This is done to prevent overshooting the padding value, and to accommodate the possible change in data compressibility. Number of zip ops in one round.

#define ZIP_PAD_SUCCESSFUL_ROUND_LIMIT   (5)

Number of successful rounds after which the padding is decreased

Enumeration Type Documentation

The status of online index creation

Enumerator:
ONLINE_INDEX_COMPLETE 

the index is complete and ready for access

ONLINE_INDEX_CREATION 

the index is being created, online (allowing concurrent modifications)

ONLINE_INDEX_ABORTED 

secondary index creation was aborted and the index should be dropped as soon as index->table->n_ref_count reaches 0, or online table rebuild was aborted and the clustered index of the original table should soon be restored to ONLINE_INDEX_COMPLETE

ONLINE_INDEX_ABORTED_DROPPED 

the online index creation was aborted, the index was dropped from the data dictionary and the tablespace, and it should be dropped from the data dictionary cache as soon as index->table->n_ref_count reaches 0.

Function Documentation

void dict_foreign_free ( dict_foreign_t foreign)
inline

Frees a foreign key struct.

Parameters
foreignin, own: foreign key struct
bool dict_foreign_set_validate ( const dict_foreign_set &  fk_set)
Validate the search order in the foreign key set.
Parameters
[in]fk_setthe foreign key set to be validated
Returns
true if search order is fine in the set, false otherwise.
bool dict_foreign_set_validate ( const dict_table_t table)
Validate the search order in the foreign key sets of the table

(foreign_set and referenced_set).

Parameters
[in]tabletable whose foreign key sets are to be validated
Returns
true if foreign key sets are fine, false otherwise.
void dict_index_zip_pad_alloc ( void *  index_void)
Allocate and init the zip_pad_mutex of a given index.

This function must not be called concurrently on the same index object.

Parameters
[in,out]index_voidindex whose zip_pad_mutex to create
void dict_index_zip_pad_mutex_create_lazy ( dict_index_t index)
inline
Request a lazy creation of dict_index_t::zip_pad::mutex.

This function is only called from either single threaded environment or from a thread that has not shared the table object with other threads.

Parameters
[in,out]indexindex whose zip_pad mutex is to be created
void dict_index_zip_pad_mutex_destroy ( dict_index_t index)
inline
Destroy the zip_pad_mutex of the given index.

This function is only called from either single threaded environment or from a thread that has not shared the table object with other threads.

Parameters
[in,out]tabletable whose stats latch to destroy
void dict_index_zip_pad_unlock ( dict_index_t index)
inline
Release the zip_pad_mutex of a given index.
Parameters
[in,out]indexindex whose zip_pad_mutex is to be released
UNIV_INTERN char* dict_mem_create_temporary_tablename ( mem_heap_t heap,
const char *  dbtab,
table_id_t  id 
)
Create a temporary tablename like "#sql-ibtid-inc where

tid = the Table ID inc = a randomly initialized number that is incremented for each file The table ID is a 64 bit integer, can use up to 20 digits, and is initialized at bootstrap. The second number is 32 bits, can use up to 10 digits, and is initialized at startup to a randomly distributed number. It is hoped that the combination of these two numbers will provide a reasonably unique temporary file name.

Parameters
[in]heapA memory heap
[in]dbtabTable name in the form database/table name
[in]idTable id
Returns
A unique temporary tablename suitable for InnoDB use
UNIV_INTERN void dict_mem_fill_column_struct ( dict_col_t column,
ulint  col_pos,
ulint  mtype,
ulint  prtype,
ulint  col_len 
)

This function populates a dict_col_t memory structure with supplied information. in: column length

Parameters
columnout: column struct to be filled
col_posin: column position
mtypein: main data type
prtypein: precise type
UNIV_INLINE void dict_mem_fill_index_struct ( dict_index_t index,
mem_heap_t heap,
const char *  table_name,
const char *  index_name,
ulint  space,
ulint  type,
ulint  n_fields 
)

This function poplulates a dict_index_t index memory structure with supplied information. in: number of fields

This function poplulates a dict_index_t index memory structure with supplied information.

Parameters
indexout: index to be filled
heapin: memory heap
table_namein: table name
index_namein: index name
spacein: space where the index tree is placed, ignored if the index is of the clustered type
typein: DICT_UNIQUE, DICT_CLUSTERED, ... ORed
n_fieldsin: number of fields
UNIV_INTERN dict_foreign_t* dict_mem_foreign_create ( void  )

Creates and initializes a foreign constraint memory object.

Returns
own: foreign constraint struct
UNIV_INTERN void dict_mem_foreign_table_name_lookup_set ( dict_foreign_t foreign,
ibool  do_alloc 
)

Sets the foreign_table_name_lookup pointer based on the value of lower_case_table_names. If that is 0 or 1, foreign_table_name_lookup will point to foreign_table_name. If 2, then another string is allocated from the heap and set to lower case. in: is an alloc needed

Parameters
foreignin/out: foreign struct
UNIV_INTERN void dict_mem_index_add_field ( dict_index_t index,
const char *  name,
ulint  prefix_len 
)

Adds a field definition to an index. NOTE: does not take a copy of the column name if the field is a column. The memory occupied by the column name may be released only after publishing the index. in: 0 or the column prefix length in a MySQL index like INDEX (textcol(25))

Parameters
indexin: index
namein: column name
UNIV_INTERN dict_index_t* dict_mem_index_create ( const char *  table_name,
const char *  index_name,
ulint  space,
ulint  type,
ulint  n_fields 
)

Creates an index memory object.

Returns
own: index object in: number of fields
Parameters
table_namein: table name
index_namein: index name
spacein: space where the index tree is placed, ignored if the index is of the clustered type
typein: DICT_UNIQUE, DICT_CLUSTERED, ... ORed
UNIV_INTERN void dict_mem_index_free ( dict_index_t index)

Frees an index memory object. in: index

void dict_mem_init ( void  )

Initialize dict memory variables

UNIV_INTERN void dict_mem_referenced_table_name_lookup_set ( dict_foreign_t foreign,
ibool  do_alloc 
)

Sets the referenced_table_name_lookup pointer based on the value of lower_case_table_names. If that is 0 or 1, referenced_table_name_lookup will point to referenced_table_name. If 2, then another string is allocated from the heap and set to lower case. in: is an alloc needed

Parameters
foreignin/out: foreign struct
UNIV_INTERN void dict_mem_table_add_col ( dict_table_t table,
mem_heap_t heap,
const char *  name,
ulint  mtype,
ulint  prtype,
ulint  len 
)

Adds a column definition to a table.

Parameters
tablein: table
heapin: temporary memory heap, or NULL
namein: column name, or NULL
mtypein: main datatype
prtypein: precise type
lenin: precision
UNIV_INTERN void dict_mem_table_col_rename ( dict_table_t table,
unsigned  nth_col,
const char *  from,
const char *  to 
)

Renames a column of a table in the data dictionary cache.

Parameters
tablein/out: table
nth_colin: column index
fromin: old column name
toin: new column name
UNIV_INTERN dict_table_t* dict_mem_table_create ( const char *  name,
ulint  space,
ulint  n_cols,
ulint  flags,
ulint  flags2 
)

Creates a table memory object.

Returns
own: table object in: table flags2
Parameters
namein: table name
spacein: space where the clustered index of the table is placed
n_colsin: number of columns
flagsin: table flags
UNIV_INTERN void dict_mem_table_free ( dict_table_t table)

Free a table memory object. in: table

void dict_table_autoinc_alloc ( void *  table_void)
Allocate and init the autoinc latch of a given table.

This function must not be called concurrently on the same table object.

Parameters
[in,out]table_voidtable whose autoinc latch to create
void dict_table_autoinc_create_lazy ( dict_table_t table)
inline
Request for lazy creation of the autoinc latch of a given table.

This function is only called from either single threaded environment or from a thread that has not shared the table object with other threads.

Parameters
[in,out]tabletable whose autoinc latch is to be created.
void dict_table_autoinc_destroy ( dict_table_t table)
inline
Destroy the autoinc latch of the given table.

This function is only called from either single threaded environment or from a thread that has not shared the table object with other threads.

Parameters
[in,out]tabletable whose stats latch to destroy
bool dict_table_autoinc_own ( const dict_table_t table)
inline
Check if the current thread owns the autoinc_mutex of a given table.
Parameters
[in]tablethe autoinc_mutex belongs to this table
Returns
true, if the current thread owns the autoinc_mutex, false otherwise.

Variable Documentation

ulong zip_failure_threshold_pct
Percentage of compression failures that are allowed in a single

round

ulong zip_pad_max
Maximum percentage of a page that can be allowed as a pad to avoid

compression failures