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
8a5c6502
Commit
8a5c6502
authored
May 10, 2005
by
bar@noter.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#10344: some string function fail for UCS2
substr fix
parent
b580a12d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
1 deletion
+29
-1
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+18
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+10
-0
strings/ctype-ucs2.c
strings/ctype-ucs2.c
+1
-1
No files found.
mysql-test/r/ctype_ucs.result
View file @
8a5c6502
...
...
@@ -598,6 +598,24 @@ ucs2_bin 00610009
ucs2_bin 0061
ucs2_bin 00610020
drop table t1;
select hex(substr(_ucs2 0x00e400e50068,1));
hex(substr(_ucs2 0x00e400e50068,1))
00E400E50068
select hex(substr(_ucs2 0x00e400e50068,2));
hex(substr(_ucs2 0x00e400e50068,2))
00E50068
select hex(substr(_ucs2 0x00e400e50068,3));
hex(substr(_ucs2 0x00e400e50068,3))
0068
select hex(substr(_ucs2 0x00e400e50068,-1));
hex(substr(_ucs2 0x00e400e50068,-1))
0068
select hex(substr(_ucs2 0x00e400e50068,-2));
hex(substr(_ucs2 0x00e400e50068,-2))
00E50068
select hex(substr(_ucs2 0x00e400e50068,-3));
hex(substr(_ucs2 0x00e400e50068,-3))
00E400E50068
SET NAMES latin1;
SET collation_connection='ucs2_swedish_ci';
CREATE TABLE t1 (Field1 int(10) default '0');
...
...
mysql-test/t/ctype_ucs.test
View file @
8a5c6502
...
...
@@ -374,6 +374,16 @@ SET NAMES latin1;
SET
collation_connection
=
'ucs2_bin'
;
--
source
include
/
ctype_filesort
.
inc
#
# Bug#10344 Some string functions fail for UCS2
#
select
hex
(
substr
(
_ucs2
0x00e400e50068
,
1
));
select
hex
(
substr
(
_ucs2
0x00e400e50068
,
2
));
select
hex
(
substr
(
_ucs2
0x00e400e50068
,
3
));
select
hex
(
substr
(
_ucs2
0x00e400e50068
,
-
1
));
select
hex
(
substr
(
_ucs2
0x00e400e50068
,
-
2
));
select
hex
(
substr
(
_ucs2
0x00e400e50068
,
-
3
));
SET
NAMES
latin1
;
#
# Bug#8235
...
...
strings/ctype-ucs2.c
View file @
8a5c6502
...
...
@@ -1261,7 +1261,7 @@ uint my_charpos_ucs2(CHARSET_INFO *cs __attribute__((unused)),
const
char
*
e
__attribute__
((
unused
)),
uint
pos
)
{
return
pos
*
2
;
return
pos
>
e
-
b
?
e
-
b
+
2
:
pos
*
2
;
}
...
...
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