(version string)
| 170 | } |
| 171 | |
| 172 | func parseVersion(version string) (string, error) { |
| 173 | // Examples: 8.0.11-TiDB-v8.5.0, 8.0.11-TiDB-v7.5.2-serverless. |
| 174 | if loc := regexp.MustCompile(`v\d+\.\d+\.\d+`).FindStringIndex(version); loc != nil { |
| 175 | return version[loc[0]:loc[1]], nil |
| 176 | } |
| 177 | return "", errors.Errorf("failed to parse version %q", version) |
| 178 | } |
| 179 | |
| 180 | func buildExecuteCommands(statement string) ([]base.Statement, error) { |
| 181 | if len(statement) > common.MaxSheetCheckSize { |