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
e8278396
Commit
e8278396
authored
Oct 14, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #6019 SELECT tries to use too short prefix index on utf8 data
parent
48120f77
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
2 deletions
+32
-2
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+11
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+15
-0
strings/ctype-mb.c
strings/ctype-mb.c
+4
-0
strings/ctype-utf8.c
strings/ctype-utf8.c
+2
-2
No files found.
mysql-test/r/ctype_utf8.result
View file @
e8278396
...
...
@@ -779,3 +779,14 @@ id term
2 testetest
3 testtest
DROP TABLE t1;
set names utf8;
create table t1 (
a int primary key,
b varchar(6),
index b3(b(3))
) engine=myisam character set=utf8;
insert into t1 values(1,'foo'),(2,'foobar');
select * from t1 where b like 'foob%';
a b
2 foobar
drop table t1;
mysql-test/t/ctype_utf8.test
View file @
e8278396
...
...
@@ -620,3 +620,18 @@ SELECT id, term FROM t1 where (list_id = 1) AND (term = "test
SELECT
id
,
term
FROM
t1
where
(
list_id
=
1
)
AND
(
term
=
"testetest"
);
SELECT
id
,
term
FROM
t1
where
(
list_id
=
1
)
AND
(
term
=
"testtest"
);
DROP
TABLE
t1
;
#
# Bug #6019 SELECT tries to use too short prefix index on utf8 data
#
set
names
utf8
;
--
disable_warnings
create
table
t1
(
a
int
primary
key
,
b
varchar
(
6
),
index
b3
(
b
(
3
))
)
engine
=
myisam
character
set
=
utf8
;
--
enable_warnings
insert
into
t1
values
(
1
,
'foo'
),(
2
,
'foobar'
);
select
*
from
t1
where
b
like
'foob%'
;
drop
table
t1
;
strings/ctype-mb.c
View file @
e8278396
...
...
@@ -499,6 +499,10 @@ my_bool my_like_range_mb(CHARSET_INFO *cs,
{
char
buf
[
10
];
uint
buflen
;
uint
charlen
=
my_charpos
(
cs
,
min_org
,
min_str
,
res_length
/
cs
->
mbmaxlen
);
if
(
charlen
<
(
uint
)
(
min_str
-
min_org
))
min_str
=
min_org
+
charlen
;
/* Write min key */
*
min_length
=
(
uint
)
(
min_str
-
min_org
);
...
...
strings/ctype-utf8.c
View file @
e8278396
...
...
@@ -2059,7 +2059,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler =
my_strnncoll_utf8
,
my_strnncollsp_utf8
,
my_strnxfrm_utf8
,
my_like_range_
simple
,
my_like_range_
mb
,
my_wildcmp_mb
,
my_strcasecmp_utf8
,
my_instr_mb
,
...
...
@@ -2119,7 +2119,7 @@ CHARSET_INFO my_charset_utf8_general_ci=
1
,
/* mbminlen */
3
,
/* mbmaxlen */
0
,
/* min_sort_char */
255
,
/* max_sort_char */
0xFFFF
,
/* max_sort_char */
&
my_charset_utf8_handler
,
&
my_collation_ci_handler
};
...
...
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