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
89fcdec3
Commit
89fcdec3
authored
Jun 03, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collation & coercibility tests for LTRIM, RTRIM and TRIM
parent
8ae717d3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
mysql-test/r/func_str.result
mysql-test/r/func_str.result
+33
-2
mysql-test/t/func_str.test
mysql-test/t/func_str.test
+14
-1
No files found.
mysql-test/r/func_str.result
View file @
89fcdec3
...
...
@@ -270,6 +270,24 @@ latin2_general_ci 3
select collation(concat_ws(_latin2'a',_latin2'b')), coercibility(concat_ws(_latin2'a',_latin2'b'));
collation(concat_ws(_latin2'a',_latin2'b')) coercibility(concat_ws(_latin2'a',_latin2'b'))
latin2_general_ci 3
select collation(trim(_latin2' a ')), coercibility(trim(_latin2' a '));
collation(trim(_latin2' a ')) coercibility(trim(_latin2' a '))
latin2_general_ci 3
select collation(ltrim(_latin2' a ')), coercibility(ltrim(_latin2' a '));
collation(ltrim(_latin2' a ')) coercibility(ltrim(_latin2' a '))
latin2_general_ci 3
select collation(rtrim(_latin2' a ')), coercibility(rtrim(_latin2' a '));
collation(rtrim(_latin2' a ')) coercibility(rtrim(_latin2' a '))
latin2_general_ci 3
select collation(trim(LEADING _latin2' ' FROM _latin2'a')), coercibility(trim(LEADING _latin2'a' FROM _latin2'a'));
collation(trim(LEADING _latin2' ' FROM _latin2'a')) coercibility(trim(LEADING _latin2'a' FROM _latin2'a'))
latin2_general_ci 3
select collation(trim(TRAILING _latin2' ' FROM _latin2'a')), coercibility(trim(TRAILING _latin2'a' FROM _latin2'a'));
collation(trim(TRAILING _latin2' ' FROM _latin2'a')) coercibility(trim(TRAILING _latin2'a' FROM _latin2'a'))
latin2_general_ci 3
select collation(trim(BOTH _latin2' ' FROM _latin2'a')), coercibility(trim(BOTH _latin2'a' FROM _latin2'a'));
collation(trim(BOTH _latin2' ' FROM _latin2'a')) coercibility(trim(BOTH _latin2'a' FROM _latin2'a'))
latin2_general_ci 3
create table t1
select
left(_latin2'a',1),
...
...
@@ -278,7 +296,14 @@ lcase(_latin2'a'),
ucase(_latin2'a'),
substring(_latin2'a',1,1),
concat(_latin2'a',_latin2'b'),
concat_ws(_latin2'a',_latin2'b');
concat_ws(_latin2'a',_latin2'b'),
trim(_latin2' a '),
ltrim(_latin2' a '),
rtrim(_latin2' a '),
trim(LEADING _latin2' ' FROM _latin2' a '),
trim(TRAILING _latin2' ' FROM _latin2' a '),
trim(BOTH _latin2' ' FROM _latin2' a ')
;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
...
...
@@ -288,6 +313,12 @@ t1 CREATE TABLE `t1` (
`ucase(_latin2'a')` char(1) character set latin2 NOT NULL default '',
`substring(_latin2'a',1,1)` char(1) character set latin2 NOT NULL default '',
`concat(_latin2'a',_latin2'b')` char(2) character set latin2 NOT NULL default '',
`concat_ws(_latin2'a',_latin2'b')` char(1) character set latin2 NOT NULL default ''
`concat_ws(_latin2'a',_latin2'b')` char(1) character set latin2 NOT NULL default '',
`trim(_latin2' a ')` char(3) character set latin2 NOT NULL default '',
`ltrim(_latin2' a ')` char(3) character set latin2 NOT NULL default '',
`rtrim(_latin2' a ')` char(3) character set latin2 NOT NULL default '',
`trim(LEADING _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '',
`trim(TRAILING _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default '',
`trim(BOTH _latin2' ' FROM _latin2' a ')` char(3) character set latin2 NOT NULL default ''
) TYPE=MyISAM CHARSET=latin1
drop table t1;
mysql-test/t/func_str.test
View file @
89fcdec3
...
...
@@ -143,6 +143,12 @@ select collation(right(_latin2'a',1)), coercibility(right(_latin2'a',1));
select
collation
(
substring
(
_latin2
'a'
,
1
,
1
)),
coercibility
(
substring
(
_latin2
'a'
,
1
,
1
));
select
collation
(
concat
(
_latin2
'a'
,
_latin2
'b'
)),
coercibility
(
concat
(
_latin2
'a'
,
_latin2
'b'
));
select
collation
(
concat_ws
(
_latin2
'a'
,
_latin2
'b'
)),
coercibility
(
concat_ws
(
_latin2
'a'
,
_latin2
'b'
));
select
collation
(
trim
(
_latin2
' a '
)),
coercibility
(
trim
(
_latin2
' a '
));
select
collation
(
ltrim
(
_latin2
' a '
)),
coercibility
(
ltrim
(
_latin2
' a '
));
select
collation
(
rtrim
(
_latin2
' a '
)),
coercibility
(
rtrim
(
_latin2
' a '
));
select
collation
(
trim
(
LEADING
_latin2
' '
FROM
_latin2
'a'
)),
coercibility
(
trim
(
LEADING
_latin2
'a'
FROM
_latin2
'a'
));
select
collation
(
trim
(
TRAILING
_latin2
' '
FROM
_latin2
'a'
)),
coercibility
(
trim
(
TRAILING
_latin2
'a'
FROM
_latin2
'a'
));
select
collation
(
trim
(
BOTH
_latin2
' '
FROM
_latin2
'a'
)),
coercibility
(
trim
(
BOTH
_latin2
'a'
FROM
_latin2
'a'
));
create
table
t1
select
left
(
_latin2
'a'
,
1
),
...
...
@@ -151,7 +157,14 @@ select
ucase
(
_latin2
'a'
),
substring
(
_latin2
'a'
,
1
,
1
),
concat
(
_latin2
'a'
,
_latin2
'b'
),
concat_ws
(
_latin2
'a'
,
_latin2
'b'
);
concat_ws
(
_latin2
'a'
,
_latin2
'b'
),
trim
(
_latin2
' a '
),
ltrim
(
_latin2
' a '
),
rtrim
(
_latin2
' a '
),
trim
(
LEADING
_latin2
' '
FROM
_latin2
' a '
),
trim
(
TRAILING
_latin2
' '
FROM
_latin2
' a '
),
trim
(
BOTH
_latin2
' '
FROM
_latin2
' a '
)
;
show
create
table
t1
;
drop
table
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