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
929d1a16
Commit
929d1a16
authored
Jul 23, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #4555 ALTER TABLE crashes mysqld with enum column collated utf8_unicode_ci
parent
9d670dfa
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 @
929d1a16
...
...
@@ -240,3 +240,6 @@ select 'zвася' rlike '[[:<:]]вася[[:>:]]';
select 'zвасяz' rlike '[[:<:]]вася[[:>:]]';
'zвасяz' rlike '[[:<:]]вася[[:>:]]'
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 @
929d1a16
...
...
@@ -157,3 +157,11 @@ select ' вася ' rlike '[[:<:]]вася[[:>:]]';
select
'васяz'
rlike
'[[:<:]]вася[[:>:]]'
;
select
'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 @
929d1a16
...
...
@@ -5625,8 +5625,11 @@ bool Field_enum::eq_def(Field *field)
if
(
typelib
->
count
<
from_lib
->
count
)
return
0
;
for
(
uint
i
=
0
;
i
<
from_lib
->
count
;
i
++
)
if
(
my_strcasecmp
(
field_charset
,
typelib
->
type_names
[
i
],
from_lib
->
type_names
[
i
]))
if
(
my_strnncoll
(
field_charset
,
(
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
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