Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f7f0bc74
Commit
f7f0bc74
authored
Apr 13, 2022
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: un-inline dtype_get_mblen()
per Marko request
parent
fc839644
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
45 deletions
+24
-45
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+24
-1
storage/innobase/include/data0type.h
storage/innobase/include/data0type.h
+0
-1
storage/innobase/include/data0type.inl
storage/innobase/include/data0type.inl
+0
-34
storage/innobase/include/ha_prototypes.h
storage/innobase/include/ha_prototypes.h
+0
-9
No files found.
storage/innobase/handler/ha_innodb.cc
View file @
f7f0bc74
...
...
@@ -2406,7 +2406,7 @@ innobase_mysql_print_thd(
/******************************************************************//**
Get the variable length bounds of the given character set. */
void
static
void
innobase_get_cset_width
(
/*====================*/
ulint
cset
,
/*!< in: MySQL charset-collation code */
...
...
@@ -2446,6 +2446,29 @@ innobase_get_cset_width(
}
}
/*********************************************************************//**
Compute the mbminlen and mbmaxlen members of a data type structure. */
void
dtype_get_mblen
(
/*============*/
ulint
mtype
,
/*!< in: main type */
ulint
prtype
,
/*!< in: precise type (and collation) */
unsigned
*
mbminlen
,
/*!< out: minimum length of a
multi-byte character */
unsigned
*
mbmaxlen
)
/*!< out: maximum length of a
multi-byte character */
{
if
(
dtype_is_string_type
(
mtype
))
{
innobase_get_cset_width
(
dtype_get_charset_coll
(
prtype
),
mbminlen
,
mbmaxlen
);
ut_ad
(
*
mbminlen
<=
*
mbmaxlen
);
ut_ad
(
*
mbminlen
<
DATA_MBMAX
);
ut_ad
(
*
mbmaxlen
<
DATA_MBMAX
);
}
else
{
*
mbminlen
=
*
mbmaxlen
=
0
;
}
}
/******************************************************************//**
Converts an identifier to a table name. */
void
...
...
storage/innobase/include/data0type.h
View file @
f7f0bc74
...
...
@@ -325,7 +325,6 @@ dtype_get_prtype(
/*********************************************************************//**
Compute the mbminlen and mbmaxlen members of a data type structure. */
UNIV_INLINE
void
dtype_get_mblen
(
/*============*/
...
...
storage/innobase/include/data0type.inl
View file @
f7f0bc74
...
...
@@ -64,30 +64,6 @@ dtype_get_mysql_type(
return(type->prtype & 0xFFUL);
}
/*********************************************************************//**
Compute the mbminlen and mbmaxlen members of a data type structure. */
UNIV_INLINE
void
dtype_get_mblen(
/*============*/
ulint mtype, /*!< in: main type */
ulint prtype, /*!< in: precise type (and collation) */
unsigned*mbminlen, /*!< out: minimum length of a
multi-byte character */
unsigned*mbmaxlen) /*!< out: maximum length of a
multi-byte character */
{
if (dtype_is_string_type(mtype)) {
innobase_get_cset_width(dtype_get_charset_coll(prtype),
mbminlen, mbmaxlen);
ut_ad(*mbminlen <= *mbmaxlen);
ut_ad(*mbminlen < DATA_MBMAX);
ut_ad(*mbmaxlen < DATA_MBMAX);
} else {
*mbminlen = *mbmaxlen = 0;
}
}
/*********************************************************************//**
Compute the mbminlen and mbmaxlen members of a data type structure. */
UNIV_INLINE
...
...
@@ -374,16 +350,6 @@ dtype_get_fixed_size_low(
} else if (!comp) {
return static_cast<unsigned>(len);
} else {
#ifdef UNIV_DEBUG
unsigned i_mbminlen, i_mbmaxlen;
innobase_get_cset_width(
dtype_get_charset_coll(prtype),
&i_mbminlen, &i_mbmaxlen);
ut_ad(i_mbminlen == mbminlen);
ut_ad(i_mbmaxlen == mbmaxlen);
#endif /* UNIV_DEBUG */
if (mbminlen == mbmaxlen) {
return static_cast<unsigned>(len);
}
...
...
storage/innobase/include/ha_prototypes.h
View file @
f7f0bc74
...
...
@@ -139,15 +139,6 @@ at least ENUM and SET, and unsigned integer types are 'unsigned types'
uint8_t
get_innobase_type_from_mysql_type
(
unsigned
*
unsigned_flag
,
const
Field
*
field
);
/******************************************************************//**
Get the variable length bounds of the given character set. */
void
innobase_get_cset_width
(
/*====================*/
ulint
cset
,
/*!< in: MySQL charset-collation code */
unsigned
*
mbminlen
,
/*!< out: minimum length of a char (in bytes) */
unsigned
*
mbmaxlen
);
/*!< out: maximum length of a char (in bytes) */
/******************************************************************//**
Compares NUL-terminated UTF-8 strings case insensitively.
@return 0 if a=b, <0 if a<b, >1 if a>b */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment