You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the following operations are executed on a tidb-server built from #10802
droptable if exists t;
createtablet(a bigint, b bigintas (a+1) virtual, c bigintas (b+1) virtual);
altertable t add index idx_b(b);
altertable t add index idx_c(c);
insert into t(a) values(1);
altertable t add column(d bigintas (c+1) virtual);
The query below can produce a correct result:
TiDB(root@127.0.0.1:test) >select*from t where d >2;
+------+------+------+------+
| a | b | c | d |
+------+------+------+------+
| 1 | 2 | 3 | 4 |
+------+------+------+------+1 row inset (0.00 sec)
Then create an index on the newly added column d:
altertable t add index idx_d(d);
And run the query again, the result is incorrect:
TiDB(root@127.0.0.1:test) >select*from t where d >2;
Empty set (0.00 sec)
Bug Report
1. What did you do?
All the following operations are executed on a tidb-server built from #10802
The query below can produce a correct result:
Then create an index on the newly added column
d
:And run the query again, the result is incorrect:
The execution plan now is changed to:
2. What did you expect to see?
produce the correct result
3. What did you see instead?
As I mentioned above, it produces no result.
4. What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: