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
6cad42e3
Commit
6cad42e3
authored
Jul 23, 2004
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #4555 ALTER TABLE crashes mysqld with enum column collated utf8_unicode_ci
parent
0f298f02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+3
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+8
-0
sql/field.cc
sql/field.cc
+5
-2
No files found.
mysql-test/r/ctype_utf8.result
View file @
6cad42e3
...
@@ -240,3 +240,6 @@ select 'zвася' rlike '[[:<:]]вася[[:>:]]';
...
@@ -240,3 +240,6 @@ select 'zвася' rlike '[[:<:]]вася[[:>:]]';
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]';
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]';
'zвасяz' rlike '[[:<:]]вася[[:>:]]'
'zвасяz' rlike '[[:<:]]вася[[:>:]]'
0
0
CREATE TABLE t1 (a enum ('Y', 'N') DEFAULT 'N' COLLATE utf8_unicode_ci);
ALTER TABLE t1 ADD COLUMN b CHAR(20);
DROP TABLE t1;
mysql-test/t/ctype_utf8.test
View file @
6cad42e3
...
@@ -157,3 +157,11 @@ select ' вася ' rlike '[[:<:]]вася[[:>:]]';
...
@@ -157,3 +157,11 @@ select ' вася ' rlike '[[:<:]]вася[[:>:]]';
select
'васяz'
rlike
'[[:<:]]вася[[:>:]]'
;
select
'васяz'
rlike
'[[:<:]]вася[[:>:]]'
;
select
'zвася'
rlike
'[[:<:]]вася[[:>:]]'
;
select
'zвася'
rlike
'[[:<:]]вася[[:>:]]'
;
select
'zвасяz'
rlike
'[[:<:]]вася[[:>:]]'
;
select
'zвасяz'
rlike
'[[:<:]]вася[[:>:]]'
;
#
# Bug #4555
# ALTER TABLE crashes mysqld with enum column collated utf8_unicode_ci
#
CREATE
TABLE
t1
(
a
enum
(
'Y'
,
'N'
)
DEFAULT
'N'
COLLATE
utf8_unicode_ci
);
ALTER
TABLE
t1
ADD
COLUMN
b
CHAR
(
20
);
DROP
TABLE
t1
;
sql/field.cc
View file @
6cad42e3
...
@@ -5625,8 +5625,11 @@ bool Field_enum::eq_def(Field *field)
...
@@ -5625,8 +5625,11 @@ bool Field_enum::eq_def(Field *field)
if
(
typelib
->
count
<
from_lib
->
count
)
if
(
typelib
->
count
<
from_lib
->
count
)
return
0
;
return
0
;
for
(
uint
i
=
0
;
i
<
from_lib
->
count
;
i
++
)
for
(
uint
i
=
0
;
i
<
from_lib
->
count
;
i
++
)
if
(
my_strcasecmp
(
field_charset
,
if
(
my_strnncoll
(
field_charset
,
typelib
->
type_names
[
i
],
from_lib
->
type_names
[
i
]))
(
const
uchar
*
)
typelib
->
type_names
[
i
],
strlen
(
typelib
->
type_names
[
i
]),
(
const
uchar
*
)
from_lib
->
type_names
[
i
],
strlen
(
from_lib
->
type_names
[
i
])))
return
0
;
return
0
;
return
1
;
return
1
;
}
}
...
...
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