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
486a48d4
Commit
486a48d4
authored
Mar 31, 2006
by
gluh@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.1-new
parents
cfb63c4b
70a8f32d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
mysql-test/r/create.result
mysql-test/r/create.result
+2
-0
mysql-test/t/create.test
mysql-test/t/create.test
+6
-0
sql/sql_table.cc
sql/sql_table.cc
+15
-0
No files found.
mysql-test/r/create.result
View file @
486a48d4
...
...
@@ -751,6 +751,8 @@ t2 CREATE TABLE `t2` (
`a2` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1(a set("a,b","c,d") not null);
ERROR 22007: Illegal set 'a,b' value found during parsing
create table t1 (i int) engine=myisam max_rows=100000000000;
show create table t1;
Table Create Table
...
...
mysql-test/t/create.test
View file @
486a48d4
...
...
@@ -647,6 +647,12 @@ show create table t2;
drop
table
t1
,
t2
;
#
# Bug #15316 SET value having comma not correctly handled
#
--
error
1367
create
table
t1
(
a
set
(
"a,b"
,
"c,d"
)
not
null
);
# End of 4.1 tests
#
...
...
sql/sql_table.cc
View file @
486a48d4
...
...
@@ -1191,6 +1191,11 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field
->
interval_list
);
List_iterator
<
String
>
it
(
sql_field
->
interval_list
);
String
conv
,
*
tmp
;
char
comma_buf
[
2
];
int
comma_length
=
cs
->
cset
->
wc_mb
(
cs
,
','
,
(
uchar
*
)
comma_buf
,
(
uchar
*
)
comma_buf
+
sizeof
(
comma_buf
));
DBUG_ASSERT
(
comma_length
>
0
);
for
(
uint
i
=
0
;
(
tmp
=
it
++
);
i
++
)
{
uint
lengthsp
;
...
...
@@ -1209,6 +1214,16 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
interval
->
type_lengths
[
i
]);
interval
->
type_lengths
[
i
]
=
lengthsp
;
((
uchar
*
)
interval
->
type_names
[
i
])[
lengthsp
]
=
'\0'
;
if
(
sql_field
->
sql_type
==
FIELD_TYPE_SET
)
{
if
(
cs
->
coll
->
instr
(
cs
,
interval
->
type_names
[
i
],
interval
->
type_lengths
[
i
],
comma_buf
,
comma_length
,
NULL
,
0
))
{
my_error
(
ER_ILLEGAL_VALUE_FOR_TYPE
,
MYF
(
0
),
"set"
,
tmp
->
ptr
());
DBUG_RETURN
(
-
1
);
}
}
}
sql_field
->
interval_list
.
empty
();
// Don't need interval_list anymore
}
...
...
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