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
b63b7bff
Commit
b63b7bff
authored
Jan 15, 2004
by
bar@bar.intranet.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fic for Bug 2367: INSERT() behaviour is different for different charsets.
parent
55d84200
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
2 deletions
+25
-2
mysql-test/r/ctype_ucs.result
mysql-test/r/ctype_ucs.result
+6
-0
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+6
-0
mysql-test/t/ctype_ucs.test
mysql-test/t/ctype_ucs.test
+6
-1
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+6
-0
strings/ctype-mb.c
strings/ctype-mb.c
+1
-1
No files found.
mysql-test/r/ctype_ucs.result
View file @
b63b7bff
...
@@ -173,6 +173,12 @@ SELECT * FROM t1 WHERE word LIKE _ucs2 x'00630061005F';
...
@@ -173,6 +173,12 @@ SELECT * FROM t1 WHERE word LIKE _ucs2 x'00630061005F';
word
word
cat
cat
DROP TABLE t1;
DROP TABLE t1;
select insert(_ucs2 0x006100620063,10,2,_ucs2 0x006400650066);
insert(_ucs2 0x006100620063,10,2,_ucs2 0x006400650066)
abc
select insert(_ucs2 0x006100620063,1,2,_ucs2 0x006400650066);
insert(_ucs2 0x006100620063,1,2,_ucs2 0x006400650066)
defc
SET NAMES latin1;
SET NAMES latin1;
CREATE TABLE t1 (
CREATE TABLE t1 (
word VARCHAR(64),
word VARCHAR(64),
...
...
mysql-test/r/ctype_utf8.result
View file @
b63b7bff
...
@@ -62,3 +62,9 @@ select 'A' like 'a' collate utf8_bin;
...
@@ -62,3 +62,9 @@ select 'A' like 'a' collate utf8_bin;
select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%');
select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%');
_utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%')
_utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%')
1
1
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
this is a test
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
insert("aa",100,1,"b") insert("aa",1,3,"b")
aa b
mysql-test/t/ctype_ucs.test
View file @
b63b7bff
...
@@ -93,6 +93,12 @@ SELECT * FROM t1 WHERE word LIKE _ucs2 x'00630025';
...
@@ -93,6 +93,12 @@ SELECT * FROM t1 WHERE word LIKE _ucs2 x'00630025';
SELECT
*
FROM
t1
WHERE
word
LIKE
_ucs2
x
'00630061005F'
;
SELECT
*
FROM
t1
WHERE
word
LIKE
_ucs2
x
'00630061005F'
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Check that INSERT works fine.
# This invokes charpos() function.
select
insert
(
_ucs2
0x006100620063
,
10
,
2
,
_ucs2
0x006400650066
);
select
insert
(
_ucs2
0x006100620063
,
1
,
2
,
_ucs2
0x006400650066
);
######################################################
######################################################
#
#
...
@@ -191,4 +197,3 @@ DROP TABLE t1;
...
@@ -191,4 +197,3 @@ DROP TABLE t1;
# END OF Bug 1264 test
# END OF Bug 1264 test
#
#
########################################################
########################################################
mysql-test/t/ctype_utf8.test
View file @
b63b7bff
...
@@ -35,3 +35,9 @@ select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%');
...
@@ -35,3 +35,9 @@ select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD0B1,_utf8 '%');
#
#
#select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD091,_utf8 '%');
#select _utf8 0xD0B0D0B1D0B2 like concat(_utf8'%',_utf8 0xD091,_utf8 '%');
#
#
#
# Bug 2367: INSERT() behaviour is different for different charsets.
#
select
insert
(
'txs'
,
2
,
1
,
'hi'
),
insert
(
'is '
,
4
,
0
,
'a'
),
insert
(
'txxxxt'
,
2
,
4
,
'es'
);
select
insert
(
"aa"
,
100
,
1
,
"b"
),
insert
(
"aa"
,
1
,
3
,
"b"
);
strings/ctype-mb.c
View file @
b63b7bff
...
@@ -271,7 +271,7 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
...
@@ -271,7 +271,7 @@ uint my_charpos_mb(CHARSET_INFO *cs __attribute__((unused)),
b
+=
(
mblen
=
my_ismbchar
(
cs
,
b
,
e
))
?
mblen
:
1
;
b
+=
(
mblen
=
my_ismbchar
(
cs
,
b
,
e
))
?
mblen
:
1
;
pos
--
;
pos
--
;
}
}
return
b
-
b0
;
return
pos
?
e
+
2
-
b0
:
b
-
b0
;
}
}
uint
my_instr_mb
(
CHARSET_INFO
*
cs
,
uint
my_instr_mb
(
CHARSET_INFO
*
cs
,
...
...
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