aboutsummaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-09-18 15:38:46 +0100
committerGitHub <noreply@github.com>2020-09-18 17:38:46 +0300
commit54ae4485881664715d615037f1ab48d50044b0a0 (patch)
tree685b1d8eb644b8f3c01324fce3e7cdb63bd27283 /vendor
parent7250f5342f9e48221180c8438d7049097b6e6dfa (diff)
downloadgitea-54ae4485881664715d615037f1ab48d50044b0a0.tar.gz
gitea-54ae4485881664715d615037f1ab48d50044b0a0.zip
Switch to absolute latest pq driver (#12859)
This PR updates the lib/pq driver to the current master head to pick up the deadlock fix in lib/pq#993 Hopefully this will resolve our CI issues. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/lib/pq/.travis.yml2
-rw-r--r--vendor/github.com/lib/pq/README.md5
-rw-r--r--vendor/github.com/lib/pq/conn.go8
-rw-r--r--vendor/github.com/lib/pq/connector.go2
-rw-r--r--vendor/github.com/lib/pq/copy.go25
-rw-r--r--vendor/github.com/lib/pq/doc.go9
-rw-r--r--vendor/modules.txt2
7 files changed, 40 insertions, 13 deletions
diff --git a/vendor/github.com/lib/pq/.travis.yml b/vendor/github.com/lib/pq/.travis.yml
index 3498c53dcd..68e89e88da 100644
--- a/vendor/github.com/lib/pq/.travis.yml
+++ b/vendor/github.com/lib/pq/.travis.yml
@@ -3,6 +3,7 @@ language: go
go:
- 1.13.x
- 1.14.x
+ - 1.15.x
- master
sudo: true
@@ -13,6 +14,7 @@ env:
- PQGOSSLTESTS=1
- PQSSLCERTTEST_PATH=$PWD/certs
- PGHOST=127.0.0.1
+ - GODEBUG=x509ignoreCN=0
matrix:
- PGVERSION=10
- PGVERSION=9.6
diff --git a/vendor/github.com/lib/pq/README.md b/vendor/github.com/lib/pq/README.md
index ecd01939b5..c972a86a57 100644
--- a/vendor/github.com/lib/pq/README.md
+++ b/vendor/github.com/lib/pq/README.md
@@ -19,10 +19,7 @@
* Unix socket support
* Notifications: `LISTEN`/`NOTIFY`
* pgpass support
-
-## Optional Features
-
-* GSS (Kerberos) auth (to use, see GoDoc)
+* GSS (Kerberos) auth
## Tests
diff --git a/vendor/github.com/lib/pq/conn.go b/vendor/github.com/lib/pq/conn.go
index b3ab14d3cc..f313c14986 100644
--- a/vendor/github.com/lib/pq/conn.go
+++ b/vendor/github.com/lib/pq/conn.go
@@ -1074,9 +1074,9 @@ func isDriverSetting(key string) bool {
return true
case "binary_parameters":
return true
- case "service":
+ case "krbsrvname":
return true
- case "spn":
+ case "krbspn":
return true
default:
return false
@@ -1168,13 +1168,13 @@ func (cn *conn) auth(r *readBuf, o values) {
var token []byte
- if spn, ok := o["spn"]; ok {
+ if spn, ok := o["krbspn"]; ok {
// Use the supplied SPN if provided..
token, err = cli.GetInitTokenFromSpn(spn)
} else {
// Allow the kerberos service name to be overridden
service := "postgres"
- if val, ok := o["service"]; ok {
+ if val, ok := o["krbsrvname"]; ok {
service = val
}
diff --git a/vendor/github.com/lib/pq/connector.go b/vendor/github.com/lib/pq/connector.go
index 6a0ee7fc12..d7d4726156 100644
--- a/vendor/github.com/lib/pq/connector.go
+++ b/vendor/github.com/lib/pq/connector.go
@@ -27,7 +27,7 @@ func (c *Connector) Connect(ctx context.Context) (driver.Conn, error) {
return c.open(ctx)
}
-// Driver returnst the underlying driver of this Connector.
+// Driver returns the underlying driver of this Connector.
func (c *Connector) Driver() driver.Driver {
return &Driver{}
}
diff --git a/vendor/github.com/lib/pq/copy.go b/vendor/github.com/lib/pq/copy.go
index d3bc1edd86..9d4f850c3e 100644
--- a/vendor/github.com/lib/pq/copy.go
+++ b/vendor/github.com/lib/pq/copy.go
@@ -49,6 +49,7 @@ type copyin struct {
buffer []byte
rowData chan []byte
done chan bool
+ driver.Result
closed bool
@@ -151,6 +152,8 @@ func (ci *copyin) resploop() {
switch t {
case 'C':
// complete
+ res, _ := ci.cn.parseComplete(r.string())
+ ci.setResult(res)
case 'N':
if n := ci.cn.noticeHandler; n != nil {
n(parseError(&r))
@@ -201,6 +204,22 @@ func (ci *copyin) setError(err error) {
ci.Unlock()
}
+func (ci *copyin) setResult(result driver.Result) {
+ ci.Lock()
+ ci.Result = result
+ ci.Unlock()
+}
+
+func (ci *copyin) getResult() driver.Result {
+ ci.Lock()
+ result := ci.Result
+ ci.Unlock()
+ if result == nil {
+ return driver.RowsAffected(0)
+ }
+ return result
+}
+
func (ci *copyin) NumInput() int {
return -1
}
@@ -231,7 +250,11 @@ func (ci *copyin) Exec(v []driver.Value) (r driver.Result, err error) {
}
if len(v) == 0 {
- return driver.RowsAffected(0), ci.Close()
+ if err := ci.Close(); err != nil {
+ return driver.RowsAffected(0), err
+ }
+
+ return ci.getResult(), nil
}
numValues := len(v)
diff --git a/vendor/github.com/lib/pq/doc.go b/vendor/github.com/lib/pq/doc.go
index 78c670b1d9..b57184801b 100644
--- a/vendor/github.com/lib/pq/doc.go
+++ b/vendor/github.com/lib/pq/doc.go
@@ -57,8 +57,6 @@ supported:
* sslkey - Key file location. The file must contain PEM encoded data.
* sslrootcert - The location of the root certificate file. The file
must contain PEM encoded data.
- * spn - Configures GSS (Kerberos) SPN.
- * service - GSS (Kerberos) service name to use when constructing the SPN (default is `postgres`).
Valid values for sslmode are:
@@ -259,5 +257,12 @@ package:
This package is in a separate module so that users who don't need Kerberos
don't have to download unnecessary dependencies.
+When imported, additional connection string parameters are supported:
+
+ * krbsrvname - GSS (Kerberos) service name when constructing the
+ SPN (default is `postgres`). This will be combined with the host
+ to form the full SPN: `krbsrvname/host`.
+ * krbspn - GSS (Kerberos) SPN. This takes priority over
+ `krbsrvname` if present.
*/
package pq
diff --git a/vendor/modules.txt b/vendor/modules.txt
index e2d90d343d..9e22db49d9 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -502,7 +502,7 @@ github.com/kr/text
## explicit
github.com/lafriks/xormstore
github.com/lafriks/xormstore/util
-# github.com/lib/pq v1.7.0
+# github.com/lib/pq v1.8.1-0.20200908161135-083382b7e6fc
## explicit
github.com/lib/pq
github.com/lib/pq/oid