Skip to content

Commit f285246

Browse files
committed
Revert "[sql/gis] PS-9121 Innodb fails to update spatial index"
This reverts commit c7767c9.
1 parent 34be415 commit f285246

File tree

4 files changed

+2
-22
lines changed

4 files changed

+2
-22
lines changed

sql/gis/rtree_support.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,6 @@ bool mbr_equal_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a,
144144
return result;
145145
}
146146

147-
bool mbr_equal_precise_cmp(rtr_mbr_t *mbr_a, rtr_mbr_t *mbr_b) {
148-
assert(mbr_a->xmin <= mbr_a->xmax && mbr_a->ymin <= mbr_a->ymax);
149-
assert(mbr_b->xmin <= mbr_b->xmax && mbr_b->ymin <= mbr_b->ymax);
150-
151-
return mbr_a->xmin == mbr_b->xmin && mbr_a->xmax == mbr_b->xmax &&
152-
mbr_a->ymin == mbr_b->ymin && mbr_a->ymax == mbr_b->ymax;
153-
}
154-
155147
bool mbr_intersect_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a,
156148
rtr_mbr_t *b) {
157149
try {

sql/gis/rtree_support.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,6 @@ bool mbr_contain_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a,
9292
bool mbr_equal_cmp(const dd::Spatial_reference_system *srs, rtr_mbr_t *a,
9393
rtr_mbr_t *b);
9494

95-
/// Checks if two MBRs are equal more precisely
96-
///
97-
/// For both MBRs, the coordinates of the MBR's minimum corners must be smaller
98-
/// than or equal to the corresponding coordinates of the maximum corner.
99-
///
100-
/// @param[in] mbr_a The first MBR.
101-
/// @param[in] mbr_b The second MBR.
102-
///
103-
/// @retval true The two MBRs are equal.
104-
/// @retval false The two MBRs aren't equal.
105-
bool mbr_equal_precise_cmp(rtr_mbr_t *mbr_a, rtr_mbr_t *mbr_b);
106-
10795
/// Checks if two MBRs intersect each other
10896
///
10997
/// @param[in] srs Spatial reference system.

storage/innobase/row/row0sel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5705,7 +5705,7 @@ dberr_t row_search_mvcc(byte *buf, page_cur_mode_t mode,
57055705
UT_LOCATION_HERE, &heap);
57065706
rtr_get_mbr_from_rec(rec, index_offsets, &index_mbr);
57075707

5708-
if (mbr_equal_precise_cmp(&clust_mbr, &index_mbr)) {
5708+
if (mbr_equal_cmp(index->rtr_srs.get(), &clust_mbr, &index_mbr)) {
57095709
*is_dup_rec = true;
57105710
}
57115711
}

storage/innobase/row/row0upd.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ bool row_upd_changes_ord_field_binary_func(dict_index_t *index,
15801580
mem_heap_free(temp_heap);
15811581
}
15821582

1583-
if (!mbr_equal_precise_cmp(old_mbr, new_mbr)) {
1583+
if (!mbr_equal_cmp(index->rtr_srs.get(), old_mbr, new_mbr)) {
15841584
return (true);
15851585
} else {
15861586
continue;

0 commit comments

Comments
 (0)