mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
Implement worklog #5743 InnoDB: Lift the limit of index key prefixes.
With this change, the index prefix column length lifted from 767 bytes to 3072 bytes if "innodb_large_prefix" is set to "true". rb://603 approved by Marko
This commit is contained in:
parent
53e9aabe12
commit
9e2b7fa7d5
31 changed files with 827 additions and 156 deletions
|
|
@ -30,6 +30,7 @@ Created September 2006 Marko Makela
|
|||
#include "row0types.h"
|
||||
#include "data0types.h"
|
||||
#include "mem0mem.h"
|
||||
#include "dict0types.h"
|
||||
|
||||
/********************************************************************//**
|
||||
Creates a cache of column prefixes of externally stored columns.
|
||||
|
|
@ -43,13 +44,13 @@ row_ext_create(
|
|||
in the InnoDB table object, as reported by
|
||||
dict_col_get_no(); NOT relative to the records
|
||||
in the clustered index */
|
||||
ulint flags, /*!< in: table->flags */
|
||||
const dtuple_t* tuple, /*!< in: data tuple containing the field
|
||||
references of the externally stored
|
||||
columns; must be indexed by col_no;
|
||||
the clustered index record must be
|
||||
covered by a lock or a page latch
|
||||
to prevent deletion (rollback or purge). */
|
||||
ulint zip_size,/*!< compressed page size in bytes, or 0 */
|
||||
mem_heap_t* heap); /*!< in: heap where created */
|
||||
|
||||
/********************************************************************//**
|
||||
|
|
@ -63,7 +64,8 @@ row_ext_lookup_ith(
|
|||
const row_ext_t* ext, /*!< in/out: column prefix cache */
|
||||
ulint i, /*!< in: index of ext->ext[] */
|
||||
ulint* len); /*!< out: length of prefix, in bytes,
|
||||
at most REC_MAX_INDEX_COL_LEN */
|
||||
at most the length determined by
|
||||
DICT_MAX_FIELD_LEN_BY_FORMAT() */
|
||||
/********************************************************************//**
|
||||
Looks up a column prefix of an externally stored column.
|
||||
@return column prefix, or NULL if the column is not stored externally,
|
||||
|
|
@ -78,13 +80,18 @@ row_ext_lookup(
|
|||
dict_col_get_no(); NOT relative to the
|
||||
records in the clustered index */
|
||||
ulint* len); /*!< out: length of prefix, in bytes,
|
||||
at most REC_MAX_INDEX_COL_LEN */
|
||||
at most the length determined by
|
||||
DICT_MAX_FIELD_LEN_BY_FORMAT() */
|
||||
|
||||
/** Prefixes of externally stored columns */
|
||||
struct row_ext_struct{
|
||||
ulint n_ext; /*!< number of externally stored columns */
|
||||
const ulint* ext; /*!< col_no's of externally stored columns */
|
||||
byte* buf; /*!< backing store of the column prefix cache */
|
||||
ulint max_len;/*!< maximum prefix length, it could be
|
||||
REC_ANTELOPE_MAX_INDEX_COL_LEN or
|
||||
REC_VERSION_56_MAX_INDEX_COL_LEN depending
|
||||
on row format */
|
||||
ulint len[1]; /*!< prefix lengths; 0 if not cached */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue