github / github/gh-ost

Regression in master: SET transaction_isolation = 'repeatable_read';

Open
#1,262 7 comments 7 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13.6k
Forks
1.4k
Avg merge
2h 31m
Merged PRs (30d)
4

Description

> This is the place to report a bug, ask a question, or suggest an enhancement.

In this PR https://github.com/github/gh-ost/commit/da3514253f5cd848c1cbcaad63ad794427ed1833

`GetDBUri()` will execute a statement such as the following:

```
set transaction_isolation = 'repeatable-read';
```

This variable was only [introduced in MySQL 5.7.20](https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_transaction_isolation), so if you are using an earlier version such as what Aurora 5.7 is, it will result in an error:

```
mysql> set transaction_isolation = 'repeatable-read';
ERROR 1193 (HY000): Unknown system variable 'transaction_isolation'
```

Instead the statement needs to be `set tx_isolation = 'repeatable-read'`, but this statement is not supported by MySQL 8.0. So some version-specific logic is probably required.

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.