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

NativeBlockInputStream schema mismatch at column 0, expected Nullable(MyDuration(0)), actual Nullable(MyDuration(6)) #8601

Closed
lilinghai opened this issue Dec 27, 2023 · 4 comments · Fixed by #8671

Comments

@lilinghai
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

ddl test, test case some log info

[2023/12/27 01:09:20.150 +08:00] [INFO] [ddl.go:165] ["ddl sequence"] [sql="alter table district add column cct_2 time"]
[2023/12/27 01:09:20.156 +08:00] [INFO] [ddl.go:165] ["ddl sequence"] [sql="Update district set cct_2 = null limit 2"]
[2023/12/27 01:09:20.319 +08:00] [INFO] [common_checker.go:135] ["debug tikv end success search log"] ["end time"=2023/12/27 01:08:19.911 +08:00] [res="[]"]
[2023/12/27 01:09:20.357 +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:21.374 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.2]
[2023/12/27 01:09:21.691 +08:00] [INFO] [ddl.go:86] ["ddl sequence"] [sql="alter table warehouse add column adc_29 mediumblob"]
[2023/12/27 01:09:21.695 +08:00] [INFO] [ddl.go:86] ["ddl sequence"] [sql="Update warehouse set adc_29 = null limit 2"]
[2023/12/27 01:09:21.761 +08:00] [INFO] [ddl.go:86] ["ddl sequence"] [sql="select /*+ read_from_storage(TIFLASH[warehouse]) */ adc_29 from warehouse limit 2"]
[2023/12/27 01:09:22.039 +08:00] [INFO] [util.go:133] ["[ch][Current] DELIVERY - Takes(s): 9.6, Count: 83, TPM: 521.0, Sum(ms): 10026.3, Avg(ms): 120.1, 50th(ms): 92.3, 90th(ms): 130.0, 95th(ms): 142.6, 99th(ms): 167.8, 99.9th(ms): 2684.4, Max(ms): 2684.4\r\n"]
[2023/12/27 01:09:22.039 +08:00] [INFO] [util.go:133] ["[ch][Current] NEW_ORDER - Takes(s): 10.0, Count: 871, TPM: 5249.7, Sum(ms): 31695.6, Avg(ms): 36.4, 50th(ms): 35.7, 90th(ms): 52.4, 95th(ms): 60.8, 99th(ms): 75.5, 99.9th(ms): 92.3, Max(ms): 100.7\r\n"]
[2023/12/27 01:09:22.039 +08:00] [INFO] [util.go:133] ["[ch][Current] ORDER_STATUS - Takes(s): 9.0, Count: 71, TPM: 472.5, Sum(ms): 853.2, Avg(ms): 12.0, 50th(ms): 11.5, 90th(ms): 19.9, 95th(ms): 22.0, 99th(ms): 25.2, 99.9th(ms): 27.3, Max(ms): 27.3\r\n"]
[2023/12/27 01:09:22.040 +08:00] [INFO] [util.go:133] ["[ch][Current] PAYMENT - Takes(s): 10.0, Count: 808, TPM: 4853.3, Sum(ms): 30507.8, Avg(ms): 37.8, 50th(ms): 22.0, 90th(ms): 35.7, 95th(ms): 46.1, 99th(ms): 83.9, 99.9th(ms): 2415.9, Max(ms): 2684.4\r\n"]
[2023/12/27 01:09:22.040 +08:00] [INFO] [util.go:133] ["[ch][Current] STOCK_LEVEL - Takes(s): 9.6, Count: 78, TPM: 486.1, Sum(ms): 14478.9, Avg(ms): 186.0, 50th(ms): 25.2, 90th(ms): 60.8, 95th(ms): 1677.7, 99th(ms): 2818.6, 99.9th(ms): 2818.6, Max(ms): 2818.6\r\n"]
[2023/12/27 01:09:22.189 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.5]
[2023/12/27 01:09:22.747 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.6]
[2023/12/27 01:09:23.231 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.8]
[2023/12/27 01:09:23.509 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.9]
[2023/12/27 01:09:23.817 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.1]
[2023/12/27 01:09:23.825 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.3]
[2023/12/27 01:09:24.156 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.4]
[2023/12/27 01:09:24.410 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=32] [condition=3.3.2.7]
[2023/12/27 01:09:24.545 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.3]
[2023/12/27 01:09:24.560 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q20] ["sql comment"=] ["consume time"=5s] ["result count"=0]
[2023/12/27 01:09:24.560 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q22]
[2023/12/27 01:09:24.815 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.4]
[2023/12/27 01:09:24.994 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.7]
[2023/12/27 01:09:25.279 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.1]
[2023/12/27 01:09:25.293 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.5]
[2023/12/27 01:09:25.668 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.6]
[2023/12/27 01:09:25.721 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q22] ["sql comment"=] ["consume time"=1s] ["result count"=0]
[2023/12/27 01:09:25.721 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q2]
[2023/12/27 01:09:25.793 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.8]
[2023/12/27 01:09:27.295 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.9]
[2023/12/27 01:09:27.560 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.12]
[2023/12/27 01:09:27.614 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q2] ["sql comment"=] ["consume time"=2s] ["result count"=1816]
[2023/12/27 01:09:27.614 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q21]
[2023/12/27 01:09:29.015 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=33] [condition=3.3.2.2]
[2023/12/27 01:09:29.560 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.1]
[2023/12/27 01:09:29.583 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.3]
[2023/12/27 01:09:29.701 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.4]
[2023/12/27 01:09:30.250 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.7]
[2023/12/27 01:09:30.785 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.12]
[2023/12/27 01:09:31.492 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.2]
[2023/12/27 01:09:31.996 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.5]
[2023/12/27 01:09:32.039 +08:00] [INFO] [util.go:133] ["[ch][Current] DELIVERY - Takes(s): 9.9, Count: 36, TPM: 217.3, Sum(ms): 10281.1, Avg(ms): 284.6, 50th(ms): 226.5, 90th(ms): 385.9, 95th(ms): 671.1, 99th(ms): 1879.0, 99.9th(ms): 1879.0, Max(ms): 1879.0\r\n"]
[2023/12/27 01:09:32.039 +08:00] [INFO] [util.go:133] ["[ch][Current] NEW_ORDER - Takes(s): 10.0, Count: 371, TPM: 2226.2, Sum(ms): 22705.4, Avg(ms): 61.2, 50th(ms): 65.0, 90th(ms): 88.1, 95th(ms): 100.7, 99th(ms): 125.8, 99.9th(ms): 159.4, Max(ms): 159.4\r\n"]
[2023/12/27 01:09:32.039 +08:00] [INFO] [util.go:133] ["[ch][Current] ORDER_STATUS - Takes(s): 9.9, Count: 37, TPM: 223.8, Sum(ms): 3833.2, Avg(ms): 103.6, 50th(ms): 25.2, 90th(ms): 62.9, 95th(ms): 285.2, 99th(ms): 1677.7, 99.9th(ms): 1677.7, Max(ms): 1677.7\r\n"]
[2023/12/27 01:09:32.039 +08:00] [INFO] [util.go:133] ["[ch][Current] PAYMENT - Takes(s): 10.0, Count: 317, TPM: 1905.1, Sum(ms): 30485.3, Avg(ms): 96.3, 50th(ms): 46.1, 90th(ms): 79.7, 95th(ms): 96.5, 99th(ms): 1744.8, 99.9th(ms): 2952.8, Max(ms): 2952.8\r\n"]
[2023/12/27 01:09:32.040 +08:00] [INFO] [util.go:133] ["[ch][Current] STOCK_LEVEL - Takes(s): 10.0, Count: 32, TPM: 192.3, Sum(ms): 10150.2, Avg(ms): 316.3, 50th(ms): 44.0, 90th(ms): 1140.9, 95th(ms): 1342.2, 99th(ms): 2080.4, 99.9th(ms): 2080.4, Max(ms): 2080.4\r\n"]
[2023/12/27 01:09:32.683 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.6]
[2023/12/27 01:09:33.160 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.8]
[2023/12/27 01:09:33.471 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=34] [condition=3.3.2.9]
[2023/12/27 01:09:33.708 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.1]
[2023/12/27 01:09:33.711 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.3]
[2023/12/27 01:09:34.052 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.4]
[2023/12/27 01:09:34.413 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.7]
[2023/12/27 01:09:34.565 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.9]
[2023/12/27 01:09:34.577 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q21] ["sql comment"=] ["consume time"=7s] ["result count"=407]
[2023/12/27 01:09:34.577 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q14]
[2023/12/27 01:09:34.896 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.12]
[2023/12/27 01:09:35.507 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.2]
[2023/12/27 01:09:36.146 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.5]
[2023/12/27 01:09:36.561 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.6]
[2023/12/27 01:09:37.083 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=35] [condition=3.3.2.8]
[2023/12/27 01:09:37.359 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.1]
[2023/12/27 01:09:37.362 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.3]
[2023/12/27 01:09:37.659 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.4]
[2023/12/27 01:09:37.900 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.7]
[2023/12/27 01:09:37.908 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q14] ["sql comment"=] ["consume time"=3s] ["result count"=1]
[2023/12/27 01:09:37.908 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q1]
[2023/12/27 01:09:38.049 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.2]
[2023/12/27 01:09:38.372 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.5]
[2023/12/27 01:09:38.609 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.6]
[2023/12/27 01:09:38.975 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.8]
[2023/12/27 01:09:39.179 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.9]
[2023/12/27 01:09:39.446 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=36] [condition=3.3.2.12]
[2023/12/27 01:09:39.774 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.1]
[2023/12/27 01:09:39.778 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.3]
[2023/12/27 01:09:39.873 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q1] ["sql comment"=] ["consume time"=2s] ["result count"=15]
[2023/12/27 01:09:39.873 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q22]
[2023/12/27 01:09:40.082 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.4]
[2023/12/27 01:09:40.213 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.7]
[2023/12/27 01:09:40.855 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.12]
[2023/12/27 01:09:40.987 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q22] ["sql comment"=] ["consume time"=1s] ["result count"=0]
[2023/12/27 01:09:40.987 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q14]
[2023/12/27 01:09:41.055 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.2]
[2023/12/27 01:09:41.446 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.5]
[2023/12/27 01:09:41.859 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.6]
[2023/12/27 01:09:42.040 +08:00] [INFO] [util.go:133] ["[ch][Current] DELIVERY - Takes(s): 9.4, Count: 28, TPM: 179.1, Sum(ms): 20592.6, Avg(ms): 732.1, 50th(ms): 260.0, 90th(ms): 2013.3, 95th(ms): 2818.6, 99th(ms): 3758.1, 99.9th(ms): 3758.1, Max(ms): 3758.1\r\n"]
[2023/12/27 01:09:42.040 +08:00] [INFO] [util.go:133] ["[ch][Current] NEW_ORDER - Takes(s): 9.9, Count: 401, TPM: 2432.8, Sum(ms): 16538.0, Avg(ms): 41.2, 50th(ms): 37.7, 90th(ms): 71.3, 95th(ms): 75.5, 99th(ms): 92.3, 99.9th(ms): 130.0, Max(ms): 130.0\r\n"]
[2023/12/27 01:09:42.040 +08:00] [INFO] [util.go:133] ["[ch][Current] ORDER_STATUS - Takes(s): 9.4, Count: 24, TPM: 153.9, Sum(ms): 347.2, Avg(ms): 14.4, 50th(ms): 13.1, 90th(ms): 24.1, 95th(ms): 28.3, 99th(ms): 31.5, 99.9th(ms): 31.5, Max(ms): 31.5\r\n"]
[2023/12/27 01:09:42.040 +08:00] [INFO] [util.go:133] ["[ch][Current] PAYMENT - Takes(s): 10.0, Count: 399, TPM: 2399.7, Sum(ms): 12495.5, Avg(ms): 31.3, 50th(ms): 28.3, 90th(ms): 56.6, 95th(ms): 65.0, 99th(ms): 79.7, 99.9th(ms): 109.1, Max(ms): 109.1\r\n"]
[2023/12/27 01:09:42.041 +08:00] [INFO] [util.go:133] ["[ch][Current] STOCK_LEVEL - Takes(s): 8.4, Count: 33, TPM: 235.2, Sum(ms): 31764.1, Avg(ms): 958.3, 50th(ms): 402.7, 90th(ms): 2281.7, 95th(ms): 2550.1, 99th(ms): 4026.5, 99.9th(ms): 4026.5, Max(ms): 4026.5\r\n"]
[2023/12/27 01:09:42.571 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.8]
[2023/12/27 01:09:42.743 +08:00] [INFO] [verify.go:163] ["verify successfully"] [tikv="[24360737220827579147685748953.75]"] [tiflash="[24360737220827579147685748953.75]"] [tag=]
[2023/12/27 01:09:43.281 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=37] [condition=3.3.2.9]
[2023/12/27 01:09:43.554 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.1]
[2023/12/27 01:09:43.563 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.3]
[2023/12/27 01:09:43.948 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.4]
[2023/12/27 01:09:44.264 +08:00] [INFO] [common_checker.go:183] ["debug tiflash start search log"] ["start time"=2023/12/27 01:08:44.264 +08:00]
[2023/12/27 01:09:44.518 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.7]
[2023/12/27 01:09:44.656 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q14] ["sql comment"=] ["consume time"=4s] ["result count"=1]
[2023/12/27 01:09:44.656 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q20]
[2023/12/27 01:09:44.732 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.9]
[2023/12/27 01:09:45.360 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.12]
[2023/12/27 01:09:45.944 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.2]
[2023/12/27 01:09:46.456 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.5]
[2023/12/27 01:09:46.925 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.6]
[2023/12/27 01:09:47.424 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=38] [condition=3.3.2.8]
[2023/12/27 01:09:47.627 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.5]
[2023/12/27 01:09:48.118 +08:00] [INFO] [verify.go:163] ["verify successfully"] [tikv="[40608193]"] [tiflash="[40608193]"] [tag=]
[2023/12/27 01:09:48.613 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.6]
[2023/12/27 01:09:49.169 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.8]
[2023/12/27 01:09:49.464 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.9]
[2023/12/27 01:09:49.847 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.12]
[2023/12/27 01:09:50.223 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.2]
[2023/12/27 01:09:50.232 +08:00] [INFO] [ch.go:374] ["end query"] [qno=q20] ["sql comment"=] ["consume time"=6s] ["result count"=0]
[2023/12/27 01:09:50.232 +08:00] [INFO] [ch.go:351] ["start query"] [qno=q22]
[2023/12/27 01:09:50.358 +08:00] [INFO] [ddl.go:165] ["ddl sequence"] [sql="select sleep(30)"]
[2023/12/27 01:09:50.658 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.3]
[2023/12/27 01:09:50.925 +08:00] [INFO] [ch_check.go:36] ["begin to check consistence"] [warehouse=39] [condition=3.3.2.4]
[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"]

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your TiFlash version? (Required)

master

@lilinghai lilinghai added the type/bug The issue is confirmed as a bug. label Dec 27, 2023
@yibin87
Copy link
Contributor

yibin87 commented Dec 29, 2023

Another related execution error from tidb log:
other error for mpp stream: From MPPquery:446638882795290662,task:2: Code: 171, e.displayText() = DB::Exception: Block structure mismatch in UNION stream:
different types:\ntable_scan_0 0 Nullable(MyDuration(0)) Nullable(size = 0, Int64(size = 0), UInt8(size = 0))\ntable_scan_0 0 Nullable(MyDuration(6)) Nullable(size = 0, Int64(size
= 0), UInt8(size = 0)), e.what() = DB::Exception,

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Jan 3, 2024

[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"]
different types:
table_scan_0 0 Nullable(MyDuration(0)) Nullable(size = 0, Int64(size = 0), UInt8(size = 0))
table_scan_0 0 Nullable(MyDuration(6)) Nullable(size = 0, Int64(size = 0), UInt8(size = 0))

@SeaRise
Copy link
Contributor

SeaRise commented Jan 5, 2024

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:

  1. Changing the precision of time
  2. occur remote read.

@XuHuaiyu
Copy link
Contributor

XuHuaiyu commented Jan 5, 2024

I'll change the label to severity/major

@ti-chi-bot ti-chi-bot bot closed this as completed in #8671 Jan 5, 2024
ti-chi-bot bot pushed a commit that referenced this issue Jan 5, 2024
…d the precision of a duration data type is changed. (#8671)

close #8601
ti-chi-bot bot pushed a commit that referenced this issue Jan 7, 2024
…d the precision of a duration data type is changed. (#8671) (#8672)

close #8601
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this issue Mar 1, 2024
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this issue Mar 4, 2024
ti-chi-bot bot pushed a commit that referenced this issue Mar 5, 2024
…ad and the precision of a duration data type is changed (release-6.5) (#8816)

close #8601
ti-chi-bot bot pushed a commit that referenced this issue Mar 22, 2024
…ad and the precision of a duration data type is changed (release-7.1) (#8812)

close #8601
JaySon-Huang added a commit to JaySon-Huang/tiflash that referenced this issue Apr 1, 2024
…ad and the precision of a duration data type is changed (release-6.5) (pingcap#8816)

close pingcap#8601
ti-chi-bot bot pushed a commit that referenced this issue Apr 1, 2024
…ad and the precision of a duration data type is changed (release-6.1) (#8882)

close #8601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants