Git Product home page Git Product logo

avatica's People

Contributors

amalts avatar f21 avatar kenshaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

avatica's Issues

UPSERT statement failing with "invalid memory address or nil pointer dereference"

rows, err := db.Query(upsert into us_population values('BA','San jose',3844829))
This code was failing due to nil pointer dereference. Stack trace given below.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1245246]

goroutine 1 [running]:
github.com/Boostport/avatica.newRows(0xc4200f81a0, 0x13, 0xc420100070, 0x1, 0x1, 0x1417d20)
        /workspace/go/src/github.com/Boostport/avatica/rows.go:145 +0x186
github.com/Boostport/avatica.(*conn).query(0xc4200f81a0, 0x1664070, 0xc420010270, 0x12f72a8, 0x39, 0x145ff50, 0x0, 0x0, 0x12418f0, 0x5, ...)
        /workspace/go/src/github.com/Boostport/avatica/connection.go:181 +0x242
github.com/Boostport/avatica.(*conn).QueryContext(0xc4200f81a0, 0x1418ae0, 0xc420010270, 0x12f72a8, 0x39, 0x145ff50, 0x0, 0x0, 0x2a01060, 0x104f520, ...)
        /workspace/go/src/github.com/Boostport/avatica/connection_go18.go:78 +0x1bd
database/sql.ctxDriverQuery(0x1418ae0, 0xc420010270, 0x2a01060, 0xc4200f81a0, 0x12f72a8, 0x39, 0x145ff50, 0x0, 0x0, 0x1028bce, ...)
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/ctxutil.go:48 +0x28d
database/sql.(*DB).queryConn.func1()
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1264 +0x99
database/sql.withLock(0x1415ea0, 0xc4201061c0, 0xc420057cf0)
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:2545 +0x65
database/sql.(*DB).queryConn(0xc4200de640, 0x1418ae0, 0xc420010270, 0xc4201061c0, 0xc4200fa160, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, ...)
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1265 +0x671
database/sql.(*DB).query(0xc4200de640, 0x1418ae0, 0xc420010270, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, 0x10b3801, 0xc420057ed0, ...)
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1250 +0x12f
database/sql.(*DB).QueryContext(0xc4200de640, 0x1418ae0, 0xc420010270, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, 0x8, 0x12e8348, ...)
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1227 +0xb8
database/sql.(*DB).Query(0xc4200de640, 0x12f72a8, 0x39, 0x0, 0x0, 0x0, 0x0, 0x145ff50, 0x0)
        /usr/local/Cellar/go/1.8.1/libexec/src/database/sql/sql.go:1241 +0x82
main.testLoad()```

Incorrect behavior of `LastInsertId`

Now LastInsertId returns int64(0) and error with message that propose to get last sequence value but not ID of element that inserted at last transaction.

gopkg.in/jcmturner/gokrb5.v1 dependency once again broken

For some reason, the maintainer of the gokrb5.v1/* packages has made breaking API changes again, just in the last 48 hours. I had thought that the change/move to the gopkg.in URL was a way of signalling API stability, but it appears that is not the case.

I would otherwise fix something like this myself, but do not at the moment have the time to dig through the kerberos package / API and figure out what changes in the avatica package are required. Opening an issue here in the hopes this can get fixed sometime soon, as I'm moving forward with a new usql release, and would ideally prefer to have it "go get"-able as well as using packaged dependencies.

try to upsert []byte value got error

when try to use db.Exec() to insert one row which value like [0 0 0 1], got an error "InvalidProtocolBufferException: Protocol message had invalid UTF-8.".
So how to store []byte?

Error during "go get"

Hi, just simple to fix error. Prevents building.

$ go get -u github.com/Boostport/avatica
# github.com/Boostport/avatica
./driver.go:55:28: multiple-value uuid.NewV4() in single-value context

uuid.NewV4() returns also error.

"index out of range" cause ExecuteResponse.Results were empty.

Got an error:

panic: runtime error: index out of range

goroutine 1 [running]:
github.com/Boostport/avatica.(*stmt).exec(0xc4201e80f0, 0x8f2ee0, 0xc4200160a0, 0xc4201e81e0, 0x2, 0x2, 0x0, 0x0, 0x709460, 0x738800)
        /home/yura/go/src/github.com/Boostport/avatica/statement.go:81 +0x2c3
github.com/Boostport/avatica.(*stmt).ExecContext(0xc4201e80f0, 0x8f2ee0, 0xc4200160a0, 0xc4201e8140, 0x2, 0x2, 0xc400000008, 0xc420399d00, 0x0, 0x4c8b06)
        /home/yura/go/src/github.com/Boostport/avatica/statement_go18.go:19 +0x117
database/sql.ctxDriverStmtExec(0x8f2ee0, 0xc4200160a0, 0x8f3120, 0xc4201e80f0, 0xc4201e8140, 0x2, 0x2, 0x2, 0x2, 0x0, ...)
        /snap/go/current/src/database/sql/ctxutil.go:66 +0x22e
database/sql.resultFromStatement(0x8f2ee0, 0xc4200160a0, 0x8f1960, 0xc420110120, 0xc420281b08, 0xc420281eb0, 0x2, 0x2, 0x0, 0x0, ...)
        /snap/go/current/src/database/sql/sql.go:2109 +0x184
database/sql.(*DB).execDC(0xc42008a960, 0x8f2ee0, 0xc4200160a0, 0xc420134070, 0xc420281c60, 0x77b0de, 0xd5, 0xc420281eb0, 0x2, 0x2, ...)
        /snap/go/current/src/database/sql/sql.go:1272 +0x2c7
database/sql.(*DB).exec(0xc42008a960, 0x8f2ee0, 0xc4200160a0, 0x77b0de, 0xd5, 0xc420281eb0, 0x2, 0x2, 0xc420016101, 0x6eb580, ...)

Looks like Results were empty in this row:

    // Currently there is only 1 ResultSet per response
    changed := int64(res.(*message.ExecuteResponse).Results[0].UpdateCount)                                                                                                                                                         

Sorry, I don't know how reliably reproduce it. I was copying large table to other table (using upsert into t2 select some from t1), and it happens at night. Probably it is due to whole cluster instability (other clients died with "cluster is out of memory" probably at same time).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.