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
6c44563f
Commit
6c44563f
authored
Nov 09, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple optimization
parent
81363b19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
sql/field.cc
sql/field.cc
+10
-3
sql/field_conv.cc
sql/field_conv.cc
+1
-3
No files found.
sql/field.cc
View file @
6c44563f
...
...
@@ -4390,6 +4390,8 @@ String *Field_string::val_str(String *val_buffer __attribute__((unused)),
int
Field_string
::
cmp
(
const
char
*
a_ptr
,
const
char
*
b_ptr
)
{
uint
a_len
,
b_len
;
if
(
field_charset
->
strxfrm_multiply
>
1
)
{
/*
...
...
@@ -4401,9 +4403,14 @@ int Field_string::cmp(const char *a_ptr, const char *b_ptr)
(
const
uchar
*
)
b_ptr
,
field_length
);
}
uint
char_len
=
field_length
/
field_charset
->
mbmaxlen
;
uint
a_len
=
my_charpos
(
field_charset
,
a_ptr
,
a_ptr
+
field_length
,
char_len
);
uint
b_len
=
my_charpos
(
field_charset
,
b_ptr
,
b_ptr
+
field_length
,
char_len
);
if
(
field_charset
->
mbmaxlen
!=
1
)
{
uint
char_len
=
field_length
/
field_charset
->
mbmaxlen
;
a_len
=
my_charpos
(
field_charset
,
a_ptr
,
a_ptr
+
field_length
,
char_len
);
b_len
=
my_charpos
(
field_charset
,
b_ptr
,
b_ptr
+
field_length
,
char_len
);
}
else
a_len
=
b_len
=
field_length
;
return
my_strnncoll
(
field_charset
,(
const
uchar
*
)
a_ptr
,
a_len
,
(
const
uchar
*
)
b_ptr
,
b_len
);
}
...
...
sql/field_conv.cc
View file @
6c44563f
...
...
@@ -473,9 +473,7 @@ void (*Copy_field::get_copy_func(Field *to,Field *from))(Copy_field*)
{
if
(
to
->
flags
&
BLOB_FLAG
)
{
if
(
!
(
from
->
flags
&
BLOB_FLAG
))
return
do_conv_blob
;
if
(
from
->
charset
()
!=
to
->
charset
())
if
(
!
(
from
->
flags
&
BLOB_FLAG
)
||
from
->
charset
()
!=
to
->
charset
())
return
do_conv_blob
;
if
(
from_length
!=
to_length
||
to
->
table
->
db_low_byte_first
!=
from
->
table
->
db_low_byte_first
)
...
...
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