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
8215f1b0
Commit
8215f1b0
authored
Feb 03, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#175 compare enums using eq_def
parent
ce3989b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
storage/tokudb/hatoku_cmp.cc
storage/tokudb/hatoku_cmp.cc
+19
-18
No files found.
storage/tokudb/hatoku_cmp.cc
View file @
8215f1b0
...
...
@@ -3140,19 +3140,11 @@ static uint32_t pack_key_from_desc(
return
(
uint32_t
)(
packed_key_pos
-
buf
);
//
}
static
bool
fields_have_same_name
(
Field
*
a
,
Field
*
b
)
{
static
bool
fields_have_same_name
(
Field
*
a
,
Field
*
b
)
{
return
strcmp
(
a
->
field_name
,
b
->
field_name
)
==
0
;
}
static
bool
fields_are_same_type
(
Field
*
a
,
Field
*
b
)
{
static
bool
fields_are_same_type
(
Field
*
a
,
Field
*
b
)
{
bool
retval
=
true
;
enum_field_types
a_mysql_type
=
a
->
real_type
();
enum_field_types
b_mysql_type
=
b
->
real_type
();
...
...
@@ -3209,8 +3201,22 @@ static bool fields_are_same_type(
goto
cleanup
;
}
break
;
case
MYSQL_TYPE_ENUM
:
case
MYSQL_TYPE_SET
:
case
MYSQL_TYPE_ENUM
:
{
Field_enum
*
a_enum
=
static_cast
<
Field_enum
*>
(
a
);
if
(
!
a_enum
->
eq_def
(
b
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
}
case
MYSQL_TYPE_SET
:
{
Field_set
*
a_set
=
static_cast
<
Field_set
*>
(
a
);
if
(
!
a_set
->
eq_def
(
b
))
{
retval
=
false
;
goto
cleanup
;
}
break
;
}
case
MYSQL_TYPE_BIT
:
// length
if
(
a
->
pack_length
()
!=
b
->
pack_length
())
{
...
...
@@ -3315,12 +3321,7 @@ static bool fields_are_same_type(
return
retval
;
}
static
bool
are_two_fields_same
(
Field
*
a
,
Field
*
b
)
{
static
bool
are_two_fields_same
(
Field
*
a
,
Field
*
b
)
{
return
fields_have_same_name
(
a
,
b
)
&&
fields_are_same_type
(
a
,
b
);
}
...
...
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