MySQL 5.6.14 Source Code Document
|
Go to the source code of this file.
Functions | |
int | innobase_mysql_cmp (int mysql_type, uint charset_number, const unsigned char *a, unsigned int a_length, const unsigned char *b, unsigned int b_length) |
int | innobase_mysql_cmp_prefix (int mysql_type, uint charset_number, const unsigned char *a, unsigned int a_length, const unsigned char *b, unsigned int b_length) |
UNIV_INLINE ulint | cmp_collate (ulint code) |
UNIV_INTERN ibool | cmp_cols_are_equal (const dict_col_t *col1, const dict_col_t *col2, ibool check_charsets) |
UNIV_INTERN int | cmp_dfield_dfield_like_prefix (dfield_t *dfield1, dfield_t *dfield2) |
UNIV_INTERN int | cmp_data_data_slow (ulint mtype, ulint prtype, const byte *data1, ulint len1, const byte *data2, ulint len2) |
int | cmp_data_data_slow_varchar (const byte *lhs, ulint lhs_len, const byte *rhs, ulint rhs_len) |
int | cmp_data_data_slow_like_prefix (const byte *lhs, ulint len1, const byte *rhs, ulint len2) |
int | cmp_data_data_slow_like_suffix (const byte *data1 UNIV_UNUSED, ulint len1 UNIV_UNUSED, const byte *data2 UNIV_UNUSED, ulint len2 UNIV_UNUSED) |
int | cmp_data_data_slow_like_substr (const byte *data1 UNIV_UNUSED, ulint len1 UNIV_UNUSED, const byte *data2 UNIV_UNUSED, ulint len2 UNIV_UNUSED) |
UNIV_INTERN int | cmp_dtuple_rec_with_match_low (const dtuple_t *dtuple, const rec_t *rec, const ulint *offsets, ulint n_cmp, ulint *matched_fields, ulint *matched_bytes) |
UNIV_INTERN int | cmp_dtuple_rec (const dtuple_t *dtuple, const rec_t *rec, const ulint *offsets) |
UNIV_INTERN ibool | cmp_dtuple_is_prefix_of_rec (const dtuple_t *dtuple, const rec_t *rec, const ulint *offsets) |
Variables | |
static const rec_t * | rec2 |
static const rec_t const ulint * | offsets1 |
static const rec_t const ulint const ulint * | offsets2 |
static const rec_t const ulint const ulint const dict_index_t * | index |
UNIV_INLINE ulint cmp_collate | ( | ulint | code | ) |
Transforms the character code so that it is ordered appropriately for the language. This is only used for the latin1 char set. MySQL does the comparisons for other char sets.
code | in: code of a character stored in database record |
Definition at line 121 of file rem0cmp.cc.
UNIV_INTERN ibool cmp_cols_are_equal | ( | const dict_col_t * | col1, |
const dict_col_t * | col2, | ||
ibool | check_charsets | ||
) |
Returns TRUE if two columns are equal for comparison purposes.
col1 | in: column 1 |
col2 | in: column 2 |
check_charsets | in: whether to check charsets |
Definition at line 133 of file rem0cmp.cc.
UNIV_INTERN int cmp_data_data_slow | ( | ulint | mtype, |
ulint | prtype, | ||
const byte * | data1, | ||
ulint | len1, | ||
const byte * | data2, | ||
ulint | len2 | ||
) |
This function is used to compare two data fields for which we know the data type.
mtype | in: main type |
prtype | in: precise type |
data1 | in: data field (== a pointer to a memory buffer) |
len1 | in: data field length or UNIV_SQL_NULL |
data2 | in: data field (== a pointer to a memory buffer) |
len2 | in: data field length or UNIV_SQL_NULL |
Definition at line 351 of file rem0cmp.cc.
UNIV_INTERN ibool cmp_dtuple_is_prefix_of_rec | ( | const dtuple_t * | dtuple, |
const rec_t * | rec, | ||
const ulint * | offsets | ||
) |
Checks if a dtuple is a prefix of a record. The last field in dtuple is allowed to be a prefix of the corresponding field in the record.
dtuple | in: data tuple |
rec | in: physical record |
offsets | in: array returned by rec_get_offsets() |
Definition at line 883 of file rem0cmp.cc.
UNIV_INTERN int cmp_dtuple_rec | ( | const dtuple_t * | dtuple, |
const rec_t * | rec, | ||
const ulint * | offsets | ||
) |
Compares a data tuple to a physical record.
dtuple | in: data tuple |
rec | in: physical record |
offsets | in: array returned by rec_get_offsets() |
Definition at line 863 of file rem0cmp.cc.
UNIV_INTERN int cmp_dtuple_rec_with_match_low | ( | const dtuple_t * | dtuple, |
const rec_t * | rec, | ||
const ulint * | offsets, | ||
ulint | n_cmp, | ||
ulint * | matched_fields, | ||
ulint * | matched_bytes | ||
) |
This function is used to compare a data tuple to a physical record. Only dtuple->n_fields_cmp first fields are taken into account for the data tuple! If we denote by n = n_fields_cmp, then rec must have either m >= n fields, or it must differ from dtuple in some of the m fields rec has. If rec has an externally stored field we do not compare it but return with value 0 if such a comparison should be made.
dtuple | in: data tuple |
rec | in: physical record which differs from dtuple in some of the common fields, or which has an equal number or more fields than dtuple |
offsets | in: array returned by rec_get_offsets() |
n_cmp | in: number of fields to compare |
matched_fields | in/out: number of already completely matched fields; when function returns, contains the value for current comparison |
matched_bytes | in/out: number of already matched bytes within the first field not completely matched; when function returns, contains the value for current comparison |
Definition at line 627 of file rem0cmp.cc.
int innobase_mysql_cmp | ( | int | mysql_type, |
uint | charset_number, | ||
const unsigned char * | a, | ||
unsigned int | a_length, | ||
const unsigned char * | b, | ||
unsigned int | b_length | ||
) |
This function is used to compare two data fields for which the data type is such that we must use MySQL code to compare them. The prototype here must be a copy of the one in ha_innobase.cc!
InnoDB uses this function to compare two data fields for which the data type is such that we must use MySQL code to compare them. NOTE that the prototype of this function is in rem0cmp.cc in InnoDB source code! If you change this function, remember to update the prototype there!
InnoDB uses this function to compare two data fields for which the data type is such that we must use MySQL code to compare them.
mysql_type | in: MySQL type |
charset_number | in: number of the charset |
a | in: data field |
a_length | in: data field length, not UNIV_SQL_NULL |
b | in: data field |
b_length | in: data field length, not UNIV_SQL_NULL |
Definition at line 5104 of file ha_innodb.cc.
int innobase_mysql_cmp_prefix | ( | int | mysql_type, |
uint | charset_number, | ||
const unsigned char * | a, | ||
unsigned int | a_length, | ||
const unsigned char * | b, | ||
unsigned int | b_length | ||
) |
This function is used to compare two data fields for which the data type is such that we must use MySQL code to compare them. The prototype here must be a copy of the one in ha_innobase.cc!
InnoDB uses this function to compare two data fields for which the data type is such that we must use MySQL code to compare them. NOTE that the prototype of this function is in rem0cmp.c in InnoDB source code! If you change this function, remember to update the prototype there!
mysql_type | in: MySQL type |
charset_number | in: number of the charset |
a | in: data field |
a_length | in: data field length, not UNIV_SQL_NULL |
b | in: data field |
b_length | in: data field length, not UNIV_SQL_NULL |
Definition at line 5238 of file ha_innodb.cc.
const rec_t const ulint const ulint const dict_index_t* index |
in: data dictionary index
Definition at line 927 of file rem0cmp.cc.
const rec_t const ulint* offsets1 |
in: rec_get_offsets(rec1, ...)
Definition at line 927 of file rem0cmp.cc.
const rec_t const ulint const ulint* offsets2 |
in: rec_get_offsets(rec2, ...)
Definition at line 927 of file rem0cmp.cc.
const rec_t* rec2 |
< in: physical record in: physical record
Definition at line 927 of file rem0cmp.cc.