MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
data0data.cc File Reference
#include "data0data.h"
#include "rem0rec.h"
#include "rem0cmp.h"
#include "page0page.h"
#include "page0zip.h"
#include "dict0dict.h"
#include "btr0cur.h"
#include <ctype.h>
Include dependency graph for data0data.cc:

Go to the source code of this file.

Functions

UNIV_INTERN int dtuple_coll_cmp (const dtuple_t *tuple1, const dtuple_t *tuple2)
UNIV_INTERN void dtuple_set_n_fields (dtuple_t *tuple, ulint n_fields)
UNIV_INTERN ibool dtuple_check_typed_no_assert (const dtuple_t *tuple)
UNIV_INTERN void dfield_print (const dfield_t *dfield)
UNIV_INTERN void dfield_print_also_hex (const dfield_t *dfield)
UNIV_INTERN void dtuple_print (FILE *f, const dtuple_t *tuple)
UNIV_INTERN big_rec_tdtuple_convert_big_rec (dict_index_t *index, dtuple_t *entry, ulint *n_ext)
UNIV_INTERN void dtuple_convert_back_big_rec (dict_index_t *index __attribute__((unused)), dtuple_t *entry, big_rec_t *vector)

Detailed Description

SQL data field and tuple

Created 5/30/1994 Heikki Tuuri

Definition in file data0data.cc.

Function Documentation

UNIV_INTERN void dfield_print ( const dfield_t dfield)

Pretty prints a dfield value according to its data type.

Parameters
dfieldin: dfield

Definition at line 278 of file data0data.cc.

Here is the call graph for this function:

UNIV_INTERN void dfield_print_also_hex ( const dfield_t dfield)

Pretty prints a dfield value according to its data type. Also the hex string is printed if a string contains non-printable characters.

Parameters
dfieldin: dfield

Definition at line 321 of file data0data.cc.

Here is the call graph for this function:

UNIV_INTERN ibool dtuple_check_typed_no_assert ( const dtuple_t tuple)

Checks that a data tuple is typed.

Returns
TRUE if ok
Parameters
tuplein: tuple

Definition at line 141 of file data0data.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN int dtuple_coll_cmp ( const dtuple_t tuple1,
const dtuple_t tuple2 
)

Compare two data tuples, respecting the collation of character fields.

Returns
1, 0 , -1 if tuple1 is greater, equal, less, respectively, than tuple2
Parameters
tuple1in: tuple 1
tuple2in: tuple 2

Definition at line 62 of file data0data.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void dtuple_convert_back_big_rec ( dict_index_t *index   __attribute__(unused),
dtuple_t entry,
big_rec_t vector 
)

Puts back to entry the data stored in vector. Note that to ensure the fields in entry can accommodate the data, vector must have been created from entry with dtuple_convert_big_rec.

Parameters
__attribute__in: index
entryin: entry whose data was put to vector
vectorin, own: big rec vector; it is freed in this function

Definition at line 716 of file data0data.cc.

Here is the call graph for this function:

UNIV_INTERN big_rec_t* dtuple_convert_big_rec ( dict_index_t index,
dtuple_t entry,
ulint *  n_ext 
)

Moves parts of long fields in entry to the big record vector so that the size of tuple drops below the maximum record size allowed in the database. Moves data only from those fields which are not necessary to determine uniquely the insertion place of the tuple in the index.

Returns
own: created big record vector, NULL if we are not able to shorten the entry enough, i.e., if there are too many fixed-length or short fields in entry or the index is clustered
Parameters
indexin: index
entryin/out: index entry
n_extin/out: number of externally stored columns

Definition at line 539 of file data0data.cc.

Here is the call graph for this function:

UNIV_INTERN void dtuple_print ( FILE *  f,
const dtuple_t tuple 
)

The following function prints the contents of a tuple.

Parameters
fin: output stream
tuplein: tuple

Definition at line 505 of file data0data.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

UNIV_INTERN void dtuple_set_n_fields ( dtuple_t tuple,
ulint  n_fields 
)

Sets number of fields used in a tuple. Normally this is set in dtuple_create, but if you want later to set it smaller, you can use this.

Parameters
tuplein: tuple
n_fieldsin: number of fields

Definition at line 103 of file data0data.cc.

Here is the caller graph for this function: