matrixorigin / matrixone

Hyperconverged cloud-edge native database
https://docs.matrixorigin.cn/en
Apache License 2.0
1.76k stars 274 forks source link

[Bug]: Incorrect result for `select version()` #13488

Open DanielZhangQD opened 9 months ago

DanielZhangQD commented 9 months ago

Is there an existing issue for the same bug?

Environment

- Version or commit-id (e.g. v0.1.0 or 8b23a93): 1.0-dev nightly-70b86219
- Hardware parameters:
- OS type:
- Others:

Actual Behavior

Connect to MO:

MySQL [(none)]> show databases; +--------------------+ | Database | +--------------------+ | mo_catalog | | system | | system_metrics | | information_schema | | mysql | | test_db | +--------------------+ 6 rows in set (0.08 sec)

MySQL [(none)]> use system; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed MySQL [system]> select version(); +-------------------------+ | version() | +-------------------------+ | 8.0.30-MatrixOne-v1.0.0 | +-------------------------+ 1 row in set (0.01 sec)

MySQL [system]> use mo_catalog; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed MySQL [mo_catalog]> select version(); +-------------------------+ | version() | +-------------------------+ | 8.0.30-MatrixOne-v1.0.0 | +-------------------------+ 1 row in set (0.00 sec)

MySQL [mo_catalog]> use mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A

Database changed MySQL [mysql]> select version(); +-------------------------+ | version() | +-------------------------+ | 8.0.30-MatrixOne-v1.0.0 | +-------------------------+ 1 row in set (0.00 sec)

MySQL [mysql]> create database test; Query OK, 1 row affected (0.01 sec)

MySQL [mysql]> use test; Database changed MySQL [test]> select version(); +-----------+ | version() | +-----------+ | 0.7 | +-----------+ 1 row in set (0.00 sec)


### Expected Behavior

Return the correct version in all cases

### Steps to Reproduce

```Markdown
See detail in `Actual Behavior`

Additional information

No response

YANGGMM commented 9 months ago

fixed

DanielZhangQD commented 9 months ago

Verified and passed with commit 10125790e

DanielZhangQD commented 9 months ago

升级到这个 Fix 前创建的 DB 依然有这个问题

YANGGMM commented 9 months ago

可以用 alter database dbname set mysql_compatibility_mode = '8.0.30-MatrixOne-v1.0.0'; 来升级 @DanielZhangQD

DanielZhangQD commented 8 months ago

新建 Database,use 后版本为 1.0.0

MySQL [test]> select version();
+-------------------------+
| version()               |
+-------------------------+
| 8.0.30-MatrixOne-v1.0.0 |
+-------------------------+
1 row in set (0.00 sec)
DanielZhangQD commented 8 months ago

另外需要提供如何修改之前已经创建的 DB version 的 SQL

sukki37 commented 2 months ago

still repro with v1.2.1

image
YANGGMM commented 2 months ago

还在看

YANGGMM commented 1 month ago

还在看

YANGGMM commented 1 month ago

还在看

YANGGMM commented 1 month ago

还在看

YANGGMM commented 1 month ago

还在看

YANGGMM commented 1 month ago

还在看

YANGGMM commented 1 month ago

还在看

YANGGMM commented 4 weeks ago

还在看

YANGGMM commented 3 weeks ago

还在看

YANGGMM commented 3 weeks ago

有空看

YANGGMM commented 2 weeks ago

有空看

YANGGMM commented 2 weeks ago

还在看

YANGGMM commented 1 week ago

正在做

YANGGMM commented 5 days ago

不知道是否需要合入1.2.3

YANGGMM commented 21 hours ago

不知道是否需要合入1.2.3

YANGGMM commented 6 hours ago

fixed,plz test @aressu1985