pingcap / tidb

TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications.
https://pingcap.com
Apache License 2.0
37.3k stars 5.85k forks source link

IT mysql_test index_merge_sqlgen_exprs_orandor_1_no_out_trans failed #33256

Closed jebter closed 2 years ago

jebter commented 2 years ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

https://ci.pingcap.net/blue/organizations/jenkins/tidb_ghpr_integration_common_test/detail/tidb_ghpr_integration_common_test/10243/pipeline/#step-455-log-175 [2022-03-19T03:09:08.963Z] time="2022-03-19T07:13:57+08:00" level=error msg="run test [index_merge_sqlgen_exprs_orandor_1_no_out_trans] err: sql:select /+ use_index_merge( tbl_6 ) / col_62,col_64,col_67,col_68,col_65,col_69,col_66 from tbl_6 where ( not( tbl_6.col_64 in ( 56 ) ) or IsNull( tbl_6.col_64 ) ) and ( IsNull( tbl_6.col_64 ) or tbl_6.col_64 not in ( 37 , 114 ) ) and lpad( least( ltrim( upper( ltrim( left( tbl_6.col_61 , 4 ) ) ) ) , tbl_6.col_61 , tbl_6.col_65 ) , 8 , 2 ) order by tbl_6.col_60,tbl_6.col_61,tbl_6.col_62,tbl_6.col_63,tbl_6.col_64,tbl_6.col_65,tbl_6.col_66,tbl_6.col_67,tbl_6.col_68,tbl_6.col_69 for update;: failed to run query \n\"select /+ use_index_merge( tbl_6 ) / col_62,col_64,col_67,col_68,col_65,col_69,col_66 from tbl_6 where ( not( tbl_6.col_64 in ( 56 ) ) or IsNull( tbl_6.col_64 ) ) and ( IsNull( tbl_6.col_64 ) or tbl_6.col_64 not in ( 37 , 114 ) ) and lpad( least( ltrim( upper( ltrim( left( tbl_6.col_61 , 4 ) ) ) ) , tbl_6.col_61 , tbl_6.col_65 ) , 8 , 2 ) order by tbl_6.col_60,tbl_6.col_61,tbl_6.col_62,tbl_6.col_63,tbl_6.col_64,tbl_6.col_65,tbl_6.col_66,tbl_6.col_67,tbl_6.col_68,tbl_6.col_69 for update;\" \n around line 11296, \nwe need(1293):\ncol_62\tcol_64\tcol_67\tcol_68\tcol_65\tcol_69\tcol_66\n267029324\t2\tDu\t3.00\ttIfFr\t0.3921000000000000\t7.400000000000000000000000\n3421332754\t-43\tnaiNNlnoEzsunK\t0.77\tP\t0.0000000000000000\t301272.268000000000000000000000\n4050626382\t111\tb\t0.00\tJf\t0.1650000000000000\t14.228300000000000000000000\n2800687657\t99\t\t2.00\tC\tNULL\t301753.476000000000000000000000\n694802829\t51\tLitBX\t9.19\t\t0.7800000000000000\t952741.780000000000000000000000\n667824688\t-49\tyBBHFSIIO\t8.97\tFOZmmuDgnOqDl\t0.2000000000000000\t257791.200000000000000000000000\n919024237\t13\t\t8.53\tbaxnVM\t0.6200000000000000\t2448.959000000000000000000000\n512818588\t53\tvxhgDzJhS\t0.10\t\t0.3000000000000000\t153.000000000000000000000000\n2738488628\t122\tiJLvMDlqQSildpl\t0.80\tJ\t0.4085000000000000\t24842.475700000000000000000000\n3536567891\t119\tNscokT\t6.64\tMrrUE\t0.8000000000000000\t415474.524700000000000000000000\n1506134689\t-56\tXlOYoohlUa\t0.67\tmsEVk\t0.7500000000000000\tNULL\n// 5638\ncol_6\tcol_0\tcol_4\tcol_3\tcol_5\tcol_1\tcol_7\tcol_9\tcol_2\tcol_8\n// 5639\ncol_32\tcol_37\tcol_35\tcol_30\tcol_33\tcol_34\n// 5640\ncol_50\tcol_59\n935809\tNULL\n1545171\t205\n3461903\t140\n3590079\t80\n4457856\t114\n5002176\t65\n9325221\t238\n11073613\t206\n12396732\t127\n13741139\t26\n13762832\t133\n14333559\tNULL\n15093878\t191\n// 5641\ncol_22\tcol_23\tcol_20\tcol_28\tcol_21\tcol_25\n0.5440000000\t49\t843692250940253380\tUSylgydPIixkG\nbut got(1293):\ncol_62\tcol_64\tcol_67\tcol_68\tcol_65\tcol_69\tcol_66\n3266992526\t71\tAbiSSGSmXpwbdIewYQo\t0.00\tkmKeVLKscmGS\t0.8900000000000000\t673.600000000000000000000000\n267029324\t2\tDu\t3.00\ttIfFr\t0.3921000000000000\t7.400000000000000000000000\n3421332754\t-43\tnaiNNlnoEzsunK\t0.77\tP\t0.0000000000000000\t301272.268000000000000000000000\n4050626382\t111\tb\t0.00\tJf\t0.1650000000000000\t14.228300000000000000000000\n2073187771\t-19\tXPLOExLHfecyWTn\t6.00\tplSzZtTvwvTuERaKF\t0.7100000000000000\t976035.725000000000000000000000\n2800687657\t99\t\t2.00\tC\tNULL\t301753.476000000000000000000000\n694802829\t51\tLitBX\t9.19\t\t0.7800000000000000\t952741.780000000000000000000000\n667824688\t-49\tyBBHFSIIO\t8.97\tFOZmmuDgnOqDl\t0.2000000000000000\t257791.200000000000000000000000\n919024237\t13\t\t8.53\tbaxnVM\t0.6200000000000000\t2448.959000000000000000000000\n512818588\t53\tvxhgDzJhS\t0.10\t\t0.3000000000000000\t153.000000000000000000000000\n3699041978\t29\thlvTalQA\t1.00\tleqtmpujlGRBf\t0.0000000000000000\t782985.000000000000000000000000\n2738488628\t122\tiJLvMDlqQSildpl\t0.80\tJ\t0.4085000000000000\t24842.475700000000000000000000\n462984871\t24\tGEQKdTkhAMTSJuNyc\t3.88\trnniskoDKSgvpVRTY\t0.8138000000000000\t0.203000000000000000000000\n3536567891\t119\tNscokT\t6.64\tMrrUE\t0.8000000000000000\t415474.524700000000000000000000\n1506134689\t-56\tXlOYoohlUa\t0.67\tmsEVk\t0.7500000000000000\tNULL\n\n"

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

3. What did you see instead (Required)

4. What is your TiDB version? (Required)

master & v6.0.0

guo-shaoge commented 2 years ago

Introduced by #32553. I added this case in ci, but it needs tikv to reproduce this bug.