2021/07/15 06:21:07 run test 229ce513-ecc4-4fd1-af65-16bd7680f5a9 2021/07/15 06:21:07 test(229ce513-ecc4-4fd1-af65-16bd7680f5a9) failed at txn #0: errors mismatch: Error 1105: runtime error: invalid memory address or nil pointer dereference <> @(229ce513-ecc4-4fd1-af65-16bd7680f5a9,1) "select (select t2.c_timestamp from t2 where t2.c_timestamp != t1.c_timestamp and t2.c_int = 8 order by t2.c_timestamp limit 1 for update) x from t1 /* force-unordered */" Error: errors mismatch: Error 1105: runtime error: invalid memory address or nil pointer dereference <> @(229ce513-ecc4-4fd1-af65-16bd7680f5a9,1) "select (select t2.c_timestamp from t2 where t2.c_timestamp != t1.c_timestamp and t2.c_int = 8 order by t2.c_timestamp limit 1 for update) x from t1 /* force-unordered */" [root@localhost tp-test]# ./tp-test --store 'root:@tcp(172.16.5.73:34430)/tptest' why 229ce513-ecc4-4fd1-af65-16bd7680f5a9 # [Failed] 229ce513-ecc4-4fd1-af65-16bd7680f5a9 (2021-07-15T06:21:04Z,3s) > errors mismatch: Error 1105: runtime error: invalid memory address or nil pointer dereference <> @(229ce513-ecc4-4fd1-af65-16bd7680f5a9,1) "select (select t2.c_timestamp from t2 where t2.c_timestamp != t1.c_timestamp and t2.c_int = 8 order by t2.c_timestamp limit 1 for update) x from t1 /* force-unordered */" ## last query 1: select (select t2.c_timestamp from t2 where t2.c_timestamp != t1.c_timestamp and t2.c_int = 8 order by t2.c_timestamp limit 1 for update) x from t1 /* force-unordered */ ``` **A** Error: Error 1105: runtime error: invalid memory address or nil pointer dereference **B** +---------------------+ | X | +---------------------+ | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | | 2020-05-29 06:38:57 | +---------------------+ ``` ## history ```sql -- init create table t1 (c_int int, c_str varchar(40), c_datetime datetime, c_timestamp timestamp, c_double double, c_decimal decimal(12, 6), primary key (c_int, c_str) , key(c_decimal) , key(c_datetime) , key(c_timestamp)) partition by range (c_int) ( partition p0 values less than (10), partition p1 values less than (20), partition p2 values less than (30), partition p3 values less than maxvalue) ; create table t2 (c_int int, c_str varchar(40), c_datetime datetime, c_timestamp timestamp, c_double double, c_decimal decimal(12, 6), primary key (c_int) , key(c_int) , key(c_str) , key(c_decimal) , key(c_datetime) , key(c_timestamp)) partition by hash (c_int) partitions 4 ; insert into t1 values (1, 'reverent perlman', '2020-05-01 08:35:12', '2020-01-29 19:21:27', 63.075664, 2.698), (2, 'elated dewdney', '2020-03-17 00:37:41', '2020-02-19 12:53:03', 37.232917, 4.389), (3, 'mystifying montalcini', '2020-06-15 02:47:23', '2020-03-28 04:29:33', 48.848010, 4.402), (4, 'dreamy goldberg', '2020-01-21 22:51:37', '2020-05-14 03:04:37', 64.269693, 3.965), (5, 'elastic cori', '2020-05-27 20:47:06', '2020-05-02 10:42:09', 16.139909, 7.748); insert into t1 values (6, 'jovial carver', '2020-02-07 13:29:20', '2020-02-14 08:54:34', 32.976430, 2.525), (7, 'priceless euclid', '2020-05-10 15:24:37', '2020-01-19 11:03:02', 21.089906, 1.186), (8, 'jovial cannon', '2020-05-21 11:33:07', '2020-05-24 23:30:16', 76.129178, 0.247), (9, 'heuristic shaw', '2020-06-06 06:36:21', '2020-01-21 08:48:54', 39.819341, 4.660), (10, 'fervent hawking', '2020-03-20 12:30:02', '2020-04-16 00:49:22', 64.455862, 9.084); insert into t2 values (1, 'naughty cori', '2020-01-11 21:37:01', '2020-04-17 01:30:58', 15.222606, 8.477), (2, 'great haibt', '2020-02-24 00:57:14', '2020-02-07 13:16:15', 53.302365, 9.258), (3, 'affectionate shockley', '2020-03-18 20:35:03', '2020-03-06 16:02:09', 5.258367, 9.722), (4, 'reverent tharp', '2020-05-23 13:49:44', '2020-02-21 15:38:59', 63.171587, 0.047), (5, 'reverent chandrasekhar', '2020-01-20 09:43:37', '2020-03-25 08:59:29', 17.728195, 9.304); insert into t2 values (6, 'reverent euler', '2020-06-01 06:46:46', '2020-05-21 13:54:14', 42.398771, 2.777), (7, 'magical blackwell', '2020-04-22 00:10:00', '2020-06-29 21:26:51', 98.298156, 1.475), (8, 'kind cohen', '2020-01-26 21:41:45', '2020-05-29 06:38:57', 58.768768, 8.001), (9, 'adoring chebyshev', '2020-01-23 01:58:57', '2020-03-16 18:58:47', 9.663704, 5.096), (10, 'vigilant fermi', '2020-01-02 02:12:11', '2020-02-25 05:18:37', 10.657005, 1.090); -- txn:0 begin; select * from t1, t2 where t1.c_datetime >= t2.c_datetime or t1.c_int = t2.c_int and t1.c_str < t2.c_str ; select (select t2.c_timestamp from t2 where t2.c_timestamp != t1.c_timestamp and t2.c_int = 8 order by t2.c_timestamp limit 1 for update) x from t1 /* force-unordered */; ``` [root@localhost tp-test]#