Skip to content
New issue

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

[Bug]: PROD环境,对订阅库表执行增加联合主键操作报错[21S01][1136] Column count doesn't match value count at row 1 #14846

Closed
1 task done
xiaoshuwei opened this issue Mar 8, 2024 · 11 comments
Assignees
Milestone

Comments

@xiaoshuwei
Copy link

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

v1.1.1

Commit ID

9d61683

Other Environment Information

- Hardware parameters:
- OS type:
- Others:

Actual Behavior

alter table mo_sample_data_tpch_sf10.partsupp add PRIMARY KEY (PS_PARTKEY, PS_SUPPKEY);
alter table mo_sample_data_tpch_sf10.LINEITEM add PRIMARY KEY (L_ORDERKEY, L_LINENUMBER);
alter table mo_sample_data_tpch_sf1.partsupp add PRIMARY KEY (PS_PARTKEY, PS_SUPPKEY);
alter table mo_sample_data_tpch_sf1.LINEITEM add PRIMARY KEY (L_ORDERKEY, L_LINENUMBER);
报错
[21S01][1136] Column count doesn't match value count at row 1

Expected Behavior

正常添加联合主键

Steps to Reproduce

如上

Additional information

No response

@xiaoshuwei xiaoshuwei added kind/bug Something isn't working needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Mar 8, 2024
@xiaoshuwei xiaoshuwei added this to the 1.2.0 milestone Mar 8, 2024
@daviszhen daviszhen assigned qingxinhome and unassigned badboynt1 Mar 8, 2024
@xiaoshuwei
Copy link
Author

目前dump用户创建有联合主键的表也会报相同的错误

CREATE TABLE mo_sample_data_tpch_sf_abc.`lineitem` (
                                                       `l_orderkey` BIGINT NOT NULL,
                                                       `l_linenumber` INT NOT NULL,
                                                       PRIMARY KEY (`L_ORDERKEY`, `L_LINENUMBER`)
);
image

@LiSong0214
Copy link

我也试了下,在 MO Cloud 生产环境(即 MO v1.1.1)的普通租户下,是可以执行:1)对一个没有主键的表添加联合主键;2)创建一张带有联合主键的表。从现象上看,sys 租户创建不了(或者说 dump/root用户创建不了),这很奇怪,我们居然有逻辑区分了它们的语法支持。

@tianyahui-python tianyahui-python added severity/s-1 impact/1.1 and removed needs-triage severity/s0 Extreme impact: Cause the application to break down and seriously affect the use labels Mar 14, 2024
@qingxinhome
Copy link
Contributor

qingxinhome commented Mar 15, 2024

The upgrade of the mo_indexes table under the system tenant failed during version update。
Causing the execution of inserting the number of columns into the data of the mo-Index table when creating a table containing indexes and primary keys
Actual Table Structure:
image
The correct table structure should be:
image
@arjunsk

在版本更新过程中,sys租户下的mo_indexes表升级失败,对mo_indexes扩展的列 algo, algo_table_type, algo_params 没有成功,导致在创建包含索引和主键的表时, 执行将对mo_indexes索引表的数据插入时,列的数量不匹配导致报错,
可能是升级语句有问题

@arjunsk
Copy link
Contributor

arjunsk commented Mar 15, 2024

Log Link: here

Download Log File: Explore-logs-2024-03-14 20_33_37.txt

Common labels: {"app":"default-cn","container":"main","job":"freetier-02/default-cn","lifecycle_apps_kruise_io_state":"Normal","matrixone_cloud_cluster":"freetier-02","matrixone_cloud_component":"cn","matrixone_cloud_main_cluster":"freetier-02","matrixone_cloud_profile":"cn.standard","matrixorigin_io_component":"CNSet","matrixorigin_io_instance":"default","matrixorigin_io_namespace":"freetier-02","matrixorigin_io_owner":"freetier-02","namespace":"freetier-02","stream":"stdout"}
Line limit: "1000 (28 returned)"
Total bytes processed: "9.46  GB"


