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
0df22a53
Commit
0df22a53
authored
Dec 07, 2015
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table
Incorrect array lenght for comma buffer.
parent
d85168e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
mysql-test/r/create.result
mysql-test/r/create.result
+6
-0
mysql-test/t/create.test
mysql-test/t/create.test
+8
-0
sql/sql_table.cc
sql/sql_table.cc
+3
-2
No files found.
mysql-test/r/create.result
View file @
0df22a53
...
@@ -2477,3 +2477,9 @@ t1 CREATE TABLE `t1` (
...
@@ -2477,3 +2477,9 @@ t1 CREATE TABLE `t1` (
`c` char(32) AS (convert(cast(n as char), char)) PERSISTENT
`c` char(32) AS (convert(cast(n as char), char)) PERSISTENT
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
set @@session.collation_server=filename;
create table t1(a enum('',''));
Warnings:
Note 1291 Column 'a' has duplicated value '' in ENUM
drop table t1;
set @@session.collation_server=default;
mysql-test/t/create.test
View file @
0df22a53
...
@@ -2053,3 +2053,11 @@ select * from t1;
...
@@ -2053,3 +2053,11 @@ select * from t1;
show
create
table
t1
;
show
create
table
t1
;
drop
table
t1
;
drop
table
t1
;
#
# MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table
#
set
@@
session
.
collation_server
=
filename
;
create
table
t1
(
a
enum
(
''
,
''
));
drop
table
t1
;
set
@@
session
.
collation_server
=
default
;
sql/sql_table.cc
View file @
0df22a53
...
@@ -2986,9 +2986,10 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -2986,9 +2986,10 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field
->
interval_list
);
sql_field
->
interval_list
);
List_iterator
<
String
>
int_it
(
sql_field
->
interval_list
);
List_iterator
<
String
>
int_it
(
sql_field
->
interval_list
);
String
conv
,
*
tmp
;
String
conv
,
*
tmp
;
char
comma_buf
[
4
];
/* 4 bytes for utf32 */
char
comma_buf
[
5
];
/* 5 bytes for 'filename' charset */
DBUG_ASSERT
(
sizeof
(
comma_buf
)
>=
cs
->
mbmaxlen
);
int
comma_length
=
cs
->
cset
->
wc_mb
(
cs
,
','
,
(
uchar
*
)
comma_buf
,
int
comma_length
=
cs
->
cset
->
wc_mb
(
cs
,
','
,
(
uchar
*
)
comma_buf
,
(
uchar
*
)
comma_buf
+
(
uchar
*
)
comma_buf
+
sizeof
(
comma_buf
));
sizeof
(
comma_buf
));
DBUG_ASSERT
(
comma_length
>
0
);
DBUG_ASSERT
(
comma_length
>
0
);
for
(
uint
i
=
0
;
(
tmp
=
int_it
++
);
i
++
)
for
(
uint
i
=
0
;
(
tmp
=
int_it
++
);
i
++
)
...
...
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