@@ -668,6 +668,7 @@ dict_sys_tables_rec_read(
668
668
ut_ad (len == 6 || len == UNIV_SQL_NULL);
669
669
trx_id_t id = len == 6 ? trx_read_trx_id (field) : 0 ;
670
670
if (id && trx_sys.find (nullptr , id, false )) {
671
+ const auto savepoint = mtr->get_savepoint ();
671
672
heap = mem_heap_create (1024 );
672
673
dict_index_t * index = UT_LIST_GET_FIRST (
673
674
dict_sys.sys_tables ->indexes );
@@ -677,6 +678,7 @@ dict_sys_tables_rec_read(
677
678
row_vers_build_for_semi_consistent_read (
678
679
nullptr , rec, mtr, index, &offsets, &heap,
679
680
heap, &old_vers, nullptr );
681
+ mtr->rollback_to_savepoint (savepoint);
680
682
rec = old_vers;
681
683
if (!rec) {
682
684
mem_heap_free (heap);
@@ -1074,6 +1076,7 @@ dict_load_column_low(
1074
1076
const trx_id_t trx_id = trx_read_trx_id (field);
1075
1077
1076
1078
if (trx_id && mtr && trx_sys.find (nullptr , trx_id, false )) {
1079
+ const auto savepoint = mtr->get_savepoint ();
1077
1080
dict_index_t * index = UT_LIST_GET_FIRST (
1078
1081
dict_sys.sys_columns ->indexes );
1079
1082
rec_offs* offsets = rec_get_offsets (
@@ -1082,6 +1085,7 @@ dict_load_column_low(
1082
1085
row_vers_build_for_semi_consistent_read (
1083
1086
nullptr , rec, mtr, index, &offsets, &heap,
1084
1087
heap, &old_vers, nullptr );
1088
+ mtr->rollback_to_savepoint (savepoint);
1085
1089
rec = old_vers;
1086
1090
if (!old_vers) {
1087
1091
return dict_load_column_none;
@@ -1618,6 +1622,7 @@ dict_load_field_low(
1618
1622
if (!trx_id) {
1619
1623
ut_ad (!rec_get_deleted_flag (rec, 0 ));
1620
1624
} else if (mtr && trx_sys.find (nullptr , trx_id, false )) {
1625
+ const auto savepoint = mtr->get_savepoint ();
1621
1626
dict_index_t * sys_field = UT_LIST_GET_FIRST (
1622
1627
dict_sys.sys_fields ->indexes );
1623
1628
rec_offs* offsets = rec_get_offsets (
@@ -1626,6 +1631,7 @@ dict_load_field_low(
1626
1631
row_vers_build_for_semi_consistent_read (
1627
1632
nullptr , rec, mtr, sys_field, &offsets, &heap,
1628
1633
heap, &old_vers, nullptr );
1634
+ mtr->rollback_to_savepoint (savepoint);
1629
1635
rec = old_vers;
1630
1636
if (!old_vers || rec_get_deleted_flag (rec, 0 )) {
1631
1637
return dict_load_field_none;
@@ -1828,6 +1834,7 @@ dict_load_index_low(
1828
1834
ut_ad (!rec_get_deleted_flag (rec, 0 ));
1829
1835
} else if (!mtr) {
1830
1836
} else if (trx_sys.find (nullptr , trx_id, false )) {
1837
+ const auto savepoint = mtr->get_savepoint ();
1831
1838
dict_index_t * sys_index = UT_LIST_GET_FIRST (
1832
1839
dict_sys.sys_indexes ->indexes );
1833
1840
rec_offs* offsets = rec_get_offsets (
@@ -1836,6 +1843,7 @@ dict_load_index_low(
1836
1843
row_vers_build_for_semi_consistent_read (
1837
1844
nullptr , rec, mtr, sys_index, &offsets, &heap,
1838
1845
heap, &old_vers, nullptr );
1846
+ mtr->rollback_to_savepoint (savepoint);
1839
1847
rec = old_vers;
1840
1848
if (!old_vers || rec_get_deleted_flag (rec, 0 )) {
1841
1849
return dict_load_index_none;
@@ -2700,13 +2708,15 @@ static void dict_load_foreign_cols(dict_foreign_t *foreign, trx_id_t trx_id)
2700
2708
const trx_id_t id = trx_read_trx_id (field);
2701
2709
if (!id) {
2702
2710
} else if (id != trx_id && trx_sys.find (nullptr , id, false )) {
2711
+ const auto savepoint = mtr.get_savepoint ();
2703
2712
rec_offs* offsets = rec_get_offsets (
2704
2713
rec, sys_index, nullptr , true , ULINT_UNDEFINED,
2705
2714
&heap);
2706
2715
const rec_t * old_vers;
2707
2716
row_vers_build_for_semi_consistent_read (
2708
2717
nullptr , rec, &mtr, sys_index, &offsets, &heap,
2709
2718
heap, &old_vers, nullptr );
2719
+ mtr.rollback_to_savepoint (savepoint);
2710
2720
rec = old_vers;
2711
2721
if (!rec || rec_get_deleted_flag (rec, 0 )) {
2712
2722
goto next;
@@ -2874,12 +2884,14 @@ dict_load_foreign(
2874
2884
const trx_id_t tid = trx_read_trx_id (field);
2875
2885
2876
2886
if (tid && tid != trx_id && trx_sys.find (nullptr , tid, false )) {
2887
+ const auto savepoint = mtr.get_savepoint ();
2877
2888
rec_offs* offsets = rec_get_offsets (
2878
2889
rec, sys_index, nullptr , true , ULINT_UNDEFINED, &heap);
2879
2890
const rec_t * old_vers;
2880
2891
row_vers_build_for_semi_consistent_read (
2881
2892
nullptr , rec, &mtr, sys_index, &offsets, &heap,
2882
2893
heap, &old_vers, nullptr );
2894
+ mtr.rollback_to_savepoint (savepoint);
2883
2895
rec = old_vers;
2884
2896
if (!rec) {
2885
2897
goto not_found;
0 commit comments