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
acf5ba7d
Commit
acf5ba7d
authored
Sep 19, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test for UTF8 functionality
parent
1c5b5ee0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
96 additions
and
0 deletions
+96
-0
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+61
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+35
-0
No files found.
mysql-test/r/ctype_utf8.result
0 → 100644
View file @
acf5ba7d
set names utf8;
select left(_utf8 0xD0B0D0B1D0B2,1);
left(_utf8 0xD0B0D0B1D0B2,1)
а
select right(_utf8 0xD0B0D0B2D0B2,1);
right(_utf8 0xD0B0D0B2D0B2,1)
в
select locate('he','hello');
locate('he','hello')
1
select locate('he','hello',2);
locate('he','hello',2)
0
select locate('lo','hello',2);
locate('lo','hello',2)
4
select locate('HE','hello');
locate('HE','hello')
1
select locate('HE','hello',2);
locate('HE','hello',2)
0
select locate('LO','hello',2);
locate('LO','hello',2)
4
select locate('HE','hello' collate utf8_bin);
locate('HE','hello' collate utf8_bin)
0
select locate('HE','hello' collate utf8_bin,2);
locate('HE','hello' collate utf8_bin,2)
0
select locate('LO','hello' collate utf8_bin,2);
locate('LO','hello' collate utf8_bin,2)
0
select locate(_utf8 0xD0B1, _utf8 0xD0B0D0B1D0B2);
locate(_utf8 0xD0B1, _utf8 0xD0B0D0B1D0B2)
2
select locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2);
locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2)
2
select locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2);
locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2)
2
select locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2 collate utf8_bin);
locate(_utf8 0xD091, _utf8 0xD0B0D0B1D0B2 collate utf8_bin)
0
select locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2 collate utf8_bin);
locate(_utf8 0xD0B1, _utf8 0xD0B0D091D0B2 collate utf8_bin)
0
select 'a' like 'a';
'a' like 'a'
1
select 'A' like 'a';
'A' like 'a'
1
select 'A' like 'a' collate utf8_bin;
'A' like 'a' collate utf8_bin
0
select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%');
_utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%')
1
mysql-test/t/ctype_utf8.test
0 → 100644
View file @
acf5ba7d
#
# Tests with the utf8 character set
#
set
names
utf8
;
select
left
(
_utf8
0xD0B0D0B1D0B2
,
1
);
select
right
(
_utf8
0xD0B0D0B2D0B2
,
1
);
select
locate
(
'he'
,
'hello'
);
select
locate
(
'he'
,
'hello'
,
2
);
select
locate
(
'lo'
,
'hello'
,
2
);
select
locate
(
'HE'
,
'hello'
);
select
locate
(
'HE'
,
'hello'
,
2
);
select
locate
(
'LO'
,
'hello'
,
2
);
select
locate
(
'HE'
,
'hello'
collate
utf8_bin
);
select
locate
(
'HE'
,
'hello'
collate
utf8_bin
,
2
);
select
locate
(
'LO'
,
'hello'
collate
utf8_bin
,
2
);
select
locate
(
_utf8
0xD0B1
,
_utf8
0xD0B0D0B1D0B2
);
select
locate
(
_utf8
0xD091
,
_utf8
0xD0B0D0B1D0B2
);
select
locate
(
_utf8
0xD0B1
,
_utf8
0xD0B0D091D0B2
);
select
locate
(
_utf8
0xD091
,
_utf8
0xD0B0D0B1D0B2
collate
utf8_bin
);
select
locate
(
_utf8
0xD0B1
,
_utf8
0xD0B0D091D0B2
collate
utf8_bin
);
select
'a'
like
'a'
;
select
'A'
like
'a'
;
select
'A'
like
'a'
collate
utf8_bin
;
select
_utf8
0xD0B0D0B1D0B2
like
concat
(
_utf8
'%'
,
_utf8
0xD0B1
,
_utf8
'%'
);
#
# Fix this, it should return 1:
#
#select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD091,_utf8 '%');
#
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