@@ -61,7 +61,7 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
61
61
var prepareSequence uint8
62
62
var prepareCompressSequence uint8
63
63
64
- if mc .clientExtCapabilities & clientStmtBulkOperations != 0 {
64
+ if mc .clientExtCapabilities & clientStmtBulkOperations != 0 && stmt . id == 0xffffffff {
65
65
// Send command
66
66
err := mc .writeCommandPacketStr (comStmtPrepare , stmt .initialQuery )
67
67
if err != nil {
@@ -78,7 +78,7 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
78
78
return nil , stmt .mc .markBadConn (err )
79
79
}
80
80
81
- if stmt .mc .clientExtCapabilities & clientStmtBulkOperations != 0 {
81
+ if stmt .mc .clientExtCapabilities & clientStmtBulkOperations != 0 && stmt . id == 0xffffffff {
82
82
// Read Prepare Result
83
83
var executeSequence uint8
84
84
var executeCompressSequence uint8
@@ -141,7 +141,7 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
141
141
var prepareSequence uint8
142
142
var prepareCompressSequence uint8
143
143
144
- if mc .clientExtCapabilities & clientStmtBulkOperations != 0 {
144
+ if mc .clientExtCapabilities & clientStmtBulkOperations != 0 && stmt . id == 0xffffffff {
145
145
// Send command
146
146
err := mc .writeCommandPacketStr (comStmtPrepare , stmt .initialQuery )
147
147
if err != nil {
@@ -157,7 +157,7 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
157
157
return nil , stmt .mc .markBadConn (err )
158
158
}
159
159
160
- if stmt .mc .clientExtCapabilities & clientStmtBulkOperations != 0 {
160
+ if stmt .mc .clientExtCapabilities & clientStmtBulkOperations != 0 && stmt . id == 0xffffffff {
161
161
// Read Prepare Result
162
162
var executeSequence uint8
163
163
var executeCompressSequence uint8
0 commit comments