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
cd3f3867
Commit
cd3f3867
authored
Mar 06, 2003
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trim spaces from CHAR() BINARY consistently
parent
9257a27c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
mysql-test/r/binary.result
mysql-test/r/binary.result
+1
-0
strings/ctype-bin.c
strings/ctype-bin.c
+16
-1
No files found.
mysql-test/r/binary.result
View file @
cd3f3867
...
...
@@ -62,6 +62,7 @@ a b
hello hello
select * from t1 ignore index (b) where b="hello ";
a b
hello hello
alter table t1 modify b tinytext not null, drop key b, add key (b(100));
select * from t1 where b="hello ";
a b
...
...
strings/ctype-bin.c
View file @
cd3f3867
...
...
@@ -75,6 +75,21 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)),
return
cmp
?
cmp
:
(
int
)
(
slen
-
tlen
);
}
static
int
my_strnncollsp_binary
(
CHARSET_INFO
*
cs
,
const
uchar
*
s
,
uint
slen
,
const
uchar
*
t
,
uint
tlen
)
{
int
len
,
cmp
;
for
(
;
slen
&&
my_isspace
(
cs
,
s
[
slen
-
1
])
;
slen
--
);
for
(
;
tlen
&&
my_isspace
(
cs
,
t
[
tlen
-
1
])
;
tlen
--
);
len
=
(
slen
>
tlen
)
?
tlen
:
slen
;
cmp
=
memcmp
(
s
,
t
,
len
);
return
cmp
?
cmp
:
(
int
)
(
slen
-
tlen
);
}
static
void
my_caseup_str_bin
(
CHARSET_INFO
*
cs
__attribute__
((
unused
)),
char
*
str
__attribute__
((
unused
)))
{
...
...
@@ -308,7 +323,7 @@ CHARSET_INFO my_charset_bin =
NULL
,
/* tab_from_uni */
0
,
/* strxfrm_multiply */
my_strnncoll_binary
,
/* strnncoll */
my_strnncoll_binary
,
my_strnncoll
sp
_binary
,
my_strnxfrm_bin
,
/* strxnfrm */
my_like_range_simple
,
/* like_range */
my_wildcmp_bin
,
/* wildcmp */
...
...
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