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
cba27e4a
Commit
cba27e4a
authored
Aug 19, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trailing spaces behaviour for binary collation.
parent
7fbc796d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+15
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+9
-0
No files found.
mysql-test/r/ctype_utf8.result
View file @
cba27e4a
...
@@ -79,6 +79,21 @@ SELECT 'a\t' < 'a';
...
@@ -79,6 +79,21 @@ SELECT 'a\t' < 'a';
SELECT 'a\t' < 'a ';
SELECT 'a\t' < 'a ';
'a\t' < 'a '
'a\t' < 'a '
1
1
SELECT 'a' = 'a ' collate utf8_bin;
'a' = 'a ' collate utf8_bin
1
SELECT 'a\0' < 'a' collate utf8_bin;
'a\0' < 'a' collate utf8_bin
1
SELECT 'a\0' < 'a ' collate utf8_bin;
'a\0' < 'a ' collate utf8_bin
1
SELECT 'a\t' < 'a' collate utf8_bin;
'a\t' < 'a' collate utf8_bin
1
SELECT 'a\t' < 'a ' collate utf8_bin;
'a\t' < 'a ' collate utf8_bin
1
CREATE TABLE t1 (a char(10) character set utf8 not null);
CREATE TABLE t1 (a char(10) character set utf8 not null);
INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a ');
INSERT INTO t1 VALUES ('a'),('a\0'),('a\t'),('a ');
SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1;
SELECT hex(a),STRCMP(a,'a'), STRCMP(a,'a ') FROM t1;
...
...
mysql-test/t/ctype_utf8.test
View file @
cba27e4a
...
@@ -46,6 +46,15 @@ SELECT 'a\0' < 'a ';
...
@@ -46,6 +46,15 @@ SELECT 'a\0' < 'a ';
SELECT
'a\t'
<
'a'
;
SELECT
'a\t'
<
'a'
;
SELECT
'a\t'
<
'a '
;
SELECT
'a\t'
<
'a '
;
#
# The same for binary collation
#
SELECT
'a'
=
'a '
collate
utf8_bin
;
SELECT
'a\0'
<
'a'
collate
utf8_bin
;
SELECT
'a\0'
<
'a '
collate
utf8_bin
;
SELECT
'a\t'
<
'a'
collate
utf8_bin
;
SELECT
'a\t'
<
'a '
collate
utf8_bin
;
CREATE
TABLE
t1
(
a
char
(
10
)
character
set
utf8
not
null
);
CREATE
TABLE
t1
(
a
char
(
10
)
character
set
utf8
not
null
);
INSERT
INTO
t1
VALUES
(
'a'
),(
'a\0'
),(
'a\t'
),(
'a '
);
INSERT
INTO
t1
VALUES
(
'a'
),(
'a\0'
),(
'a\t'
),(
'a '
);
SELECT
hex
(
a
),
STRCMP
(
a
,
'a'
),
STRCMP
(
a
,
'a '
)
FROM
t1
;
SELECT
hex
(
a
),
STRCMP
(
a
,
'a'
),
STRCMP
(
a
,
'a '
)
FROM
t1
;
...
...
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