Skip to content

Commit 9d5efbf

Browse files
committed
correcting pipeline
1 parent 1c41925 commit 9d5efbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

statement.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
6161
var prepareSequence uint8
6262
var prepareCompressSequence uint8
6363

64-
if mc.clientExtCapabilities&clientStmtBulkOperations != 0 {
64+
if mc.clientExtCapabilities&clientStmtBulkOperations != 0 && stmt.id == 0xffffffff {
6565
// Send command
6666
err := mc.writeCommandPacketStr(comStmtPrepare, stmt.initialQuery)
6767
if err != nil {
@@ -78,7 +78,7 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
7878
return nil, stmt.mc.markBadConn(err)
7979
}
8080

81-
if stmt.mc.clientExtCapabilities&clientStmtBulkOperations != 0 {
81+
if stmt.mc.clientExtCapabilities&clientStmtBulkOperations != 0 && stmt.id == 0xffffffff {
8282
// Read Prepare Result
8383
var executeSequence uint8
8484
var executeCompressSequence uint8
@@ -141,7 +141,7 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
141141
var prepareSequence uint8
142142
var prepareCompressSequence uint8
143143

144-
if mc.clientExtCapabilities&clientStmtBulkOperations != 0 {
144+
if mc.clientExtCapabilities&clientStmtBulkOperations != 0 && stmt.id == 0xffffffff {
145145
// Send command
146146
err := mc.writeCommandPacketStr(comStmtPrepare, stmt.initialQuery)
147147
if err != nil {
@@ -157,7 +157,7 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
157157
return nil, stmt.mc.markBadConn(err)
158158
}
159159

160-
if stmt.mc.clientExtCapabilities&clientStmtBulkOperations != 0 {
160+
if stmt.mc.clientExtCapabilities&clientStmtBulkOperations != 0 && stmt.id == 0xffffffff {
161161
// Read Prepare Result
162162
var executeSequence uint8
163163
var executeCompressSequence uint8

0 commit comments

Comments
 (0)