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
ddd85089
Commit
ddd85089
authored
Mar 29, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1
parents
aeb9a4a1
2aeb4206
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
0 deletions
+25
-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
+17
-0
No files found.
mysql-test/r/create.result
View file @
ddd85089
...
@@ -699,3 +699,5 @@ t2 CREATE TABLE `t2` (
...
@@ -699,3 +699,5 @@ t2 CREATE TABLE `t2` (
`a2` int(11) default NULL
`a2` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
drop table t1, t2;
create table t1(a set("a,b","c,d") not null);
ERROR HY000: Illegal set 'a,b' value found during parsing
mysql-test/t/create.test
View file @
ddd85089
...
@@ -603,4 +603,10 @@ show create table t2;
...
@@ -603,4 +603,10 @@ show create table t2;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Bug #15316 SET value having comma not correctly handled
#
--
error
1105
create
table
t1
(
a
set
(
"a,b"
,
"c,d"
)
not
null
);
# End of 4.1 tests
# End of 4.1 tests
sql/sql_table.cc
View file @
ddd85089
...
@@ -540,6 +540,11 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -540,6 +540,11 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
sql_field
->
interval_list
);
sql_field
->
interval_list
);
List_iterator
<
String
>
it
(
sql_field
->
interval_list
);
List_iterator
<
String
>
it
(
sql_field
->
interval_list
);
String
conv
,
*
tmp
;
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
++
)
for
(
uint
i
=
0
;
(
tmp
=
it
++
);
i
++
)
{
{
if
(
String
::
needs_conversion
(
tmp
->
length
(),
tmp
->
charset
(),
if
(
String
::
needs_conversion
(
tmp
->
length
(),
tmp
->
charset
(),
...
@@ -559,6 +564,18 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
...
@@ -559,6 +564,18 @@ int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info,
interval
->
type_lengths
[
i
]);
interval
->
type_lengths
[
i
]);
interval
->
type_lengths
[
i
]
=
lengthsp
;
interval
->
type_lengths
[
i
]
=
lengthsp
;
((
uchar
*
)
interval
->
type_names
[
i
])[
lengthsp
]
=
'\0'
;
((
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_printf_error
(
ER_UNKNOWN_ERROR
,
"Illegal %s '%-.64s' value found during parsing"
,
MYF
(
0
),
"set"
,
tmp
->
ptr
());
DBUG_RETURN
(
-
1
);
}
}
}
}
sql_field
->
interval_list
.
empty
();
// Don't need interval_list anymore
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