Skip to content

mysql8.0.2+ -exact-rowcount bug #961

@Fanduzi

Description

@Fanduzi

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`;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions