pingcap / pingcap/tidb

Slow log shows success for the query that doesn't send all the rows

Open
#58,638 1 comment 0 reactions 1 assignee Claimed by @YangKeao View on GitHub
severity/moderate sig/sql-infra type/bug
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Bug Report

Please answer these questions before submitting your issue. Thanks!

### 1. Minimal reproduce step (Required)

```java
stmt.setFetchSize(Integer.MIN_VALUE);

rs = stmt.executeQuery("SELECT * FROM t_order ORDER BY name DESC");
String sql="";
while(rs.next()) {
sql = rs.getString(1);
System.out.println("sql="+sql);
Thread.sleep(200);
}
...
```

After some time, terminate the client.

### 2. What did you expect to see? (Required)

Slow log shows `succeed: false`.

### 3. What did you see instead (Required)

TiDB log shows `command dispatch failed, err="connection was bad"`, while slow log shows `succeed: true`.

### 4. What is your TiDB version? (Required)

master

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.