-
Notifications
You must be signed in to change notification settings - Fork 409
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
NativeBlockInputStream schema mismatch at column 0, expected Nullable(MyDuration(0)), actual Nullable(MyDuration(6)) #8601
Comments
Another related execution error from tidb log: |
[2023/12/27 01:09:51.273 +08:00] [INFO] [ddl.go:165] ["ddl sequence"] [sql="alter table district modify cct_2 time(6)"]
[2023/12/27 01:09:51.422 +08:00] [INFO] [ddl.go:165] ["ddl sequence"] [sql="select /*+ read_from_storage(TIFLASH[district]) */ cct_2 from district limit 2"]
[2023/12/27 01:09:51.422 +08:00] [ERROR] [ddl.go:167] ["sql error"] [sql="select /*+ read_from_storage(TIFLASH[district]) */ cct_2 from district limit 2"] [error="Error 1105 (HY000): other error for mpp stream: Code: 49, e.displayText() = DB::Exception: NativeBlockInputStream schema mismatch at column 0, expected Nullable(MyDuration(0)), actual Nullable(MyDuration(6)), e.what() = DB::Exception,"] [stack="github.com/pingcap/endless/testcase/tiflash/pkg.ChangeColumnType\n\t/home/jenkins/agent/workspace/endless-master-build/testcase/tiflash/pkg/ddl.go:167\ngithub.com/pingcap/endless/testcase/tiflash/common_test.glob..func1.3.6.3\n\t/home/jenkins/agent/workspace/endless-master-build/testcase/tiflash/common/common_test.go:380\ngithub.com/pingcap/endless/pkg/util.WithGinkgoRecover.func1\n\t/home/jenkins/agent/workspace/endless-master-build/pkg/util/fastfail.go:18\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/sync@v0.2.0/errgroup/errgroup.go:75"]
|
The issue occurred because in the Tiflash storage layer, regardless of the fsp value of time, it is treated as int64. Therefore, modifying time(0) to time(6) did not trigger a sync schema, resulting in Tiflash table info showing time(0), but the Tidb request showing time(6). During a remote read, the cop_reader constructs a header using the table info, which is then used to decode packets. This resulted in time(0) being decoded as time(6) and caused the error. The conditions for reproducing the issue are quite strict:
|
I'll change the label to |
…ad and the precision of a duration data type is changed (release-6.5) (pingcap#8816) close pingcap#8601
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
ddl test, test case some log info
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiFlash version? (Required)
master
The text was updated successfully, but these errors were encountered: