mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
InnoDB: Speed up comparison functions by making
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL a constant.
This commit is contained in:
parent
ffeee9cee3
commit
ab713b4b22
4 changed files with 6 additions and 7 deletions
|
|
@ -39,7 +39,6 @@ column definitions, or records in the insert buffer, we use this
|
|||
charset-collation code for them. */
|
||||
|
||||
ulint data_mysql_default_charset_coll = 99999999;
|
||||
ulint data_mysql_latin1_swedish_charset_coll = 99999999;
|
||||
|
||||
dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0, 0, 0};
|
||||
dtype_t* dtype_binary = &dtype_binary_val;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Created 1/16/1996 Heikki Tuuri
|
|||
#include "univ.i"
|
||||
|
||||
extern ulint data_mysql_default_charset_coll;
|
||||
extern ulint data_mysql_latin1_swedish_charset_coll;
|
||||
#define DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL 8
|
||||
|
||||
/* SQL data type struct */
|
||||
typedef struct dtype_struct dtype_t;
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ cmp_data_data_slow(
|
|||
|| (cur_type->mtype == DATA_BLOB
|
||||
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
||||
&& dtype_get_charset_coll(cur_type->prtype) !=
|
||||
data_mysql_latin1_swedish_charset_coll)) {
|
||||
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL)) {
|
||||
|
||||
return(cmp_whole_field(cur_type,
|
||||
data1, (unsigned) len1,
|
||||
|
|
@ -530,7 +530,7 @@ cmp_dtuple_rec_with_match(
|
|||
|| (cur_type->mtype == DATA_BLOB
|
||||
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
||||
&& dtype_get_charset_coll(cur_type->prtype) !=
|
||||
data_mysql_latin1_swedish_charset_coll)) {
|
||||
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL)) {
|
||||
|
||||
ret = cmp_whole_field(
|
||||
cur_type,
|
||||
|
|
@ -832,7 +832,7 @@ cmp_rec_rec_with_match(
|
|||
|| (cur_type->mtype == DATA_BLOB
|
||||
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
||||
&& dtype_get_charset_coll(cur_type->prtype) !=
|
||||
data_mysql_latin1_swedish_charset_coll)) {
|
||||
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL)) {
|
||||
|
||||
ret = cmp_whole_field(cur_type,
|
||||
rec1_b_ptr, (unsigned) rec1_f_len,
|
||||
|
|
|
|||
|
|
@ -1271,8 +1271,8 @@ innobase_init(void)
|
|||
|
||||
data_mysql_default_charset_coll = (ulint)default_charset_info->number;
|
||||
|
||||
data_mysql_latin1_swedish_charset_coll =
|
||||
(ulint)my_charset_latin1.number;
|
||||
ut_a(DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL ==
|
||||
my_charset_latin1.number);
|
||||
|
||||
/* Store the latin1_swedish_ci character ordering table to InnoDB. For
|
||||
non-latin1_swedish_ci charsets we use the MySQL comparison functions,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue