We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Please answer these questions before submitting your issue. Thanks!
mysql> create table t(a int primary key, b timestamp); Query OK, 0 rows affected (0.01 sec) mysql> insert into t values(1, '2019-04-29 12:38:15'); Query OK, 1 row affected (0.00 sec) mysql> select * from t where b = '2019-04-29 12:38:15'; +---+---------------------+ | a | b | +---+---------------------+ | 1 | 2019-04-29 12:38:15 | +---+---------------------+ 1 row in set (0.00 sec) mysql> select * from t where b = (select max(b) from t); Empty set (0.00 sec) mysql> explain select * from t where b = (select max(b) from t); +----------------------+-------+------+------------------------------------------------------------+ | id | count | task | operator info | +----------------------+-------+------+------------------------------------------------------------+ | TableReader_43 | 0.00 | root | data:Selection_42 | | └─Selection_42 | 0.00 | cop | eq(test.t.b, 2019-04-29 12:38:15) | | └─TableScan_41 | 1.00 | cop | table:t, range:[-inf,+inf], keep order:false, stats:pseudo | +----------------------+-------+------+------------------------------------------------------------+ 3 rows in set (0.00 sec)
Both select queries should return one row.
Second select query returns empty result set.
tidb-server -V
select tidb_version();
Release Version: v3.0.0-beta.1-160-gb5890b3cf Git Commit Hash: b5890b3cf44eaf4faa48aa8478df9ce9506926ff Git Branch: master UTC Build Time: 2019-04-29 04:37:16 GoVersion: go version go1.12 darwin/amd64 Race Enabled: false TiKV Min Version: 2.1.0-alpha.1-ff3dd160846b7d1aed9079c389fc188f7f5ea13e Check Table Before Drop: false
The text was updated successfully, but these errors were encountered:
eurekaka
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
Both select queries should return one row.
Second select query returns empty result set.
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: