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
87a1636d
Commit
87a1636d
authored
Jan 11, 2010
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mysql classvolume databases
parent
0bf0dc63
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
284 additions
and
245 deletions
+284
-245
wb/changelog.txt
wb/changelog.txt
+2
-1
wb/lib/wb/gtk/wb_wtt_gtk.cpp
wb/lib/wb/gtk/wb_wtt_gtk.cpp
+1
-1
wb/lib/wb/src/wb_dbms.cpp
wb/lib/wb/src/wb_dbms.cpp
+20
-0
wb/lib/wb/src/wb_erep.cpp
wb/lib/wb/src/wb_erep.cpp
+235
-232
wb/lib/wb/src/wb_lfu.cpp
wb/lib/wb/src/wb_lfu.cpp
+8
-2
wb/lib/wb/src/wb_vrepced.cpp
wb/lib/wb/src/wb_vrepced.cpp
+1
-1
wb/lib/wb/src/wb_vrepdbms.cpp
wb/lib/wb/src/wb_vrepdbms.cpp
+17
-8
No files found.
wb/changelog.txt
View file @
87a1636d
...
...
@@ -150,4 +150,5 @@
091208 cs wb Default name for created objects in wtt fetched from name of previous sibling.
091209 cs wb ConnectAttribute method added to SevHist.
091218 cs wb Bugfix for next cix and next oix in ced.
091218 cs wb Bugfix in wb_vrepdb:child().
\ No newline at end of file
091218 cs wb Bugfix in wb_vrepdb:child().
100111 cs wb Mysql classvolume databases.
\ No newline at end of file
wb/lib/wb/gtk/wb_wtt_gtk.cpp
View file @
87a1636d
...
...
@@ -2765,7 +2765,7 @@ WttGtk::WttGtk(
wnavnode
->
volume_attached
(
wbctx
,
ldhses
,
0
);
}
if
(
wb_type
==
wb_eType_Directory
||
wb_type
==
wb_eType_Volume
)
{
if
(
(
wb_type
==
wb_eType_Directory
||
wb_type
==
wb_eType_Volume
)
&&
ldhses
)
{
// Start configuration wizard if volume is empty
pwr_tOid
oid
;
...
...
wb/lib/wb/src/wb_dbms.cpp
View file @
87a1636d
...
...
@@ -1501,6 +1501,15 @@ int wb_dbms_rbody::ins(wb_dbms_txn *txn)
return
m_db
->
m_t_rbody
->
ins
(
txn
,
&
m_key
,
&
m_data
);
}
int
wb_dbms_rbody
::
ins
(
wb_dbms_txn
*
txn
,
size_t
offset
,
size_t
size
,
void
*
p
)
{
m_data
.
bSize
(
size
);
m_data
.
size
(
size
);
m_data
.
data
(
p
);
return
m_db
->
m_t_rbody
->
ins
(
txn
,
&
m_key
,
&
m_data
);
}
int
wb_dbms_rbody
::
upd
(
wb_dbms_txn
*
txn
,
size_t
offset
,
size_t
size
,
void
*
p
)
{
m_data
.
size
(
sizeof
(
m_db
->
m_buf
));
...
...
@@ -1537,6 +1546,7 @@ int wb_dbms_rbody::get(wb_dbms_txn *txn, size_t offset, size_t size, void *p)
memcpy
(
p
,
m_db
->
m_buf
+
offset
,
size
);
m_size
=
m_data
.
size
();
return
0
;
}
...
...
@@ -1630,6 +1640,15 @@ int wb_dbms_dbody::ins(wb_dbms_txn *txn)
return
m_db
->
m_t_dbody
->
ins
(
txn
,
&
m_key
,
&
m_data
);
}
int
wb_dbms_dbody
::
ins
(
wb_dbms_txn
*
txn
,
size_t
offset
,
size_t
size
,
void
*
p
)
{
m_data
.
bSize
(
size
);
m_data
.
size
(
size
);
m_data
.
data
(
p
);
return
m_db
->
m_t_rbody
->
ins
(
txn
,
&
m_key
,
&
m_data
);
}
int
wb_dbms_dbody
::
upd
(
wb_dbms_txn
*
txn
,
size_t
offset
,
size_t
size
,
void
*
p
)
{
m_data
.
size
(
sizeof
(
m_db
->
m_buf
));
...
...
@@ -1663,6 +1682,7 @@ int wb_dbms_dbody::get(wb_dbms_txn *txn, size_t offset, size_t size, void *p)
printf
(
"*** dbody::get(offset %zd, size %zd, oix %d), size: %zd
\n
"
,
offset
,
size
,
m_oid
.
oix
,
m_data
.
size
());
memcpy
(
p
,
m_db
->
m_buf
+
offset
,
size
);
m_size
=
m_data
.
size
();
return
0
;
}
...
...
wb/lib/wb/src/wb_erep.cpp
View file @
87a1636d
This diff is collapsed.
Click to expand it.
wb/lib/wb/src/wb_lfu.cpp
View file @
87a1636d
...
...
@@ -886,8 +886,10 @@ pwr_tStatus lfu_SaveDirectoryVolume(
"Database"
,
(
char
**
)
&
dbenum
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
if
((
cdh_isClassVolumeClass
(
cid
)
&&
*
dbenum
==
2
)
||
(
!
cdh_isClassVolumeClass
(
cid
)
&&
*
dbenum
==
1
))
{
if
((
(
cid
==
pwr_cClass_ClassVolumeConfig
||
cid
==
pwr_cClass_DetachedClassVolumeConfig
)
&&
*
dbenum
==
2
)
||
(
!
(
cid
==
pwr_cClass_ClassVolumeConfig
||
cid
==
pwr_cClass_DetachedClassVolumeConfig
)
&&
*
dbenum
==
1
))
{
sts
=
ldh_GetObjectPar
(
ldhses
,
envobjid
,
"RtBody"
,
"Server"
,
(
char
**
)
&
server
,
&
size
);
if
(
EVEN
(
sts
))
return
sts
;
...
...
@@ -2635,6 +2637,8 @@ pwr_tStatus lfu_GetVolumeCnf( char *name, pwr_tVid *vid, pwr_tCid *cid, ldh_eVol
*
volrep
=
ldh_eVolRep_Dbms
;
if
(
nr
>
5
)
strcpy
(
server
,
vol_array
[
5
]);
else
strcpy
(
server
,
""
);
}
}
break
;
...
...
@@ -2648,6 +2652,8 @@ pwr_tStatus lfu_GetVolumeCnf( char *name, pwr_tVid *vid, pwr_tCid *cid, ldh_eVol
*
volrep
=
ldh_eVolRep_Dbms
;
if
(
nr
>
5
)
strcpy
(
server
,
vol_array
[
5
]);
else
strcpy
(
server
,
""
);
}
}
break
;
...
...
wb/lib/wb/src/wb_vrepced.cpp
View file @
87a1636d
...
...
@@ -2558,7 +2558,7 @@ void wb_vrepced::printStructFile( bool hpp)
if
(
!
body_found
)
{
fp
<<
"#ifndef pwr_cClass_"
<<
pgmname
<<
endl
<<
"#define pwr_cClass_"
<<
pgmname
<<
" "
<<
o_cdef
->
cid
(
)
<<
"UL"
<<
endl
<<
endl
;
"#define pwr_cClass_"
<<
pgmname
<<
" "
<<
cdh_ClassObjidToId
(
o_cdef
->
oid
()
)
<<
"UL"
<<
endl
<<
endl
;
body_found
=
true
;
}
...
...
wb/lib/wb/src/wb_vrepdbms.cpp
View file @
87a1636d
...
...
@@ -300,7 +300,7 @@ wb_orep* wb_vrepdbms::object(pwr_tStatus *sts, pwr_tOid oid)
}
catch
(
wb_dbms_error
&
e
)
{
*
sts
=
LDH__NOSUCHOBJ
;
printf
(
"vrepdbms: %s
\n
"
,
e
.
what
().
c_str
());
//
printf("vrepdbms: %s\n", e.what().c_str());
return
0
;
}
}
...
...
@@ -329,7 +329,7 @@ wb_orep* wb_vrepdbms::object(pwr_tStatus *sts, wb_name &name)
}
catch
(
wb_dbms_error
&
e
)
{
*
sts
=
LDH__NOSUCHOBJ
;
printf
(
"vrepdbms: %s
\n
"
,
e
.
what
().
c_str
());
//
printf("vrepdbms: %s\n", e.what().c_str());
return
0
;
}
}
...
...
@@ -344,7 +344,7 @@ wb_orep* wb_vrepdbms::object(pwr_tStatus *sts, const wb_orep *parent, wb_name &n
}
catch
(
wb_dbms_error
&
e
)
{
*
sts
=
LDH__NOSUCHOBJ
;
printf
(
"vrepdbms: %s
\n
"
,
e
.
what
().
c_str
());
//
printf("vrepdbms: %s\n", e.what().c_str());
return
0
;
}
}
...
...
@@ -706,7 +706,6 @@ bool wb_vrepdbms::renameObject(pwr_tStatus *sts, wb_orep *orp, wb_name &name)
n
.
name
(
name
);
rc
=
n
.
ins
(
txn
);
if
(
rc
)
{
printf
(
"wb_vrepdbms::renameObject, n.ins rc %d
\n
"
,
rc
);
*
sts
=
LDH__NAMALREXI
;
txn
->
abort
();
m_ohead
.
clear
();
...
...
@@ -721,9 +720,9 @@ bool wb_vrepdbms::renameObject(pwr_tStatus *sts, wb_orep *orp, wb_name &name)
}
catch
(
wb_dbms_error
&
e
)
{
txn
->
subAbort
();
printf
(
"wb_vrepdbms::renameObject, exception %s
\n
"
,
e
.
what
().
c_str
());
//
printf("wb_vrepdbms::renameObject, exception %s\n", e.what().c_str());
m_ohead
.
clear
();
*
sts
=
LDH__
DBERROR
;
*
sts
=
LDH__
NAMALREXI
;
return
false
;
}
}
...
...
@@ -2239,7 +2238,12 @@ wb_vrepdbms::updateObject(pwr_tOid oid, pwr_tCid cid)
time_GetTime
(
&
time
);
if
(
rbody
)
{
rc
=
rb
.
upd
(
m_db
->
m_txn
,
0
,
rsize
,
rbody
);
if
(
rsize
!=
rb
.
m_size
)
{
rc
=
rb
.
del
(
m_db
->
m_txn
);
rc
=
rb
.
ins
(
m_db
->
m_txn
,
0
,
rsize
,
rbody
);
}
else
rc
=
rb
.
upd
(
m_db
->
m_txn
,
0
,
rsize
,
rbody
);
if
(
rc
)
printf
(
"wb_vrepdbms:writeBody rb.upd rc %d
\n
"
,
rc
);
rc
=
0
;
...
...
@@ -2249,7 +2253,12 @@ wb_vrepdbms::updateObject(pwr_tOid oid, pwr_tCid cid)
}
if
(
dbody
)
{
rc
=
db
.
upd
(
m_db
->
m_txn
,
0
,
dsize
,
dbody
);
if
(
dsize
!=
db
.
m_size
)
{
rc
=
db
.
del
(
m_db
->
m_txn
);
rc
=
db
.
ins
(
m_db
->
m_txn
,
0
,
dsize
,
dbody
);
}
else
rc
=
db
.
upd
(
m_db
->
m_txn
,
0
,
dsize
,
dbody
);
if
(
rc
)
printf
(
"wb_vrepdbms:writeBody db.upd rc %d
\n
"
,
rc
);
free
(
dbody
);
...
...
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