tidb作为mysql从库,语句执行失败 ERROR 1105 (HY000): runtime error: invalid memory address or nil pointer dereference

select id from t_vod_record_detail where play_id = ‘9EA92BE978274A90A06BE35C393B113A’;

麻烦提供一下 TiDB 的版本号( select tidb_version() ) , 对应的表结构以及一些用于复现的数据(最好是 insert 的 sql),用于测试复现问题。

%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20201021141122 t_vod_record_detail(2).sql (198.9 KB)

在本地的环境测试了一下 v4.0.4 以及 v4.0.7 的版本暂时无法复现,建议在另外的机器上面再部署一个 TiDB 节点进行测试。

MySQL [test]> select id from t_vod_record_detail limit 3;
+-------------+
| id          |
+-------------+
| 90001763249 |
| 90001763250 |
| 90001763251 |
+-------------+
3 rows in set (0.00 sec)

MySQL [test]> select id from t_vod_record_detail where play_id = '9EA92BE978274A90A06BE35C393B113A';
+--------------------+
| id                 |
+--------------------+
| 525347563188944896 |
+--------------------+
1 row in set (0.01 sec)

MySQL [test]> select tidb_version();
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                                      |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v4.0.4
Edition: Community
Git Commit Hash: c61fc7247e9f6bc773761946d5b5294d3f2699a5
Git Branch: HEAD
UTC Build Time: 2020-10-21 06:48:32
GoVersion: go1.13.11
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MySQL [test]> show create table t_vod_record_detail;
+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table               | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| t_vod_record_detail | CREATE TABLE `t_vod_record_detail` (
`ID` bigint(20) NOT NULL,
`ORDER_ID` bigint(20) NOT NULL,
`REPORT_ID` bigint(20) NOT NULL,
`VOD_ID` bigint(20) NOT NULL,
`TIME_ID` bigint(20) NOT NULL,
`USER_ID` bigint(20) NOT NULL,
`USER_AGENCY_ID` bigint(20) DEFAULT NULL,
`START_TIME` datetime DEFAULT NULL,
`END_TIME` datetime DEFAULT NULL,
`platform` varchar(20) DEFAULT 'zj',
`old_id` bigint(20) DEFAULT NULL,
`IP` varchar(100) DEFAULT NULL,
`MAC` varchar(100) DEFAULT NULL,
`play_id` varchar(32) DEFAULT NULL,
PRIMARY KEY (`ID`),
KEY `IDX_T_VOD_RECORD_DETAIL_ORDERID` (`ORDER_ID`),
KEY `IDX_T_VOD_RECORD_DETAIL_VODID` (`VOD_ID`),
KEY `IDX_T_VOD_RECORD_DETAIL_TIMEID` (`TIME_ID`),
KEY `IDX_T_VOD_RECORD_DETAIL_USERID` (`USER_ID`),
KEY `IDX_T_VOD_RECORD_DETAIL_REPORTID` (`REPORT_ID`),
KEY `IDX_T_VOD_RECORD_DETAIL_STARTTIME` (`START_TIME`),
KEY `IDX_T_VOD_RECORD_DETAIL_PLAY_ID` (`play_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
+---------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)