Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
0eb012ac
Commit
0eb012ac
authored
May 19, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправил ошибки в DBInterface
parent
ccbdc8a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
libuniset.spec
conf/libuniset.spec
+5
-1
DBInterface.cc
extensions/DBServer-MySQL/DBInterface.cc
+5
-5
No files found.
conf/libuniset.spec
View file @
0eb012ac
...
...
@@ -3,7 +3,7 @@
Name: libuniset
Version: 1.0
Release: alt3
1
Release: alt3
2
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
...
...
@@ -207,6 +207,10 @@ rm -f %buildroot%_libdir/*.la
%changelog
* Thu May 19 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt32
- fixed bug in DBInterface::nextRow function
- fixed bug in DBInterface::ping
* Fri May 13 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt31
- move DBServer-MySQL to extensions directory
- add pc-file for libUniSet-mysql
...
...
extensions/DBServer-MySQL/DBInterface.cc
View file @
0eb012ac
...
...
@@ -33,6 +33,9 @@ lastQ(""),
queryok
(
false
)
{
mysql
=
new
MYSQL
();
mysql_init
(
mysql
);
// mysql_options(mysql,MYSQL_READ_DEFAULT_GROUP,"your_prog_name");
mysql_options
(
mysql
,
MYSQL_OPT_COMPRESS
,
0
);
}
DBInterface
::~
DBInterface
()
...
...
@@ -44,10 +47,6 @@ DBInterface::~DBInterface()
// -----------------------------------------------------------------------------------------
bool
DBInterface
::
connect
(
const
string
host
,
const
string
user
,
const
string
pswd
,
const
string
dbname
)
{
mysql_init
(
mysql
);
// mysql_options(mysql,MYSQL_READ_DEFAULT_GROUP,"your_prog_name");
mysql_options
(
mysql
,
MYSQL_OPT_COMPRESS
,
0
);
if
(
!
mysql_real_connect
(
mysql
,
host
.
c_str
(),
user
.
c_str
(),
pswd
.
c_str
(),
dbname
.
c_str
(),
0
,
NULL
,
0
))
{
cout
<<
error
()
<<
endl
;
...
...
@@ -108,7 +107,8 @@ bool DBInterface::nextRecord()
if
(
!
mysql
||
!
result
||
!
queryok
)
return
false
;
if
(
Row
==
mysql_fetch_row
(
result
)
)
Row
=
mysql_fetch_row
(
result
);
if
(
Row
)
return
true
;
return
false
;
...
...
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