Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql8.0.2+ -exact-rowcount bug #961

Closed
Fanduzi opened this issue Apr 29, 2021 · 1 comment · Fixed by Fanduzi/gh-ost#1 or #962
Closed

mysql8.0.2+ -exact-rowcount bug #961

Fanduzi opened this issue Apr 29, 2021 · 1 comment · Fixed by Fanduzi/gh-ost#1 or #962
Labels

Comments

@Fanduzi
Copy link
Contributor

Fanduzi commented Apr 29, 2021

https://dev.mysql.com/doc/refman/8.0/en/keywords.html
ROWS (R); became reserved in 8.0.2

if we use -exact-rowcount option, gh-ost will execute query

select /* gh-ost */ count(*) as rows from `db`.`t1`;

which will cause

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'rows from `db`.`t1`' at line 1
select /* gh-ost */ count(*) as `rows` from `db`.`t1`;
Fanduzi added a commit to Fanduzi/gh-ost that referenced this issue Apr 29, 2021
@Fanduzi Fanduzi mentioned this issue Apr 29, 2021
2 tasks
Fanduzi added a commit to Fanduzi/gh-ost that referenced this issue Apr 29, 2021
@Fanduzi Fanduzi mentioned this issue Apr 29, 2021
2 tasks
@shlomi-noach
Copy link
Contributor

Hi! IMO please keep this issue open -- it's fixed in your downstream fork, but not upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants