Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
ee62da3f
Commit
ee62da3f
authored
7 years ago
by
Stephen R. van den Berg
Browse files
Options
Downloads
Patches
Plain Diff
pgsql: Suppress errors if the server gets lost.
parent
08505c02
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/modules/Sql.pmod/pgsql.pike
+7
-5
7 additions, 5 deletions
lib/modules/Sql.pmod/pgsql.pike
lib/modules/Sql.pmod/pgsql_util.pmod
+1
-1
1 addition, 1 deletion
lib/modules/Sql.pmod/pgsql_util.pmod
with
8 additions
and
6 deletions
lib/modules/Sql.pmod/pgsql.pike
+
7
−
5
View file @
ee62da3f
...
@@ -5,8 +5,8 @@
...
@@ -5,8 +5,8 @@
//! This is an interface to the PostgreSQL database
//! This is an interface to the PostgreSQL database
//! server. This module is independent of any external libraries.
//! server. This module is independent of any external libraries.
//! Note that you @b{do not@} need to have a
//! Note that you @b{do not@} need to have a
//! PostgreSQL server running on your host to use this module: you can
//! PostgreSQL server running on
@b{
your
@}
host to use this module: you can
//! connect to the database over a TCP/IP socket.
//! connect to the database over a TCP/IP socket
on a different host
.
//!
//!
//! This module replaces the functionality of the older @[Sql.postgres]
//! This module replaces the functionality of the older @[Sql.postgres]
//! and @[Postgres.postgres] modules.
//! and @[Postgres.postgres] modules.
...
@@ -1193,9 +1193,11 @@ private void procmessage() {
...
@@ -1193,9 +1193,11 @@ private void procmessage() {
}
}
}; // We only get here if there is an error
}; // We only get here if there is an error
if(err==MAGICTERMINATE) { // Announce connection termination to server
if(err==MAGICTERMINATE) { // Announce connection termination to server
catch {
object cs = ci->start();
object cs = ci->start();
CHAIN(cs)->add("X\0\0\0\4");
CHAIN(cs)->add("X\0\0\0\4");
cs->sendcmd(SENDOUT);
cs->sendcmd(SENDOUT);
};
terminating=1;
terminating=1;
err=0;
err=0;
} else if(stringp(err)) {
} else if(stringp(err)) {
...
...
This diff is collapsed.
Click to expand it.
lib/modules/Sql.pmod/pgsql_util.pmod
+
1
−
1
View file @
ee62da3f
...
@@ -200,7 +200,7 @@ class bufcon {
...
@@ -200,7 +200,7 @@ class bufcon {
if (mode == SYNCSEND) {
if (mode == SYNCSEND) {
add(PGSYNC);
add(PGSYNC);
realbuffer->stashqueue->write(1);
realbuffer->stashqueue->write(1);
mode = SENDOUT;
mode = SENDOUT;
// Demote it to prevent an extra SYNC upon stashflush
}
}
}
}
realbuffer->stash->add(this);
realbuffer->stash->add(this);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment