Skip to content

Commit bf0d7fa

Browse files
committed
1. Updating info to ensure the code looking at the updated prepared stmt
2. The driver should relly on No_metadata flag instead of Skip_metadata when handling RESULT/ROWS responses from C*
1 parent 2a5056d commit bf0d7fa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

conn.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,10 +1628,13 @@ func (c *Conn) executeQuery(ctx context.Context, qry *Query) *Iter {
16281628
response: x.meta,
16291629
},
16301630
}
1631-
c.session.stmtsLRU.add(stmtCacheKey, newInflight)
16321631
// The driver should close this done to avoid deadlocks of
16331632
// other subsequent requests
16341633
close(newInflight.done)
1634+
c.session.stmtsLRU.add(stmtCacheKey, newInflight)
1635+
// Updating info to ensure the code is looking at the updated
1636+
// version of the prepared statement
1637+
info = newInflight.preparedStatment
16351638
}
16361639
}
16371640

@@ -1641,7 +1644,7 @@ func (c *Conn) executeQuery(ctx context.Context, qry *Query) *Iter {
16411644
numRows: x.numRows,
16421645
}
16431646

1644-
if params.skipMeta && x.meta.noMetaData() {
1647+
if x.meta.noMetaData() {
16451648
if info != nil {
16461649
iter.meta = info.response
16471650
iter.meta.pagingState = copyBytes(x.meta.pagingState)

0 commit comments

Comments
 (0)