summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/go-sql-driver/mysql/buffer.go
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@users.noreply.github.com>2018-07-03 17:58:31 -0400
committerGitHub <noreply@github.com>2018-07-03 17:58:31 -0400
commit9d4c1ddfa14d33ce3b78c02421fb76a93e5ca2d6 (patch)
tree38bf02080870094295b66d23de138c162aa6de3c /vendor/github.com/go-sql-driver/mysql/buffer.go
parent280ebcbf7c761a212fb091634384847a38f25cb0 (diff)
downloadgitea-9d4c1ddfa14d33ce3b78c02421fb76a93e5ca2d6.tar.gz
gitea-9d4c1ddfa14d33ce3b78c02421fb76a93e5ca2d6.zip
Dep upgrade mysql lib (#4161)
* update gopkg file to add sql dep
Diffstat (limited to 'vendor/github.com/go-sql-driver/mysql/buffer.go')
-rw-r--r--vendor/github.com/go-sql-driver/mysql/buffer.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/go-sql-driver/mysql/buffer.go b/vendor/github.com/go-sql-driver/mysql/buffer.go
index 2001feacd3..eb4748bf44 100644
--- a/vendor/github.com/go-sql-driver/mysql/buffer.go
+++ b/vendor/github.com/go-sql-driver/mysql/buffer.go
@@ -130,18 +130,18 @@ func (b *buffer) takeBuffer(length int) []byte {
// smaller than defaultBufSize
// Only one buffer (total) can be used at a time.
func (b *buffer) takeSmallBuffer(length int) []byte {
- if b.length == 0 {
- return b.buf[:length]
+ if b.length > 0 {
+ return nil
}
- return nil
+ return b.buf[:length]
}
// takeCompleteBuffer returns the complete existing buffer.
// This can be used if the necessary buffer size is unknown.
// Only one buffer (total) can be used at a time.
func (b *buffer) takeCompleteBuffer() []byte {
- if b.length == 0 {
- return b.buf
+ if b.length > 0 {
+ return nil
}
- return nil
+ return b.buf
}