mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 11:57:38 +02:00
InnoDB: Speed up comparison functions by making
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL a constant. innobase/data/data0type.c: Remove data_mysql_latin1_swedish_charset_coll. innobase/include/data0type.h: Replace variable data_mysql_latin1_swedish_charset_coll with constant DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL. innobase/rem/rem0cmp.c: Replace variable data_mysql_latin1_swedish_charset_coll with constant DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL. sql/ha_innodb.cc: Eliminate variable data_mysql_latin1_swedish_charset_coll. Add an assertion about DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL.
This commit is contained in:
parent
7b07e3329a
commit
fea290807c
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. */
|
charset-collation code for them. */
|
||||||
|
|
||||||
ulint data_mysql_default_charset_coll = 99999999;
|
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_val = {DATA_BINARY, 0, 0, 0, 0, 0};
|
||||||
dtype_t* dtype_binary = &dtype_binary_val;
|
dtype_t* dtype_binary = &dtype_binary_val;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Created 1/16/1996 Heikki Tuuri
|
||||||
#include "univ.i"
|
#include "univ.i"
|
||||||
|
|
||||||
extern ulint data_mysql_default_charset_coll;
|
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 */
|
/* SQL data type struct */
|
||||||
typedef struct dtype_struct dtype_t;
|
typedef struct dtype_struct dtype_t;
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,7 @@ cmp_data_data_slow(
|
||||||
|| (cur_type->mtype == DATA_BLOB
|
|| (cur_type->mtype == DATA_BLOB
|
||||||
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
||||||
&& dtype_get_charset_coll(cur_type->prtype) !=
|
&& 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,
|
return(cmp_whole_field(cur_type,
|
||||||
data1, (unsigned) len1,
|
data1, (unsigned) len1,
|
||||||
|
|
@ -530,7 +530,7 @@ cmp_dtuple_rec_with_match(
|
||||||
|| (cur_type->mtype == DATA_BLOB
|
|| (cur_type->mtype == DATA_BLOB
|
||||||
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
||||||
&& dtype_get_charset_coll(cur_type->prtype) !=
|
&& dtype_get_charset_coll(cur_type->prtype) !=
|
||||||
data_mysql_latin1_swedish_charset_coll)) {
|
DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL)) {
|
||||||
|
|
||||||
ret = cmp_whole_field(
|
ret = cmp_whole_field(
|
||||||
cur_type,
|
cur_type,
|
||||||
|
|
@ -832,7 +832,7 @@ cmp_rec_rec_with_match(
|
||||||
|| (cur_type->mtype == DATA_BLOB
|
|| (cur_type->mtype == DATA_BLOB
|
||||||
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
&& 0 == (cur_type->prtype & DATA_BINARY_TYPE)
|
||||||
&& dtype_get_charset_coll(cur_type->prtype) !=
|
&& 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,
|
ret = cmp_whole_field(cur_type,
|
||||||
rec1_b_ptr, (unsigned) rec1_f_len,
|
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_default_charset_coll = (ulint)default_charset_info->number;
|
||||||
|
|
||||||
data_mysql_latin1_swedish_charset_coll =
|
ut_a(DATA_MYSQL_LATIN1_SWEDISH_CHARSET_COLL ==
|
||||||
(ulint)my_charset_latin1.number;
|
my_charset_latin1.number);
|
||||||
|
|
||||||
/* Store the latin1_swedish_ci character ordering table to InnoDB. For
|
/* Store the latin1_swedish_ci character ordering table to InnoDB. For
|
||||||
non-latin1_swedish_ci charsets we use the MySQL comparison functions,
|
non-latin1_swedish_ci charsets we use the MySQL comparison functions,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue