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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
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)
...
@@ -4017,11 +4017,6 @@ int Field_string::pack_cmp(const char *a, const char *b, uint length)
uint
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
uint
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
uint
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
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
,
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
(
const
uchar
*
)
b
,
b_length
);
...
@@ -4036,11 +4031,6 @@ int Field_string::pack_cmp(const char *b, uint length)
...
@@ -4036,11 +4031,6 @@ int Field_string::pack_cmp(const char *b, uint length)
end
--
;
end
--
;
uint
a_length
=
(
uint
)
(
end
-
ptr
);
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
,
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
ptr
,
a_length
,
(
const
uchar
*
)
ptr
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
(
const
uchar
*
)
b
,
b_length
);
...
@@ -4231,11 +4221,6 @@ int Field_varstring::pack_cmp(const char *a, const char *b, uint key_length)
...
@@ -4231,11 +4221,6 @@ int Field_varstring::pack_cmp(const char *a, const char *b, uint key_length)
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
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
,
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
(
const
uchar
*
)
b
,
b_length
);
...
@@ -4254,11 +4239,6 @@ int Field_varstring::pack_cmp(const char *b, uint key_length)
...
@@ -4254,11 +4239,6 @@ int Field_varstring::pack_cmp(const char *b, uint key_length)
{
{
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
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
,
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
(
const
uchar
*
)
b
,
b_length
);
...
@@ -4747,11 +4727,6 @@ int Field_blob::pack_cmp(const char *a, const char *b, uint key_length)
...
@@ -4747,11 +4727,6 @@ int Field_blob::pack_cmp(const char *a, const char *b, uint key_length)
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
a_length
=
(
uint
)
(
uchar
)
*
a
++
;
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
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
,
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_length
);
(
const
uchar
*
)
b
,
b_length
);
...
@@ -4775,11 +4750,6 @@ int Field_blob::pack_cmp(const char *b, uint key_length)
...
@@ -4775,11 +4750,6 @@ int Field_blob::pack_cmp(const char *b, uint key_length)
{
{
b_length
=
(
uint
)
(
uchar
)
*
b
++
;
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
,
return
my_strnncoll
(
field_charset
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
a
,
a_length
,
(
const
uchar
*
)
b
,
b_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)),
...
@@ -47,8 +47,8 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
const
uchar
*
s
,
uint
slen
,
const
uchar
*
s
,
uint
slen
,
const
uchar
*
t
,
uint
tlen
)
const
uchar
*
t
,
uint
tlen
)
{
{
int
len
=
(
slen
>
tlen
)
?
tlen
:
slen
;
int
cmp
=
memcmp
(
s
,
t
,
min
(
slen
,
tlen
))
;
return
memcmp
(
s
,
t
,
len
);
return
cmp
?
cmp
:
(
int
)
(
slen
-
t
len
);
}
}
static
void
my_caseup_str_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
)),
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