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
09eac479
Commit
09eac479
authored
Jan 14, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bin chatset now handles strnncoll itself so we don't have to check
if charset is binary anymore
parent
22b7e67b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
32 deletions
+2
-32
sql/field.cc
sql/field.cc
+0
-30
strings/ctype-bin.c
strings/ctype-bin.c
+2
-2
No files found.
sql/field.cc
View file @
09eac479
...
...
@@ -4017,11 +4017,6 @@ int Field_string::pack_cmp(const char *a, const char *b, uint length)
uint
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
uint
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
if
(
binary
())
{
int
cmp
=
memcmp
(
a
,
b
,
min
(
a_length
,
b_length
));
return
cmp
?
cmp
:
(
int
)
(
a_length
-
b_length
);
}
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
...
...
@@ -4036,11 +4031,6 @@ int Field_string::pack_cmp(const char *b, uint length)
end
--
;
uint
a_length
=
(
uint
)
(
end
-
ptr
);
if
(
binary
())
{
int
cmp
=
memcmp
(
ptr
,
b
,
min
(
a_length
,
b_length
));
return
cmp
?
cmp
:
(
int
)
(
a_length
-
b_length
);
}
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
ptr
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
...
...
@@ -4231,11 +4221,6 @@ int Field_varstring::pack_cmp(const char *a, const char *b, uint key_length)
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
}
if
(
binary
())
{
int
cmp
=
memcmp
(
a
,
b
,
min
(
a_length
,
b_length
));
return
cmp
?
cmp
:
(
int
)
(
a_length
-
b_length
);
}
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
...
...
@@ -4254,11 +4239,6 @@ int Field_varstring::pack_cmp(const char *b, uint key_length)
{
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
}
if
(
binary
())
{
int
cmp
=
memcmp
(
a
,
b
,
min
(
a_length
,
b_length
));
return
cmp
?
cmp
:
(
int
)
(
a_length
-
b_length
);
}
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
...
...
@@ -4747,11 +4727,6 @@ int Field_blob::pack_cmp(const char *a, const char *b, uint key_length)
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
}
if
(
binary
())
{
int
cmp
=
memcmp
(
a
,
b
,
min
(
a_length
,
b_length
));
return
cmp
?
cmp
:
(
int
)
(
a_length
-
b_length
);
}
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
...
...
@@ -4775,11 +4750,6 @@ int Field_blob::pack_cmp(const char *b, uint key_length)
{
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
}
if
(
binary
())
{
int
cmp
=
memcmp
(
a
,
b
,
min
(
a_length
,
b_length
));
return
cmp
?
cmp
:
(
int
)
(
a_length
-
b_length
);
}
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
...
...
strings/ctype-bin.c
View file @
09eac479
...
...
@@ -47,8 +47,8 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
const
uchar
*
s
,
uint
slen
,
const
uchar
*
t
,
uint
tlen
)
{
int
len
=
(
slen
>
tlen
)
?
tlen
:
slen
;
return
memcmp
(
s
,
t
,
len
);
int
cmp
=
memcmp
(
s
,
t
,
min
(
slen
,
tlen
))
;
return
cmp
?
cmp
:
(
int
)
(
slen
-
t
len
);
}
static
void
my_caseup_str_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
)),
...
...
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