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
8783de7c
Commit
8783de7c
authored
Nov 30, 2007
by
Bradley C. Kuszmaul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turn on -O2 again
git-svn-id:
file:///svn/tokudb@851
c7de825b-a66e-492c-adef-691d508d4ae1
parent
4c053495
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
5 deletions
+21
-5
src/Makefile
src/Makefile
+1
-1
src/ydb.c
src/ydb.c
+20
-4
No files found.
src/Makefile
View file @
8783de7c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
LIBNAME
=
libdb
LIBNAME
=
libdb
#
OPTFLAGS = -O2
OPTFLAGS
=
-O2
CFLAGS
=
-W
-Wall
-Werror
-g
-fPIC
$(OPTFLAGS)
CFLAGS
=
-W
-Wall
-Werror
-g
-fPIC
$(OPTFLAGS)
CPPFLAGS
=
-I
../include
-I
../newbrt
CPPFLAGS
=
-I
../include
-I
../newbrt
CPPFLAGS
+=
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE64_SOURCE
CPPFLAGS
+=
-D_FILE_OFFSET_BITS
=
64
-D_LARGEFILE64_SOURCE
...
...
src/ydb.c
View file @
8783de7c
...
@@ -616,21 +616,37 @@ static int toku_db_del(DB * db, DB_TXN * txn, DBT * key, u_int32_t flags) {
...
@@ -616,21 +616,37 @@ static int toku_db_del(DB * db, DB_TXN * txn, DBT * key, u_int32_t flags) {
return
r
;
return
r
;
}
}
static
int
toku_db_get
(
DB
*
db
,
DB_TXN
*
txn
__attribute__
((
unused
))
,
DBT
*
key
,
DBT
*
data
,
u_int32_t
flags
)
{
static
int
toku_db_get
(
DB
*
db
,
DB_TXN
*
txn
,
DBT
*
key
,
DBT
*
data
,
u_int32_t
flags
)
{
assert
(
flags
==
0
);
assert
(
flags
==
0
);
int
r
;
int
r
;
unsigned
int
brtflags
;
unsigned
int
brtflags
;
DBT
primary_key
;
DBT
*
sdata
;
DB
*
primary
=
db
->
i
->
primary
;
int
is_secondary
=
primary
!=
0
;
if
(
is_secondary
)
{
memset
(
&
primary_key
,
0
,
sizeof
(
primary_key
));
sdata
=&
primary_key
;
}
else
{
sdata
=
data
;
}
toku_brt_get_flags
(
db
->
i
->
brt
,
&
brtflags
);
toku_brt_get_flags
(
db
->
i
->
brt
,
&
brtflags
);
if
(
brtflags
&
TOKU_DB_DUPSORT
)
{
if
(
brtflags
&
TOKU_DB_DUPSORT
)
{
DBC
*
dbc
;
DBC
*
dbc
;
r
=
db
->
cursor
(
db
,
txn
,
&
dbc
,
0
);
r
=
db
->
cursor
(
db
,
txn
,
&
dbc
,
0
);
if
(
r
==
0
)
{
if
(
r
==
0
)
{
r
=
dbc
->
c_get
(
dbc
,
key
,
data
,
DB_SET
);
r
=
dbc
->
c_get
(
dbc
,
key
,
s
data
,
DB_SET
);
dbc
->
c_close
(
dbc
);
dbc
->
c_close
(
dbc
);
}
}
}
else
}
else
r
=
toku_brt_lookup
(
db
->
i
->
brt
,
key
,
data
);
r
=
toku_brt_lookup
(
db
->
i
->
brt
,
key
,
sdata
);
if
(
r
!=
0
)
return
r
;
if
(
is_secondary
)
{
// Time to do a get on the primary
return
primary
->
get
(
primary
,
txn
,
&
primary_key
,
data
,
0
);
}
else
{
return
r
;
return
r
;
}
}
}
static
int
toku_db_key_range
(
DB
*
db
,
DB_TXN
*
txn
,
DBT
*
dbt
,
DB_KEY_RANGE
*
kr
,
u_int32_t
flags
)
{
static
int
toku_db_key_range
(
DB
*
db
,
DB_TXN
*
txn
,
DBT
*
dbt
,
DB_KEY_RANGE
*
kr
,
u_int32_t
flags
)
{
...
...
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