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
2f6d464f
Commit
2f6d464f
authored
Jul 11, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: reorder enum_fk_option
parent
f7a9f446
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
sql/table.cc
sql/table.cc
+1
-7
sql/table.h
sql/table.h
+7
-3
No files found.
sql/table.cc
View file @
2f6d464f
...
...
@@ -9771,20 +9771,14 @@ LEX_CSTRING *fk_option_name(enum_fk_option opt)
{
{
STRING_WITH_LEN
(
"???"
)
},
{
STRING_WITH_LEN
(
"RESTRICT"
)
},
{
STRING_WITH_LEN
(
"NO ACTION"
)
},
{
STRING_WITH_LEN
(
"CASCADE"
)
},
{
STRING_WITH_LEN
(
"SET NULL"
)
},
{
STRING_WITH_LEN
(
"NO ACTION"
)
},
{
STRING_WITH_LEN
(
"SET DEFAULT"
)
}
};
return
names
+
opt
;
}
bool
fk_modifies_child
(
enum_fk_option
opt
)
{
static
bool
can_write
[]
=
{
false
,
false
,
true
,
true
,
false
,
true
};
return
can_write
[
opt
];
}
enum
TR_table
::
enabled
TR_table
::
use_transaction_registry
=
TR_table
::
MAYBE
;
TR_table
::
TR_table
(
THD
*
_thd
,
bool
rw
)
:
...
...
sql/table.h
View file @
2f6d464f
...
...
@@ -1860,8 +1860,8 @@ enum enum_schema_table_state
PROCESSED_BY_JOIN_EXEC
};
enum
enum_fk_option
{
FK_OPTION_UNDEF
,
FK_OPTION_RESTRICT
,
FK_OPTION_
CASCADE
,
FK_OPTION_SET_NULL
,
FK_OPTION_NO_ACTION
,
FK_OPTION_SET_DEFAULT
};
enum
enum_fk_option
{
FK_OPTION_UNDEF
,
FK_OPTION_RESTRICT
,
FK_OPTION_
NO_ACTION
,
FK_OPTION_CASCADE
,
FK_OPTION_SET_NULL
,
FK_OPTION_SET_DEFAULT
};
typedef
struct
st_foreign_key_info
{
...
...
@@ -1878,7 +1878,11 @@ typedef struct st_foreign_key_info
}
FOREIGN_KEY_INFO
;
LEX_CSTRING
*
fk_option_name
(
enum_fk_option
opt
);
bool
fk_modifies_child
(
enum_fk_option
opt
);
static
inline
bool
fk_modifies_child
(
enum_fk_option
opt
)
{
return
opt
>=
FK_OPTION_CASCADE
;
}
class
IS_table_read_plan
;
...
...
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