pingcap / tidb

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

(Plan Cache) ERROR 1815 (HY000): expression cannot be pushed down #57319

Open apollodafoni opened 1 day ago

apollodafoni commented 1 day ago

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

CREATE TABLE `IDT_MULTI15760STROBJSTROBJ` (
  `COL1` set('^YSQT0]V@9TFN>^WB6G?NG@S8>VYOM;BSC@<BCQ6','T\NKZQQ=C1@IH9W>64=ZISGS?O[JDFBI5M]QXJYQNSKU>NGAWLXS26LMTZ2YNN`XKIUGKY0IHDWV>E[BJJCABOKH1M^CB5E@DLS7Q88PWZTEAY]1ZQMN5NX[I<KBBK','PXWTHJ?R]P=`Y','OFJHCEKCQGT:MXI7P3[YO4N0DF=2XJWJ4Z9Z;HQ8TMUTZV8YLQAHWJ4BDZHR3A','@[ETQPEKKDD;9INXAQISU0O65J86AWQ2SZ8=ZZW6TKT4GCF_O13QW_S>FIYA983K:E4N77@FINM5HVGQCUCVNF5WLOOOEORAM=_JLMVFURMUASTVDBE','NL3V:J9LM4U5KUCV<RIJ_RKMZ4;CXD_0:K`HCO=P1YNYTHX8KYZRQ?PL01HLNSUC_R7:I5<V[HV0BIDEBZAPT73R7`DP43XXPLQCEI8>R;P','M5=T5FLQEZMPZAXH]4G:TSYYYVQ7O@4S6C3N8WPFKSP;SRD6VW@94BBH8XCT','P]I52Y46F?@RMOOF6;FWDTO`7FIT]R:]ELHD[CNLDSHC7FPBYOOJXLZSBV^5C^AAF6J5BCKE4V9==@H=4C]GMZXPNM','ECIQWH>?MK=ARGI0WVJNIBZFCFVJHFIUYJ:2?2WWZBNBWTPFNQPLLBFP9R_','E<<T9UUF2?XM8TWS_','W[5E_U1J?YSOQISL1KD','M@V^`^8I','5UTEJUZIQJOJU_D6@V2DSVOIK@LUT^E?RTL>_Y9OT@SOPYR72VIJVMBWIVPF@TTBZ@8ZPBZL=LXZF`WM4V2?K>AT','PZ@PR6XN28JL`B','ZOHBSCRMZPOI`IVTSEZAIDAF7DS@1TT20AP9','QLDIOY[Y:JZR@OL__I^@FBO=O_?WOOR:2BE:QJC','BI^TGJ_N<H:7OW8XXITM@FBWDNJ=KA`X:9@BUY4UHKSHFP`EAWR9_QS^HR2AI39MGVXWVD]RUI46SHU=GXAX;RT765X:CU7M4XOD^S9JFZI=HTTS?C0CT','M@HGGFM43C7','@M`IHSJQ8HBTGOS`=VW]QBMLVWN`SP;E>EEXYKV1POHTOJQPGCPVR=TYZMGWABUQR07J8U::W4','N`ZN4P@9T[JW;FR6=FA4WP@APNPG[XQVIK4]F]2>EC>JEIOXC``;;?OHP') DEFAULT NULL,
  `COL2` tinyint DEFAULT NULL,
  `COL3` date DEFAULT NULL,
  KEY `U_M_COL4` (`COL1`,`COL2`) /*!80000 INVISIBLE */,
  KEY `U_M_COL5` (`COL3`,`COL2`) /*!80000 INVISIBLE */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin

data.csv Use|Split csv file

prepare stmt from 'SELECT * FROM IDT_MULTI15760STROBJSTROBJ WHERE col2 = ? AND COL2 * ? != ?;';
set @a=126, @b=126, @c=126;
execute stmt using @a,@b,@c;
set @a=-119, @b=-119, @c=-119;
execute stmt using @a,@b,@c;
set @a=93, @b=-110, @c=-78;
execute stmt using @a,@b,@c;
set @a=892849545565, @b=307794851912, @c=-1045704790071;
execute stmt using @a,@b,@c;

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

empty set

3. What did you see instead (Required)

Error 1815 (HY000): expression ne(mul(892849545565, 307794851912), -1045704790071) cannot be pushed down

4. What is your TiDB version? (Required)

Release Version: v8.5.0-alpha-91-g169210aaaa Edition: Community Git Commit Hash: 169210aaaaba599d555c689786305c4a297edd7c Git Branch: HEAD UTC Build Time: 2024-11-11 17:04:25 GoVersion: go1.23.2 Race Enabled: false Check Table Before Drop: false Store: tikv

apollodafoni commented 1 day ago

/severity major /sig sql-infra