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
6b52f8ca
Commit
6b52f8ca
authored
Mar 20, 2009
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
branches/zip: innobase_get_at_most_n_mbchars(): Declare in ha_prototypes.h.
parent
4214453b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
31 deletions
+29
-31
ChangeLog
ChangeLog
+5
-0
data/data0type.c
data/data0type.c
+5
-27
handler/ha_innodb.cc
handler/ha_innodb.cc
+1
-4
include/ha_prototypes.h
include/ha_prototypes.h
+18
-0
No files found.
ChangeLog
View file @
6b52f8ca
2009-03-20 The InnoDB Team
* data/data0type.c, handler/ha_innodb.cc, include/ha_prototypes.h:
Declare innobase_get_at_most_n_mbchars() in ha_prototypes.h.
2009-03-20 The InnoDB Team
* fil/fil0fil.c:
...
...
data/data0type.c
View file @
6b52f8ca
...
...
@@ -28,26 +28,8 @@ Created 1/16/1996 Heikki Tuuri
#include "data0type.ic"
#endif
/**********************************************************************
This function is used to find the storage length in bytes of the first n
characters for prefix indexes using a multibyte character set. The function
finds charset information and returns length of prefix_len characters in the
index field in bytes.
NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
this function, you MUST change also the prototype here! */
UNIV_INTERN
ulint
innobase_get_at_most_n_mbchars
(
/*===========================*/
/* out: number of bytes occupied by the first
n characters */
ulint
charset_id
,
/* in: character set id */
ulint
prefix_len
,
/* in: prefix length in bytes of the index
(this has to be divided by mbmaxlen to get the
number of CHARACTERS n in the prefix) */
ulint
data_len
,
/* in: length of the string in bytes */
const
char
*
str
);
/* in: character string */
#ifndef UNIV_HOTBACKUP
# include "ha_prototypes.h"
/* At the database startup we store the default-charset collation number of
this MySQL installation to this global variable. If we have < 4.1.2 format
...
...
@@ -78,7 +60,6 @@ dtype_get_at_most_n_mbchars(
const
char
*
str
)
/* in: the string whose prefix
length is being determined */
{
#ifndef UNIV_HOTBACKUP
ut_a
(
data_len
!=
UNIV_SQL_NULL
);
ut_ad
(
!
mbmaxlen
||
!
(
prefix_len
%
mbmaxlen
));
...
...
@@ -96,13 +77,8 @@ dtype_get_at_most_n_mbchars(
}
return
(
data_len
);
#else
/* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error
;
#endif
/* UNIV_HOTBACKUP */
}
#endif
/* UNIV_HOTBACKUP */
/*************************************************************************
Checks if a data main type is a string type. Also a BLOB is considered a
...
...
@@ -202,7 +178,9 @@ dtype_validate(
ut_a
((
type
->
prtype
&
DATA_MYSQL_TYPE_MASK
)
<
DATA_N_SYS_COLS
);
}
#ifndef UNIV_HOTBACKUP
ut_a
(
type
->
mbminlen
<=
type
->
mbmaxlen
);
#endif
/* !UNIV_HOTBACKUP */
return
(
TRUE
);
}
...
...
handler/ha_innodb.cc
View file @
6b52f8ca
...
...
@@ -8788,10 +8788,7 @@ ha_innobase::get_mysql_bin_log_pos()
This function is used to find the storage length in bytes of the first n
characters for prefix indexes using a multibyte character set. The function
finds charset information and returns length of prefix_len characters in the
index field in bytes.
NOTE: the prototype of this function is copied to data0type.c! If you change
this function, you MUST change also data0type.c! */
index field in bytes. */
extern
"C"
UNIV_INTERN
ulint
innobase_get_at_most_n_mbchars
(
...
...
include/ha_prototypes.h
View file @
6b52f8ca
...
...
@@ -224,6 +224,24 @@ innobase_get_charset(
/* out: connection character set */
void
*
mysql_thd
);
/* in: MySQL thread handle */
/**********************************************************************
This function is used to find the storage length in bytes of the first n
characters for prefix indexes using a multibyte character set. The function
finds charset information and returns length of prefix_len characters in the
index field in bytes. */
UNIV_INTERN
ulint
innobase_get_at_most_n_mbchars
(
/*===========================*/
/* out: number of bytes occupied by the first
n characters */
ulint
charset_id
,
/* in: character set id */
ulint
prefix_len
,
/* in: prefix length in bytes of the index
(this has to be divided by mbmaxlen to get the
number of CHARACTERS n in the prefix) */
ulint
data_len
,
/* in: length of the string in bytes */
const
char
*
str
);
/* in: character string */
/**********************************************************************
Returns true if the thread supports XA,
global value of innodb_supports_xa if thd is NULL. */
...
...
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