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
7ae75677
Commit
7ae75677
authored
Jan 09, 2013
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(SQLite): добавил использование sqlite3_busy_timeout();
parent
3c0ad48e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
SQLiteInterface.cc
extensions/DBServer-SQLite/SQLiteInterface.cc
+8
-0
create_db.sh
extensions/DBServer-SQLite/create_db.sh
+3
-0
No files found.
extensions/DBServer-SQLite/SQLiteInterface.cc
View file @
7ae75677
...
...
@@ -74,6 +74,7 @@ bool SQLiteInterface::connect( const string dbfile, bool create )
return
false
;
}
setOperationTimeout
(
opTimeout
);
connected
=
true
;
return
true
;
}
...
...
@@ -89,6 +90,13 @@ bool SQLiteInterface::close()
return
true
;
}
// -----------------------------------------------------------------------------------------
void
SQLiteInterface
::
setOperationTimeout
(
timeout_t
msec
)
{
opTimeout
=
msec
;
if
(
db
)
sqlite3_busy_timeout
(
db
,
opTimeout
);
}
// -----------------------------------------------------------------------------------------
bool
SQLiteInterface
::
insert
(
const
string
q
)
{
if
(
!
db
)
...
...
extensions/DBServer-SQLite/create_db.sh
View file @
7ae75677
...
...
@@ -5,6 +5,9 @@ dbname=test.db
[
-n
"
$1
"
]
&&
dbname
=
"
$1
"
sqlite3
$dbname
<<
"_EOF_"
PRAGMA
foreign_keys
=
ON
;
DROP TABLE IF EXISTS main_history
;
CREATE TABLE main_history
(
id
INTEGER PRIMARY KEY AUTOINCREMENT,
...
...
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