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
d5d49231
Commit
d5d49231
authored
Sep 25, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LPAD and RPAD test with UCS2 was added.
parent
ebbc1dc1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+34
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+18
-0
No files found.
mysql-test/r/ctype_ucs.result
View file @
d5d49231
...
...
@@ -13,6 +13,40 @@ hex(word)
0420
2004
DROP TABLE t1;
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'0421');
LPAD(_ucs2 X'0420',10,_ucs2 X'0421')
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
LPAD(_ucs2 X'0420',10,_ucs2 X'04210422')
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423')
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
RPAD(_ucs2 X'0420',10,_ucs2 X'0421')
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
RPAD(_ucs2 X'0420',10,_ucs2 X'04210422')
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423')
CREATE TABLE t1 SELECT
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`l` char(10) character set ucs2 NOT NULL default '',
`r` char(10) character set ucs2 NOT NULL default ''
) TYPE=MyISAM CHARSET=latin1
DROP TABLE t1;
SET NAMES koi8r;
SET character_set_connection=ucs2;
create table t1 (a varchar(10) character set ucs2, key(a));
...
...
mysql-test/t/ctype_ucs.test
View file @
d5d49231
...
...
@@ -29,6 +29,24 @@ INSERT INTO t1 VALUES (X'042000200020'), (X'200400200020');
SELECT
hex
(
word
)
FROM
t1
ORDER
BY
word
;
DROP
TABLE
t1
;
#
# Check LPAD/RPAD
#
SELECT
LPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'0421'
);
SELECT
LPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'04210422'
);
SELECT
LPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'042104220423'
);
SELECT
LPAD
(
_ucs2
X
'0420042104220423042404250426042704280429042A042B'
,
10
,
_ucs2
X
'042104220423'
);
SELECT
RPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'0421'
);
SELECT
RPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'04210422'
);
SELECT
RPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'042104220423'
);
SELECT
RPAD
(
_ucs2
X
'0420042104220423042404250426042704280429042A042B'
,
10
,
_ucs2
X
'042104220423'
);
CREATE
TABLE
t1
SELECT
LPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'0421'
)
l
,
RPAD
(
_ucs2
X
'0420'
,
10
,
_ucs2
X
'0421'
)
r
;
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
######################################################
#
# Test of like
...
...
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