Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
Esteban Blanc
proview
Commits
c0c64254
Commit
c0c64254
authored
Jun 17, 2004
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mode of db changed to rw for group and user
parent
0bbdfe8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
wb/lib/wb/src/wb_db.cpp
wb/lib/wb/src/wb_db.cpp
+11
-11
No files found.
wb/lib/wb/src/wb_db.cpp
View file @
c0c64254
...
@@ -902,9 +902,9 @@ void wb_db::openDb(bool useTxn)
...
@@ -902,9 +902,9 @@ void wb_db::openDb(bool useTxn)
int
rc
;
int
rc
;
//DbTxn *txn = 0;
//DbTxn *txn = 0;
/* Create the directory, read/write/access owner
only
. */
/* Create the directory, read/write/access owner
and group
. */
if
(
stat
(
m_fileName
,
&
sb
)
!=
0
)
{
if
(
stat
(
m_fileName
,
&
sb
)
!=
0
)
{
if
(
mkdir
(
m_fileName
,
S_IRWXU
)
!=
0
)
{
if
(
mkdir
(
m_fileName
,
S_IRWXU
|
S_IRWXG
)
!=
0
)
{
fprintf
(
stderr
,
"txnapp: mkdir: %s, %s
\n
"
,
m_fileName
,
strerror
(
errno
));
fprintf
(
stderr
,
"txnapp: mkdir: %s, %s
\n
"
,
m_fileName
,
strerror
(
errno
));
//exit(1);
//exit(1);
}
}
...
@@ -932,11 +932,11 @@ void wb_db::openDb(bool useTxn)
...
@@ -932,11 +932,11 @@ void wb_db::openDb(bool useTxn)
if
(
useTxn
)
{
if
(
useTxn
)
{
m_env
->
open
(
m_fileName
,
m_env
->
open
(
m_fileName
,
DB_CREATE
|
DB_INIT_LOCK
|
DB_INIT_LOG
|
DB_INIT_MPOOL
|
DB_INIT_TXN
|
DB_RECOVER
,
DB_CREATE
|
DB_INIT_LOCK
|
DB_INIT_LOG
|
DB_INIT_MPOOL
|
DB_INIT_TXN
|
DB_RECOVER
,
S_IRUSR
|
S_IWUSR
);
0
/* S_IRUSR | S_IWUSR */
);
}
else
{
}
else
{
m_env
->
open
(
m_fileName
,
m_env
->
open
(
m_fileName
,
DB_CREATE
|
DB_INIT_MPOOL
|
DB_PRIVATE
,
DB_CREATE
|
DB_INIT_MPOOL
|
DB_PRIVATE
,
S_IRUSR
|
S_IWUSR
);
0
/*S_IRUSR | S_IWUSR */
);
}
}
}
catch
(
DbException
&
e
)
{
}
catch
(
DbException
&
e
)
{
printf
(
"m_env->open, %s
\n
"
,
e
.
what
());
printf
(
"m_env->open, %s
\n
"
,
e
.
what
());
...
@@ -950,13 +950,13 @@ void wb_db::openDb(bool useTxn)
...
@@ -950,13 +950,13 @@ void wb_db::openDb(bool useTxn)
m_t_name
=
new
Db
(
m_env
,
0
);
m_t_name
=
new
Db
(
m_env
,
0
);
m_t_info
=
new
Db
(
m_env
,
0
);
m_t_info
=
new
Db
(
m_env
,
0
);
m_t_ohead
->
open
(
"ohead"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
S_IRUSR
|
S_IWUSR
);
m_t_ohead
->
open
(
"ohead"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_rbody
->
open
(
"rbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
S_IRUSR
|
S_IWUSR
);
m_t_rbody
->
open
(
"rbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_dbody
->
open
(
"dbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
S_IRUSR
|
S_IWUSR
);
m_t_dbody
->
open
(
"dbody"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
// m_t_dbody->open(NULL, "dbody", NULL, DB_BTREE, DB_CREATE | DB_AUTO_COMMIT, S_IRUSR | S_IWUSR
);
// m_t_dbody->open(NULL, "dbody", NULL, DB_BTREE, DB_CREATE | DB_AUTO_COMMIT, 0 /* S_IRUSR | S_IWUSR */
);
m_t_class
->
open
(
"class"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
S_IRUSR
|
S_IWUSR
);
m_t_class
->
open
(
"class"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_name
->
open
(
"name"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
S_IRUSR
|
S_IWUSR
);
m_t_name
->
open
(
"name"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
m_t_info
->
open
(
"info"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
S_IRUSR
|
S_IWUSR
);
m_t_info
->
open
(
"info"
,
NULL
,
DB_BTREE
,
DB_CREATE
,
0
/* S_IRUSR | S_IWUSR */
);
printstat
(
m_env
,
"after open databases"
);
printstat
(
m_env
,
"after open databases"
);
}
}
...
...
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