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
b3d81a28
Commit
b3d81a28
authored
Jun 07, 2004
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/MySQL-BUGS/mysql-4.1
parents
77783616
fffef41d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+9
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+10
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-4
No files found.
mysql-test/r/ctype_ucs.result
View file @
b3d81a28
...
...
@@ -47,6 +47,15 @@ t1 CREATE TABLE `t1` (
`r` char(10) character set ucs2 NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
create table t2(f1 Char(30));
insert into t2 values ("103000"), ("22720000"), ("3401200"), ("78000");
select lpad(f1, 12, "-o-/") from t2;
lpad(f1, 12, "-o-/")
-o-/-o103000
-o-/22720000
-o-/-3401200
-o-/-o-78000
drop table t2;
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 @
b3d81a28
...
...
@@ -47,6 +47,16 @@ 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
;
#
# BUG3946
#
create
table
t2
(
f1
Char
(
30
));
insert
into
t2
values
(
"103000"
),
(
"22720000"
),
(
"3401200"
),
(
"78000"
);
select
lpad
(
f1
,
12
,
"-o-/"
)
from
t2
;
drop
table
t2
;
######################################################
#
# Test of like
...
...
sql/item_strfunc.cc
View file @
b3d81a28
...
...
@@ -2097,10 +2097,8 @@ String *Item_func_lpad::val_str(String *str)
count
-=
pad_char_length
;
}
if
(
count
>
0
)
{
pad
->
length
(
pad
->
charpos
(
count
));
str
->
append
(
*
pad
);
}
str
->
append
(
pad
->
ptr
(),
pad
->
charpos
(
count
),
collation
.
collation
);
str
->
append
(
*
res
);
null_value
=
0
;
return
str
;
...
...
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