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
4d75b059
Commit
4d75b059
authored
Jul 22, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/bar/mysql-4.1.b11754
parents
62aad2bc
53478eb0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
8 deletions
+70
-8
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+39
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+21
-0
strings/ctype-utf8.c
strings/ctype-utf8.c
+10
-8
No files found.
mysql-test/r/ctype_utf8.result
View file @
4d75b059
...
@@ -954,6 +954,45 @@ char_length(a) length(a) a
...
@@ -954,6 +954,45 @@ char_length(a) length(a) a
2 2 12
2 2 12
2 4 ан
2 4 ан
drop table t1;
drop table t1;
set names utf8;
select 'a\\' like 'a\\';
'a\\' like 'a\\'
1
select 'aa\\' like 'a%\\';
'aa\\' like 'a%\\'
1
create table t1 (a char(10), key(a)) character set utf8;
insert into t1 values ("a"),("abc"),("abcd"),("hello"),("test");
select * from t1 where a like "abc%";
a
abc
abcd
select * from t1 where a like concat("abc","%");
a
abc
abcd
select * from t1 where a like "ABC%";
a
abc
abcd
select * from t1 where a like "test%";
a
test
select * from t1 where a like "te_t";
a
test
select * from t1 where a like "%a%";
a
a
abc
abcd
select * from t1 where a like "%abcd%";
a
abcd
select * from t1 where a like "%abc\d%";
a
abcd
drop table t1;
CREATE TABLE t1 (
CREATE TABLE t1 (
a varchar(255) NOT NULL default '',
a varchar(255) NOT NULL default '',
KEY a (a)
KEY a (a)
...
...
mysql-test/t/ctype_utf8.test
View file @
4d75b059
...
@@ -810,6 +810,27 @@ alter table t1 modify a char(2) character set utf8;
...
@@ -810,6 +810,27 @@ alter table t1 modify a char(2) character set utf8;
select
char_length
(
a
),
length
(
a
),
a
from
t1
order
by
a
;
select
char_length
(
a
),
length
(
a
),
a
from
t1
order
by
a
;
drop
table
t1
;
drop
table
t1
;
#
# Bugs#11754: SET NAMES utf8 followed by SELECT "A\\" LIKE "A\\" returns 0
#
set
names
utf8
;
select
'a\\'
like
'a\\'
;
select
'aa\\'
like
'a%\\'
;
create
table
t1
(
a
char
(
10
),
key
(
a
))
character
set
utf8
;
insert
into
t1
values
(
"a"
),(
"abc"
),(
"abcd"
),(
"hello"
),(
"test"
);
select
*
from
t1
where
a
like
"abc%"
;
select
*
from
t1
where
a
like
concat
(
"abc"
,
"%"
);
select
*
from
t1
where
a
like
"ABC%"
;
select
*
from
t1
where
a
like
"test%"
;
select
*
from
t1
where
a
like
"te_t"
;
select
*
from
t1
where
a
like
"%a%"
;
select
*
from
t1
where
a
like
"%abcd%"
;
select
*
from
t1
where
a
like
"%abc\d%"
;
drop
table
t1
;
#
#
# Bug#9557 MyISAM utf8 table crash
# Bug#9557 MyISAM utf8 table crash
#
#
...
...
strings/ctype-utf8.c
View file @
4d75b059
...
@@ -1557,7 +1557,7 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
...
@@ -1557,7 +1557,7 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
}
}
wildstr
+=
scan
;
wildstr
+=
scan
;
if
(
w_wc
==
(
my_wc_t
)
escape
)
if
(
w_wc
==
(
my_wc_t
)
escape
&&
wildstr
<
wildend
)
{
{
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
(
const
uchar
*
)
wildend
))
<=
0
)
...
@@ -1629,13 +1629,17 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
...
@@ -1629,13 +1629,17 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
return
1
;
wildstr
+=
scan
;
if
(
w_wc
==
(
my_wc_t
)
escape
)
if
(
w_wc
==
(
my_wc_t
)
escape
)
{
{
wildstr
+=
scan
;
if
(
wildstr
<
wildend
)
{
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
if
((
scan
=
mb_wc
(
cs
,
&
w_wc
,
(
const
uchar
*
)
wildstr
,
(
const
uchar
*
)
wildend
))
<=
0
)
(
const
uchar
*
)
wildend
))
<=
0
)
return
1
;
return
1
;
wildstr
+=
scan
;
}
}
}
while
(
1
)
while
(
1
)
...
@@ -1661,14 +1665,12 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
...
@@ -1661,14 +1665,12 @@ int my_wildcmp_unicode(CHARSET_INFO *cs,
if
(
str
==
str_end
)
if
(
str
==
str_end
)
return
-
1
;
return
-
1
;
str
+=
scan
;
result
=
my_wildcmp_unicode
(
cs
,
str
,
str_end
,
wildstr
,
wildend
,
result
=
my_wildcmp_unicode
(
cs
,
str
,
str_end
,
wildstr
,
wildend
,
escape
,
w_one
,
w_many
,
escape
,
w_one
,
w_many
,
weights
);
weights
);
if
(
result
<=
0
)
if
(
result
<=
0
)
return
result
;
return
result
;
str
+=
scan
;
}
}
}
}
}
}
...
...
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