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

Possible bug: rsumi + row_number() #16

Open
kodonnell opened this issue Dec 1, 2015 · 4 comments
Open

Possible bug: rsumi + row_number() #16

kodonnell opened this issue Dec 1, 2015 · 4 comments

Comments

@kodonnell
Copy link

Try this:

select r, rsumi(r) from (select row_number() as r from information_schema.tables) as t;

On my version, r increases by 2 for each row, and rsumi(r) at row n is equal to the expected rsumi(r) + n.

Note that:

select row_number(), rsumi(row_number()) from information_schema.tables;

seems to be fine, so it would appear to be something associated with nested queries.

@infusion
Copy link
Owner

infusion commented Dec 1, 2015

On what OS have you tried this? I tried to reproduce your problem, but I get the same result for both queries.

@kodonnell
Copy link
Author

Interesting. I'm on centos 7.1.1503, using mariadb 10.0.22.

@infusion
Copy link
Owner

infusion commented Dec 2, 2015

Hm, I've never tried it with mariadb. Running on percona server here and also on MySQL it's just fine. Maybe it is a thing with MariaDB - I'll install it on a vm and test it there.

@kodonnell
Copy link
Author

Thanks. I may be entirely wrong, but I believe (?) MariaDB is becoming the default install of "mysql" on Linux boxes, so it is probably worth considering.

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

No branches or pull requests

2 participants