Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sqlite3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
node-sqlite3
Commits
67141f91
Commit
67141f91
authored
Feb 28, 2012
by
Konstantin Käfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't enforce SQLITE_OPEN_FULLMUTEX when mode is set
parent
a5fe5d0a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
database.cc
src/database.cc
+4
-2
No files found.
src/database.cc
View file @
67141f91
...
@@ -114,9 +114,11 @@ Handle<Value> Database::New(const Arguments& args) {
...
@@ -114,9 +114,11 @@ Handle<Value> Database::New(const Arguments& args) {
REQUIRE_ARGUMENT_STRING
(
0
,
filename
);
REQUIRE_ARGUMENT_STRING
(
0
,
filename
);
int
pos
=
1
;
int
pos
=
1
;
int
mode
=
SQLITE_OPEN_READWRITE
|
SQLITE_OPEN_CREATE
;
int
mode
;
if
(
args
.
Length
()
>=
pos
&&
args
[
pos
]
->
IsInt32
())
{
if
(
args
.
Length
()
>=
pos
&&
args
[
pos
]
->
IsInt32
())
{
mode
=
args
[
pos
++
]
->
Int32Value
();
mode
=
args
[
pos
++
]
->
Int32Value
();
}
else
{
mode
=
SQLITE_OPEN_READWRITE
|
SQLITE_OPEN_CREATE
|
SQLITE_OPEN_FULLMUTEX
;
}
}
Local
<
Function
>
callback
;
Local
<
Function
>
callback
;
...
@@ -131,7 +133,7 @@ Handle<Value> Database::New(const Arguments& args) {
...
@@ -131,7 +133,7 @@ Handle<Value> Database::New(const Arguments& args) {
args
.
This
()
->
Set
(
String
::
NewSymbol
(
"mode"
),
Integer
::
New
(
mode
),
ReadOnly
);
args
.
This
()
->
Set
(
String
::
NewSymbol
(
"mode"
),
Integer
::
New
(
mode
),
ReadOnly
);
// Start opening the database.
// Start opening the database.
OpenBaton
*
baton
=
new
OpenBaton
(
db
,
callback
,
*
filename
,
SQLITE_OPEN_FULLMUTEX
|
mode
);
OpenBaton
*
baton
=
new
OpenBaton
(
db
,
callback
,
*
filename
,
mode
);
EIO_BeginOpen
(
baton
);
EIO_BeginOpen
(
baton
);
return
args
.
This
();
return
args
.
This
();
...
...
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