create table t1(a int, b int, x char(32)); insert into t1 values (2, 10, 'xx'); insert into t1 values (2, 10, 'zz'); insert into t1 values (2, 20, 'yy'); insert into t1 values (3, 10, 'xxx'); insert into t1 values (3, 20, 'vvv'); # Uncommenting this line causes a crash in setup_group when executing the second # select. #select row_number() over (order by b) from t1; select a, b, x, row_number() over (partition by a,b order by x), row_number() over (partition by a), row_number() over (partition by a order by x) from t1; # Uncommenting this line causes a crash in filesort during init_for_filesort. #select a, b, x, row_number() over (partition by a order by x) from t1; drop table t1;