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
fe0c9b14
Commit
fe0c9b14
authored
Feb 05, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More mysql
parent
5a2f02f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
6 deletions
+29
-6
wb/lib/wb/src/wb_dbms.cpp
wb/lib/wb/src/wb_dbms.cpp
+18
-2
wb/lib/wb/src/wb_dbms.h
wb/lib/wb/src/wb_dbms.h
+2
-2
wb/lib/wb/src/wb_erep.cpp
wb/lib/wb/src/wb_erep.cpp
+6
-1
wb/lib/wb/src/wb_ldh.cpp
wb/lib/wb/src/wb_ldh.cpp
+3
-1
No files found.
wb/lib/wb/src/wb_dbms.cpp
View file @
fe0c9b14
/*
* Proview $Id: wb_dbms.cpp,v 1.
6 2008-02-04 13:34:49
claes Exp $
* Proview $Id: wb_dbms.cpp,v 1.
7 2008-02-05 14:53:12
claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -26,6 +26,7 @@
#include "pwr.h"
#include "pwr_class.h"
#include "co_dcli.h"
#include "co_syi.h"
#include "wb_ldh.h"
#include "wb_ldh_msg.h"
#include "wb_destination.h"
...
...
@@ -726,6 +727,21 @@ char *wb_dbms_env::dbName(void)
return
dbname
;
}
char
*
wb_dbms_env
::
host
(
void
)
{
char
nodename
[
80
];
pwr_tStatus
sts
;
static
char
host
[
80
];
syi_NodeName
(
&
sts
,
nodename
,
sizeof
(
nodename
));
if
(
ODD
(
sts
)
&&
cdh_NoCaseStrcmp
(
nodename
,
m_host
)
==
0
)
strcpy
(
host
,
"localhost"
);
else
strcpy
(
host
,
m_host
);
return
host
;
}
void
wb_dbms_env
::
port
(
const
unsigned
int
port
)
{
m_port
=
port
;
...
...
@@ -876,7 +892,7 @@ int wb_dbms_env::create()
return
errno
;
}
fprintf
(
fp
,
"HOST...: %s
\n
"
,
host
()
);
fprintf
(
fp
,
"HOST...: %s
\n
"
,
m_host
);
fprintf
(
fp
,
"USER...: %s
\n
"
,
user
());
if
(
!
passwd
()
||
strcmp
(
passwd
(),
""
)
==
0
)
fprintf
(
fp
,
"PASSWD.: (null)
\n
"
);
...
...
wb/lib/wb/src/wb_dbms.h
View file @
fe0c9b14
/*
* Proview $Id: wb_dbms.h,v 1.
2 2008-02-04 13:34:49
claes Exp $
* Proview $Id: wb_dbms.h,v 1.
3 2008-02-05 14:53:12
claes Exp $
* Copyright (C) 2007 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -176,7 +176,7 @@ public:
char
*
dbName
(
void
);
inline
char
*
fileName
(
void
)
{
return
m_fileName
;}
inline
char
*
host
(
void
)
{
return
m_host
;}
char
*
host
(
void
);
inline
char
*
user
(
void
)
{
return
m_user
;}
inline
char
*
passwd
(
void
)
{
return
m_passwd
;}
inline
unsigned
int
port
(
void
)
{
return
m_port
;}
...
...
wb/lib/wb/src/wb_erep.cpp
View file @
fe0c9b14
/*
* Proview $Id: wb_erep.cpp,v 1.5
4 2008-02-04 13:34:49
claes Exp $
* Proview $Id: wb_erep.cpp,v 1.5
5 2008-02-05 14:53:12
claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -773,11 +773,13 @@ void wb_erep::loadMeta( pwr_tStatus *status, char *db)
else
{
// Open db
if
(
nr
>=
5
&&
vol_array
[
4
][
0
]
==
'1'
)
{
#if defined PWRE_CONF_MYSQL
wb_vrepdbms
*
vrepdbms
=
new
wb_vrepdbms
(
this
,
vname
);
vrepdbms
->
name
(
vol_array
[
0
]);
addDb
(
&
sts
,
vrepdbms
);
MsgWindow
::
message
(
'I'
,
"Database opened"
,
vname
);
vol_cnt
++
;
#endif
}
else
{
wb_vrepdb
*
vrepdb
=
new
wb_vrepdb
(
this
,
vname
);
...
...
@@ -1084,6 +1086,7 @@ wb_vrep *wb_erep::createVolume(pwr_tStatus *sts, pwr_tVid vid, pwr_tCid cid,
return
0
;
}
#if defined PWRE_CONF_MYSQL
wb_dbms_env
*
env
=
new
wb_dbms_env
();
env
->
create
(
vname
,
host
,
user
,
password
,
cdh_Low
(
name
),
port
,
socket
);
...
...
@@ -1095,7 +1098,9 @@ wb_vrep *wb_erep::createVolume(pwr_tStatus *sts, pwr_tVid vid, pwr_tCid cid,
addDb
(
sts
,
vrepdbms
);
MsgWindow
::
message
(
'I'
,
"Database created"
,
vname
);
return
vrepdbms
;
#endif
}
return
0
;
}
...
...
wb/lib/wb/src/wb_ldh.cpp
View file @
fe0c9b14
/*
* Proview $Id: wb_ldh.cpp,v 1.6
6 2008-02-04 13:34:49
claes Exp $
* Proview $Id: wb_ldh.cpp,v 1.6
7 2008-02-05 14:53:12
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1989,6 +1989,7 @@ ldh_WbLoad( ldh_tSession session, char *loadfile, int ignore_oix)
erep
->
merep
()
->
copyFiles
(
db_name
);
}
else
{
#if defined PWRE_CONF_MYSQL
char
socket
[
80
];
char
user
[
80
];
char
password
[
80
];
...
...
@@ -2013,6 +2014,7 @@ ldh_WbLoad( ldh_tSession session, char *loadfile, int ignore_oix)
dbms
.
copy
(
*
vwbl
,
db_name
);
dbms
.
close
();
erep
->
merep
()
->
copyFiles
(
db_name
);
#endif
}
delete
vwbl
;
}
...
...
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