File tree 3 files changed +1
-20
lines changed
3 files changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -943,7 +943,6 @@ type rowsCursor struct {
943
943
}
944
944
945
945
func (rc * rowsCursor ) touchMem () {
946
- rc .parentMem .touchMem ()
947
946
rc .line ++
948
947
}
949
948
Original file line number Diff line number Diff line change @@ -2491,12 +2491,6 @@ func (rs *Rows) nextLocked() (doClose, ok bool) {
2491
2491
if rs .lastcols == nil {
2492
2492
rs .lastcols = make ([]driver.Value , len (rs .rowsi .Columns ()))
2493
2493
}
2494
-
2495
- // Lock the driver connection before calling the driver interface
2496
- // rowsi to prevent a Tx from rolling back the connection at the same time.
2497
- rs .dc .Lock ()
2498
- defer rs .dc .Unlock ()
2499
-
2500
2494
rs .lasterr = rs .rowsi .Next (rs .lastcols )
2501
2495
if rs .lasterr != nil {
2502
2496
// Close the connection if there is a driver error.
@@ -2546,12 +2540,6 @@ func (rs *Rows) NextResultSet() bool {
2546
2540
doClose = true
2547
2541
return false
2548
2542
}
2549
-
2550
- // Lock the driver connection before calling the driver interface
2551
- // rowsi to prevent a Tx from rolling back the connection at the same time.
2552
- rs .dc .Lock ()
2553
- defer rs .dc .Unlock ()
2554
-
2555
2543
rs .lasterr = nextResultSet .NextResultSet ()
2556
2544
if rs .lasterr != nil {
2557
2545
doClose = true
Original file line number Diff line number Diff line change @@ -3127,9 +3127,6 @@ func TestIssue6081(t *testing.T) {
3127
3127
// In the test, a context is canceled while the query is in process so
3128
3128
// the internal rollback will run concurrently with the explicitly called
3129
3129
// Tx.Rollback.
3130
- //
3131
- // The addition of calling rows.Next also tests
3132
- // Issue 21117.
3133
3130
func TestIssue18429 (t * testing.T ) {
3134
3131
db := newTestDB (t , "people" )
3135
3132
defer closeDB (t , db )
@@ -3140,7 +3137,7 @@ func TestIssue18429(t *testing.T) {
3140
3137
3141
3138
const milliWait = 30
3142
3139
3143
- for i := 0 ; i < 1000 ; i ++ {
3140
+ for i := 0 ; i < 100 ; i ++ {
3144
3141
sem <- true
3145
3142
wg .Add (1 )
3146
3143
go func () {
@@ -3162,9 +3159,6 @@ func TestIssue18429(t *testing.T) {
3162
3159
// reported.
3163
3160
rows , _ := tx .QueryContext (ctx , "WAIT|" + qwait + "|SELECT|people|name|" )
3164
3161
if rows != nil {
3165
- // Call Next to test Issue 21117 and check for races.
3166
- for rows .Next () {
3167
- }
3168
3162
rows .Close ()
3169
3163
}
3170
3164
// This call will race with the context cancel rollback to complete
You can’t perform that action at this time.
0 commit comments