2024-02-05T02:22:32-08:00	{"level":"ERROR","time":"2024/02/05 10:22:32.239388 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-05T02:21:20-08:00	{"level":"ERROR","time":"2024/02/05 10:21:20.394657 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-05T01:40:02-08:00	{"level":"ERROR","time":"2024/02/05 09:40:02.385620 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-05T01:38:56-08:00	{"level":"ERROR","time":"2024/02/05 09:38:56.511331 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-05T01:38:56-08:00	{"level":"ERROR","time":"2024/02/05 09:38:56.511331 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-02T08:39:11-08:00	{"level":"ERROR","time":"2024/02/02 16:39:11.547356 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-02T08:37:59-08:00	{"level":"ERROR","time":"2024/02/02 16:37:59.366877 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-02T05:03:23-08:00	{"level":"ERROR","time":"2024/02/02 13:03:23.322622 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-02T05:02:26-08:00	{"level":"ERROR","time":"2024/02/02 13:02:26.109410 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-02T05:01:23-08:00	{"level":"ERROR","time":"2024/02/02 13:01:23.441903 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-02T04:59:43-08:00	{"level":"ERROR","time":"2024/02/02 12:59:43.318064 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_indexes' under tenant 'sys:0' reports error: Duplicate column name 'algo' "}
2024-02-02T00:37:32-08:00	{"level":"ERROR","time":"2024/02/02 08:37:32.088562 +0000","caller":"upgrader/upgrader.go:193","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'information_schema.processlist' under tenant 'sys:0' reports error: SQL parser error: table \"columns\" does not exist \nerror[1]: CN upgrade table or view 'system.rawlog' under tenant 'sys:0' reports error: SQL parser error: table \"columns\" does not exist "}
2024-02-02T00:37:32-08:00	{"level":"ERROR","time":"2024/02/02 08:37:32.088562 +0000","caller":"upgrader/upgrader.go:193","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'information_schema.processlist' under tenant 'sys:0' reports error: SQL parser error: table \"columns\" does not exist \nerror[1]: CN upgrade table or view 'system.rawlog' under tenant 'sys:0' reports error: SQL parser error: table \"columns\" does not exist "}
2024-02-02T00:37:31-08:00	{"level":"ERROR","time":"2024/02/02 08:37:31.774910 +0000","caller":"upgrader/upgrader.go:193","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'information_schema.processlist' under tenant 'sys:0' reports error: SQL parser error: table \"columns\" does not exist \nerror[1]: CN upgrade table or view 'system.rawlog' under tenant 'sys:0' reports error: SQL parser error: table \"columns\" does not exist "}
2024-02-01T21:54:36-08:00	{"level":"ERROR","time":"2024/02/02 05:54:36.638381 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T21:53:37-08:00	{"level":"ERROR","time":"2024/02/02 05:53:37.015743 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T21:52:45-08:00	{"level":"ERROR","time":"2024/02/02 05:52:45.187922 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T20:08:49-08:00	{"level":"ERROR","time":"2024/02/02 04:08:49.663994 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T20:07:45-08:00	{"level":"ERROR","time":"2024/02/02 04:07:45.726076 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T20:07:45-08:00	{"level":"ERROR","time":"2024/02/02 04:07:45.726076 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:40:46-08:00	{"level":"ERROR","time":"2024/02/02 02:40:46.056699 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:39:50-08:00	{"level":"ERROR","time":"2024/02/02 02:39:50.836093 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:36:17-08:00	{"level":"ERROR","time":"2024/02/02 02:36:17.123391 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:35:19-08:00	{"level":"ERROR","time":"2024/02/02 02:35:19.840446 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:34:10-08:00	{"level":"ERROR","time":"2024/02/02 02:34:10.093792 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:33:16-08:00	{"level":"ERROR","time":"2024/02/02 02:33:16.205804 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:25:52-08:00	{"level":"ERROR","time":"2024/02/02 02:25:52.126057 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}
2024-02-01T18:22:55-08:00	{"level":"ERROR","time":"2024/02/02 02:22:55.121530 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_cache' under tenant 'sys:0' reports error: internal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: unknown data type float\ninternal error: can not get the schema "}


@arjunsk
Copy link
Contributor

arjunsk commented Mar 15, 2024

mo_catalog.mo_columns doesn't have algo, algo_params and algo_table_type for one tenant. However, somehow the alter add SQL query is errored out. I could see in the logs:

2024-02-02T04:59:43-08:00	{"level":"ERROR","time":"2024/02/02 12:59:43.318064 +0000","caller":"upgrader/upgrader.go:207","msg":"error: internal error: Upgrade failed during system startup! The upgrade error message is listed below: \nerror[0]: CN upgrade table or view 'mo_catalog.mo_indexes' under tenant 'sys:0' reports error: Duplicate column name 'algo' "}

However, I don't understand why "IfEmpty" query failed.

COLUMN NAME tables

mysql> SELECT COLUMN_NAME, COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA ="mo_catalog" AND TABLE_NAME ="mo_indexes" GROUP BY COLUMN_NAME;
+------------------+----------+
| column_name      | count(*) |
+------------------+----------+
| __mo_cpkey_col   |       35 |
| column_name      |       35 |
| comment          |       35 |
| database_id      |       35 |
| hidden           |       35 |
| id               |       35 |
| index_table_name |       35 |
| is_visible       |       35 |
| name             |       35 |
| options          |       35 |
| ordinal_position |       35 |
| table_id         |       35 |
| type             |       35 |
| algo             |       34 |<-------
| algo_params      |       34 |<-------
| algo_table_type  |       34 |<-------
+------------------+----------+

mysql> select attname, count(*)  from mo_catalog.mo_columns where att_database  ="mo_catalog" and att_relname ="mo_indexes" group by attname ;
+------------------+----------+
| attname          | count(*) |
+------------------+----------+
| __mo_cpkey_col   |       35 |
| __mo_rowid       |       35 |
| column_name      |       35 |
| comment          |       35 |
| database_id      |       35 |
| hidden           |       35 |
| id               |       35 |
| index_table_name |       35 |
| is_visible       |       35 |
| name             |       35 |
| options          |       35 |
| ordinal_position |       35 |
| table_id         |       35 |
| type             |       35 |
| algo             |       34 |<-------
| algo_params      |       34 |<-------
| algo_table_type  |       34 |<-------
+------------------+----------+
17 rows in set (0.34 sec)

However, that column is not present in the table:

mysql> desc mo_catalog.mo_indexes;
+------------------+---------------------+------+------+---------+-------+---------+
| Field            | Type                | Null | Key  | Default | Extra | Comment |
+------------------+---------------------+------+------+---------+-------+---------+
| id               | BIGINT UNSIGNED(64) | NO   | PRI  | NULL    |       |         |
| table_id         | BIGINT UNSIGNED(64) | NO   |      | NULL    |       |         |
| database_id      | BIGINT UNSIGNED(64) | NO   |      | NULL    |       |         |
| name             | VARCHAR(64)         | NO   |      | NULL    |       |         |
| type             | VARCHAR(11)         | NO   |      | NULL    |       |         |
| is_visible       | TINYINT(8)          | NO   |      | NULL    |       |         |
| hidden           | TINYINT(8)          | NO   |      | NULL    |       |         |
| comment          | VARCHAR(2048)       | NO   |      | NULL    |       |         |
| column_name      | VARCHAR(256)        | NO   | PRI  | NULL    |       |         |
| ordinal_position | INT UNSIGNED(32)    | NO   |      | NULL    |       |         |
| options          | TEXT(0)             | YES  |      | NULL    |       |         |
| index_table_name | VARCHAR(5000)       | YES  |      | NULL    |       |         |
+------------------+---------------------+------+------+---------+-------+---------+
12 rows in set (0.37 sec)

@arjunsk
Copy link
Contributor

arjunsk commented Mar 17, 2024

PR raised and merged to 1.1-dev. waiting for the Cluster update.

Update

image

@qingxinhome
Copy link
Contributor

The issue has been submitted to PR, please verify and test it @tianyahui-python @daviszhen @LiSong0214

@tianyahui-python
Copy link
Contributor

等待升级到qa 验证。。。

@arjunsk
Copy link
Contributor

arjunsk commented Mar 18, 2024

The issue is fixed in 1.1-dev branch.

mysql> select git_version();
+---------------+
| git_version() |
+---------------+
| afb4934ae     |
+---------------+
1 row in set (0.18 sec)

mysql> mysql> desc mo_catalog.mo_;
+------------------+---------------------+------+------+---------+-------+---------+
| Field            | Type                | Null | Key  | Default | Extra | Comment |
+------------------+---------------------+------+------+---------+-------+---------+
| id               | BIGINT UNSIGNED(64) | NO   | PRI  | NULL    |       |         |
| table_id         | BIGINT UNSIGNED(64) | NO   |      | NULL    |       |         |
| database_id      | BIGINT UNSIGNED(64) | NO   |      | NULL    |       |         |
| name             | VARCHAR(64)         | NO   |      | NULL    |       |         |
| type             | VARCHAR(11)         | NO   |      | NULL    |       |         |
| algo             | VARCHAR(11)         | YES  |      | NULL    |       |         |
| algo_table_type  | VARCHAR(11)         | YES  |      | NULL    |       |         |
| algo_params      | VARCHAR(2048)       | YES  |      | NULL    |       |         |
| is_visible       | TINYINT(8)          | NO   |      | NULL    |       |         |
| hidden           | TINYINT(8)          | NO   |      | NULL    |       |         |
| comment          | VARCHAR(2048)       | NO   |      | NULL    |       |         |
| column_name      | VARCHAR(256)        | NO   | PRI  | NULL    |       |         |
| ordinal_position | INT UNSIGNED(32)    | NO   |      | NULL    |       |         |
| options          | TEXT(0)             | YES  |      | NULL    |       |         |
| index_table_name | VARCHAR(5000)       | YES  |      | NULL    |       |         |
+------------------+---------------------+------+------+---------+-------+---------+
15 rows in set (0.50 sec)

mysql> SELECT COLUMN_NAME, COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA ="mo_catalog" AND TABLE_NAME ="mo_indexes" GROUP BY COLUMN_NAME;
+------------------+----------+
| column_name      | count(*) |
+------------------+----------+
| __mo_cpkey_col   |       36 |
| algo             |       36 |
| algo_params      |       36 |
| algo_table_type  |       36 |
| column_name      |       36 |
| comment          |       36 |
| database_id      |       36 |
| hidden           |       36 |
| id               |       36 |
| index_table_name |       36 |
| is_visible       |       36 |
| name             |       36 |
| options          |       36 |
| ordinal_position |       36 |
| table_id         |       36 |
| type             |       36 |
+------------------+----------+
16 rows in set (0.36 sec)

mysql> 


@tianyahui-python
Copy link
Contributor

fixed

@tianyahui-python
Copy link
Contributor

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants