You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is a bug in current version of github.com/SAP/go-hdb v1.1.5
It works with 1.1.3 but not 1.1.5.
I made an experiment that when we insert a lob data that length >= 8192, it will fail with message :"Repository Error: Executing Statement List, protocol error: invalid number of lob parameter ids 1"
I went through the code and they have a bug. LOBs that are < 8192 are sent in-line it looks like, only when you reach size 8192 does it generate a locator ID. At that point, it goes into a loop of all fields and if that field is a LOB, it expects it to have an ID, but we have 6 LOBs (1 size 8192, 5 size < 8192). So there is only 1 locator ID and when it gets to that next LOB field, it throws that error because it expects an ID to be present.
In 1.1.3 the code returned 6 locator IDs. So looks like they added logic to allow smaller lobs not to return locator IDs but forgot to fix the loop that looks for them.
File a bug with them and don't upgrade to 1.1.5 until it is fixed.
The issue is in connection.go:
func (c *conn) encodeLobs(cr *callResult, ids []p.LocatorID, inPrmFields []*p.ParameterField, nvargs []driver.NamedValue) error {
in this for loop:
for i, f := range inPrmFields {
If it makes it in there, it expects every Lob field to have a locator ID.
I think this is a bug in current version of github.com/SAP/go-hdb v1.1.5
It works with 1.1.3 but not 1.1.5.
I made an experiment that when we insert a lob data that length >= 8192, it will fail with message :"Repository Error: Executing Statement List, protocol error: invalid number of lob parameter ids 1"
The callstack is:
github.com/SAP/go-hdb/driver.(*conn).encodeLobs(0xc000478230, 0x0, {0xc0006d6f48, 0x1, 0x1}, {0xc0007a8000, 0x1c, 0x0?}, {0xc00007c000, 0x1c, ...})
/go/src/github.wdf.sap.corp/bdh/rms/vendor/github.com/SAP/go-hdb/driver/connection.go:1716 +0x43a
github.com/SAP/go-hdb/driver.(*conn)._execBatch(0xc000478230, 0xc0006edd00, {0xc00007c000, 0x1c, 0x1c}, 0x1c?, 0x0)
/go/src/github.wdf.sap.corp/bdh/rms/vendor/github.com/SAP/go-hdb/driver/connection.go:1346 +0x52f
github.com/SAP/go-hdb/driver.(*conn)._exec(0xc000478230, 0xc0006edd00, {0xc00007c000?, 0x1c, 0x1c}, 0x0?, 0x1586500?)
/go/src/github.wdf.sap.corp/bdh/rms/vendor/github.com/SAP/go-hdb/driver/connection.go:1297 +0x319
github.com/SAP/go-hdb/driver.(*stmt).exec(0xc00064e900, {0xc00007c000, 0x1c, 0x1c})
/go/src/github.wdf.sap.corp/bdh/rms/vendor/github.com/SAP/go-hdb/driver/connection.go:748 +0x43c
github.com/SAP/go-hdb/driver.(*stmt).ExecContext.func1()
/go/src/github.wdf.sap.corp/bdh/rms/vendor/github.com/SAP/go-hdb/driver/connection.go:703 +0x206
created by github.com/SAP/go-hdb/driver.(*stmt).ExecContext
/go/src/github.wdf.sap.corp/bdh/rms/vendor/github.com/SAP/go-hdb/driver/connection.go:699 +0x53a
Our developer debugged the code and found that:
I went through the code and they have a bug. LOBs that are < 8192 are sent in-line it looks like, only when you reach size 8192 does it generate a locator ID. At that point, it goes into a loop of all fields and if that field is a LOB, it expects it to have an ID, but we have 6 LOBs (1 size 8192, 5 size < 8192). So there is only 1 locator ID and when it gets to that next LOB field, it throws that error because it expects an ID to be present.
In 1.1.3 the code returned 6 locator IDs. So looks like they added logic to allow smaller lobs not to return locator IDs but forgot to fix the loop that looks for them.
File a bug with them and don't upgrade to 1.1.5 until it is fixed.
The issue is in connection.go:
func (c *conn) encodeLobs(cr *callResult, ids []p.LocatorID, inPrmFields []*p.ParameterField, nvargs []driver.NamedValue) error {
in this for loop:
If it makes it in there, it expects every Lob field to have a locator ID.
It seems to be an issue from perf changes in 1.1.4 31ceb2e#diff-5265516ccba5c11855cd41ea179d0bb050bab7d61b0b57509e180bf846edf13b
The text was updated successfully, but these errors were encountered: