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
5282d0dc
Commit
5282d0dc
authored
Feb 23, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: use enum, not uint, for enum variables
parent
d717fe76
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
sql/sql_class.h
sql/sql_class.h
+4
-2
storage/innobase/handler/handler0alter.cc
storage/innobase/handler/handler0alter.cc
+4
-1
No files found.
sql/sql_class.h
View file @
5282d0dc
...
...
@@ -362,11 +362,13 @@ class Foreign_key: public Key {
LEX_CSTRING
ref_db
;
LEX_CSTRING
ref_table
;
List
<
Key_part_spec
>
ref_columns
;
uint
delete_opt
,
update_opt
,
match_opt
;
enum
enum_fk_option
delete_opt
,
update_opt
;
enum
fk_match_opt
match_opt
;
Foreign_key
(
const
LEX_CSTRING
*
name_arg
,
List
<
Key_part_spec
>
*
cols
,
const
LEX_CSTRING
*
ref_db_arg
,
const
LEX_CSTRING
*
ref_table_arg
,
List
<
Key_part_spec
>
*
ref_cols
,
uint
delete_opt_arg
,
uint
update_opt_arg
,
uint
match_opt_arg
,
enum_fk_option
delete_opt_arg
,
enum_fk_option
update_opt_arg
,
fk_match_opt
match_opt_arg
,
DDL_options
ddl_options
)
:
Key
(
FOREIGN_KEY
,
name_arg
,
&
default_key_create_info
,
0
,
cols
,
NULL
,
ddl_options
),
...
...
storage/innobase/handler/handler0alter.cc
View file @
5282d0dc
...
...
@@ -1383,7 +1383,6 @@ innobase_set_foreign_key_option(
ut_ad
(
!
foreign
->
type
);
switch
(
fk_key
->
delete_opt
)
{
// JAN: TODO: ? MySQL 5.7 used enum fk_option directly from sql_lex.h
case
FK_OPTION_NO_ACTION
:
case
FK_OPTION_RESTRICT
:
case
FK_OPTION_SET_DEFAULT
:
...
...
@@ -1395,6 +1394,8 @@ innobase_set_foreign_key_option(
case
FK_OPTION_SET_NULL
:
foreign
->
type
=
DICT_FOREIGN_ON_DELETE_SET_NULL
;
break
;
case
FK_OPTION_UNDEF
:
DBUG_ASSERT
(
0
);
}
switch
(
fk_key
->
update_opt
)
{
...
...
@@ -1409,6 +1410,8 @@ innobase_set_foreign_key_option(
case
FK_OPTION_SET_NULL
:
foreign
->
type
|=
DICT_FOREIGN_ON_UPDATE_SET_NULL
;
break
;
case
FK_OPTION_UNDEF
:
DBUG_ASSERT
(
0
);
}
return
(
innobase_check_fk_option
(
foreign
));
...
...
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