Description:
Doesn't make sense that count(*) returns a negative number.
mysql> select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s;
+----------------------+
| count(*) |
+----------------------+
| -8446744073709551616 |
+----------------------+
1 row in set (0.00 sec)
How to repeat:
drop table if exists t;
create table t(a bigint unsigned not null auto_increment primary key)engine=innodb row_format=compressed key_block_size=2;
insert into t values (),(),(),(),(),(),(),(),(),();
select count(*) from t a,t b,t c,t d;
select count(*) from t a,t b,t c,t d,t e;
select count(*) from t a,t b,t c,t d,t e,t f;
select count(*) from t a,t b,t c,t d,t e,t f,t g;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s,t t;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s,t t,t u;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s,t t,t u,t v;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s,t t,t u,t v,t x;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s,t t,t u,t v,t x,t y;
select count(*) from t a,t b,t c,t d,t e,t f,t g,t h,t i,t j,t k,t l,t m,t n,t o,t p,t q,t r,t s,t t,t u,t v,t x,t y,t z;
Suggested fix:
don't overflow.
use some big number math library?