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
faabb1c4
Commit
faabb1c4
authored
Aug 19, 2003
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix for a bug with long definition of SET or ENUM.
Barkov approved it already
parent
9b5deb8f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
mysql-test/r/type_set.result
mysql-test/r/type_set.result
+2
-0
mysql-test/t/type_set.test
mysql-test/t/type_set.test
+2
-0
sql/sql_parse.cc
sql/sql_parse.cc
+3
-2
No files found.
mysql-test/r/type_set.result
View file @
faabb1c4
...
...
@@ -13,3 +13,5 @@ t1 CREATE TABLE `t1` (
`a` set('','a','b') NOT NULL default 'b'
) TYPE=MyISAM CHARSET=latin1
drop table t1;
CREATE TABLE t1 ( user varchar(64) NOT NULL default '', path varchar(255) NOT NULL default '', privilege set('select','RESERVED30','RESERVED29','RESERVED28','RESERVED27','RESERVED26', 'RESERVED25','RESERVED24','data.delete','RESERVED22','RESERVED21', 'RESERVED20','data.insert.none','data.insert.approve', 'data.insert.delete','data.insert.move','data.insert.propose', 'data.insert.reject','RESERVED13','RESERVED12','RESERVED11','RESERVED10', 'RESERVED09','data.update','RESERVED07','RESERVED06','RESERVED05', 'RESERVED04','metadata.delete','metadata.put','RESERVED01','RESERVED00') NOT NULL default '', KEY user (user) ) TYPE=MyISAM CHARSET=utf8;
DROP TABLE t1;
mysql-test/t/type_set.test
View file @
faabb1c4
...
...
@@ -12,3 +12,5 @@ drop table t1;
create
table
t1
(
a
set
(
' '
,
'a'
,
'b '
)
not
null
default
'b '
);
show
create
table
t1
;
drop
table
t1
;
CREATE
TABLE
t1
(
user
varchar
(
64
)
NOT
NULL
default
''
,
path
varchar
(
255
)
NOT
NULL
default
''
,
privilege
set
(
'select'
,
'RESERVED30'
,
'RESERVED29'
,
'RESERVED28'
,
'RESERVED27'
,
'RESERVED26'
,
'RESERVED25'
,
'RESERVED24'
,
'data.delete'
,
'RESERVED22'
,
'RESERVED21'
,
'RESERVED20'
,
'data.insert.none'
,
'data.insert.approve'
,
'data.insert.delete'
,
'data.insert.move'
,
'data.insert.propose'
,
'data.insert.reject'
,
'RESERVED13'
,
'RESERVED12'
,
'RESERVED11'
,
'RESERVED10'
,
'RESERVED09'
,
'data.update'
,
'RESERVED07'
,
'RESERVED06'
,
'RESERVED05'
,
'RESERVED04'
,
'metadata.delete'
,
'metadata.put'
,
'RESERVED01'
,
'RESERVED00'
)
NOT
NULL
default
''
,
KEY
user
(
user
)
)
TYPE
=
MyISAM
CHARSET
=
utf8
;
DROP
TABLE
t1
;
sql/sql_parse.cc
View file @
faabb1c4
...
...
@@ -3967,9 +3967,10 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type,
}
}
if
(
new_field
->
length
>
MAX_FIELD_CHARLENGTH
||
if
((
new_field
->
length
>
MAX_FIELD_CHARLENGTH
&&
type
!=
FIELD_TYPE_SET
&&
type
!=
FIELD_TYPE_ENUM
)
||
(
!
new_field
->
length
&&
!
(
new_field
->
flags
&
BLOB_FLAG
)
&&
type
!=
FIELD_TYPE_STRING
&&
type
!=
FIELD_TYPE_STRING
&&
type
!=
FIELD_TYPE_VAR_STRING
&&
type
!=
FIELD_TYPE_GEOMETRY
))
{
net_printf
(
thd
,
ER_TOO_BIG_FIELDLENGTH
,
field_name
,
...
...
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