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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6a3cc819
Commit
6a3cc819
authored
Dec 16, 2009
by
Mats Kindahl
Browse files
Options
Browse Files
Download
Plain Diff
Merging with mysql-5.1-rep+2
parents
f63a9d69
74577209
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
sql/field.cc
sql/field.cc
+5
-4
sql/rpl_utility.cc
sql/rpl_utility.cc
+9
-11
No files found.
sql/field.cc
View file @
6a3cc819
...
...
@@ -999,18 +999,19 @@ test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend)
/**
Template function to compare two objects.
Function to compare two unsigned integers for their relative order.
Used below. In an anonymous namespace to not clash with definitions
in other files.
*/
namespace
{
template
<
class
A_type
,
class
B_type
>
int
compare
(
A_type
a
,
B_type
b
)
int
compare
(
unsigned
int
a
,
unsigned
int
b
)
{
if
(
a
<
b
)
return
-
1
;
if
(
b
<
a
)
return
1
;
return
0
;
}
}
}
/**
...
...
sql/rpl_utility.cc
View file @
6a3cc819
...
...
@@ -19,18 +19,16 @@
#include "rpl_rli.h"
/**
Template function to compare two objects.
Function to compare two size_t integers for their relative
order. Used below.
*/
namespace
{
template
<
class
Type
>
int
compare
(
Type
a
,
Type
b
)
{
if
(
a
<
b
)
return
-
1
;
if
(
b
<
a
)
return
1
;
return
0
;
}
int
compare
(
size_t
a
,
size_t
b
)
{
if
(
a
<
b
)
return
-
1
;
if
(
b
<
a
)
return
1
;
return
0
;
}
...
...
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