Skip to content

Commit 44298e4

Browse files
committed
Merge 10.2 into 10.3
Also, clean up the test innodb_gis.geometry a little further.
2 parents dd68db0 + 9f7b862 commit 44298e4

File tree

81 files changed

+2792
-2812
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2792
-2812
lines changed

include/byte_order_generic.h

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2020, MariaDB Corporation.
23
34
This program is free software; you can redistribute it and/or modify
45
it under the terms of the GNU General Public License as published by
@@ -17,7 +18,7 @@
1718
Endianness-independent definitions for architectures other
1819
than the x86 architecture.
1920
*/
20-
#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) +\
21+
#define sint2korr(A) (int16) (((int16) ((uchar) (A)[0])) |\
2122
((int16) ((int16) (A)[1]) << 8))
2223
#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \
2324
(((uint32) 255L << 24) | \
@@ -27,38 +28,38 @@
2728
(((uint32) (uchar) (A)[2]) << 16) |\
2829
(((uint32) (uchar) (A)[1]) << 8) | \
2930
((uint32) (uchar) (A)[0])))
30-
#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) +\
31-
(((int32) ((uchar) (A)[1]) << 8)) +\
32-
(((int32) ((uchar) (A)[2]) << 16)) +\
31+
#define sint4korr(A) (int32) (((int32) ((uchar) (A)[0])) |\
32+
(((int32) ((uchar) (A)[1]) << 8)) |\
33+
(((int32) ((uchar) (A)[2]) << 16)) |\
3334
(((int32) ((int16) (A)[3]) << 24)))
3435
#define sint8korr(A) (longlong) uint8korr(A)
35-
#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) +\
36+
#define uint2korr(A) (uint16) (((uint16) ((uchar) (A)[0])) |\
3637
((uint16) ((uchar) (A)[1]) << 8))
37-
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
38-
(((uint32) ((uchar) (A)[1])) << 8) +\
38+
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) |\
39+
(((uint32) ((uchar) (A)[1])) << 8) |\
3940
(((uint32) ((uchar) (A)[2])) << 16))
40-
#define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
41-
(((uint32) ((uchar) (A)[1])) << 8) +\
42-
(((uint32) ((uchar) (A)[2])) << 16) +\
41+
#define uint4korr(A) (uint32) (((uint32) ((uchar) (A)[0])) |\
42+
(((uint32) ((uchar) (A)[1])) << 8) |\
43+
(((uint32) ((uchar) (A)[2])) << 16) |\
4344
(((uint32) ((uchar) (A)[3])) << 24))
44-
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
45-
(((uint32) ((uchar) (A)[1])) << 8) +\
46-
(((uint32) ((uchar) (A)[2])) << 16) +\
47-
(((uint32) ((uchar) (A)[3])) << 24)) +\
45+
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) |\
46+
(((uint32) ((uchar) (A)[1])) << 8) |\
47+
(((uint32) ((uchar) (A)[2])) << 16) |\
48+
(((uint32) ((uchar) (A)[3])) << 24)) |\
4849
(((ulonglong) ((uchar) (A)[4])) << 32))
49-
#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
50-
(((uint32) ((uchar) (A)[1])) << 8) + \
51-
(((uint32) ((uchar) (A)[2])) << 16) + \
52-
(((uint32) ((uchar) (A)[3])) << 24)) + \
53-
(((ulonglong) ((uchar) (A)[4])) << 32) + \
50+
#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) | \
51+
(((uint32) ((uchar) (A)[1])) << 8) | \
52+
(((uint32) ((uchar) (A)[2])) << 16) | \
53+
(((uint32) ((uchar) (A)[3])) << 24)) | \
54+
(((ulonglong) ((uchar) (A)[4])) << 32) | \
5455
(((ulonglong) ((uchar) (A)[5])) << 40))
55-
#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
56-
(((uint32) ((uchar) (A)[1])) << 8) +\
57-
(((uint32) ((uchar) (A)[2])) << 16) +\
58-
(((uint32) ((uchar) (A)[3])) << 24)) +\
59-
(((ulonglong) (((uint32) ((uchar) (A)[4])) +\
60-
(((uint32) ((uchar) (A)[5])) << 8) +\
61-
(((uint32) ((uchar) (A)[6])) << 16) +\
56+
#define uint8korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) |\
57+
(((uint32) ((uchar) (A)[1])) << 8) |\
58+
(((uint32) ((uchar) (A)[2])) << 16) |\
59+
(((uint32) ((uchar) (A)[3])) << 24)) |\
60+
(((ulonglong) (((uint32) ((uchar) (A)[4])) |\
61+
(((uint32) ((uchar) (A)[5])) << 8) |\
62+
(((uint32) ((uchar) (A)[6])) << 16) |\
6263
(((uint32) ((uchar) (A)[7])) << 24))) <<\
6364
32))
6465
#define int2store(T,A) do { uint def_temp= (uint) (A) ;\

include/byte_order_generic_x86.h

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2020, MariaDB Corporation.
23
34
This program is free software; you can redistribute it and/or modify
45
it under the terms of the GNU General Public License as published by
@@ -27,20 +28,20 @@
2728
((uint32) (uchar) (A)[0])))
2829
#define sint4korr(A) (*((const long *) (A)))
2930
#define uint2korr(A) (*((const uint16 *) (A)))
30-
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
31-
(((uint32) ((uchar) (A)[1])) << 8) +\
31+
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) |\
32+
(((uint32) ((uchar) (A)[1])) << 8) |\
3233
(((uint32) ((uchar) (A)[2])) << 16))
3334
#define uint4korr(A) (*((const uint32 *) (A)))
34-
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
35-
(((uint32) ((uchar) (A)[1])) << 8) +\
36-
(((uint32) ((uchar) (A)[2])) << 16) +\
37-
(((uint32) ((uchar) (A)[3])) << 24)) +\
35+
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) |\
36+
(((uint32) ((uchar) (A)[1])) << 8) |\
37+
(((uint32) ((uchar) (A)[2])) << 16) |\
38+
(((uint32) ((uchar) (A)[3])) << 24)) |\
3839
(((ulonglong) ((uchar) (A)[4])) << 32))
39-
#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) + \
40-
(((uint32) ((uchar) (A)[1])) << 8) + \
41-
(((uint32) ((uchar) (A)[2])) << 16) + \
42-
(((uint32) ((uchar) (A)[3])) << 24)) + \
43-
(((ulonglong) ((uchar) (A)[4])) << 32) + \
40+
#define uint6korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) | \
41+
(((uint32) ((uchar) (A)[1])) << 8) | \
42+
(((uint32) ((uchar) (A)[2])) << 16) | \
43+
(((uint32) ((uchar) (A)[3])) << 24)) | \
44+
(((ulonglong) ((uchar) (A)[4])) << 32) | \
4445
(((ulonglong) ((uchar) (A)[5])) << 40))
4546
#define uint8korr(A) (*((const ulonglong *) (A)))
4647
#define sint8korr(A) (*((const longlong *) (A)))

include/byte_order_generic_x86_64.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2020, MariaDB Corporation.
23
34
This program is free software; you can redistribute it and/or modify
45
it under the terms of the GNU General Public License as published by
@@ -28,8 +29,8 @@
2829
((uint32) (uchar) (A)[0])))
2930
#define sint4korr(A) (int32) (*((int32 *) (A)))
3031
#define uint2korr(A) (uint16) (*((uint16 *) (A)))
31-
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
32-
(((uint32) ((uchar) (A)[1])) << 8) +\
32+
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) |\
33+
(((uint32) ((uchar) (A)[1])) << 8) |\
3334
(((uint32) ((uchar) (A)[2])) << 16))
3435
#define uint4korr(A) (uint32) (*((uint32 *) (A)))
3536

@@ -53,7 +54,7 @@ static inline ulonglong uint6korr(const void *p)
5354
#define int2store(T,A) do { uchar *pT= (uchar*)(T);\
5455
*((uint16*)(pT))= (uint16) (A);\
5556
} while (0)
56-
57+
5758
#define int3store(T,A) do { *(T)= (uchar) ((A));\
5859
*(T+1)=(uchar) (((uint) (A) >> 8));\
5960
*(T+2)=(uchar) (((A) >> 16));\

include/myisampack.h

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#define MYISAMPACK_INCLUDED
33

44
/* Copyright (c) 2000-2002, 2004 MySQL AB, 2009 Sun Microsystems, Inc.
5+
Copyright (c) 2020, MariaDB Corporation.
56
Use is subject to license terms.
67
78
This program is free software; you can redistribute it and/or modify
@@ -28,7 +29,7 @@
2829
#define mi_sint1korr(A) ((int8)(*A))
2930
#define mi_uint1korr(A) ((uint8)(*A))
3031

31-
#define mi_sint2korr(A) ((int16) (((int16) (((const uchar*) (A))[1])) +\
32+
#define mi_sint2korr(A) ((int16) (((int16) (((const uchar*) (A))[1])) |\
3233
((int16) ((int16) ((const char*) (A))[0]) << 8)))
3334
#define mi_sint3korr(A) ((int32) (((((const uchar*) (A))[0]) & 128) ? \
3435
(((uint32) 255L << 24) | \
@@ -38,58 +39,58 @@
3839
(((uint32) ((const uchar*) (A))[0]) << 16) |\
3940
(((uint32) ((const uchar*) (A))[1]) << 8) | \
4041
((uint32) ((const uchar*) (A))[2])))
41-
#define mi_sint4korr(A) ((int32) (((int32) (((const uchar*) (A))[3])) +\
42-
((int32) (((const uchar*) (A))[2]) << 8) +\
43-
((int32) (((const uchar*) (A))[1]) << 16) +\
42+
#define mi_sint4korr(A) ((int32) (((int32) (((const uchar*) (A))[3])) |\
43+
((int32) (((const uchar*) (A))[2]) << 8) |\
44+
((int32) (((const uchar*) (A))[1]) << 16) |\
4445
((int32) ((int16) ((const char*) (A))[0]) << 24)))
4546
#define mi_sint8korr(A) ((longlong) mi_uint8korr(A))
46-
#define mi_uint2korr(A) ((uint16) (((uint16) (((const uchar*) (A))[1])) +\
47+
#define mi_uint2korr(A) ((uint16) (((uint16) (((const uchar*) (A))[1])) |\
4748
((uint16) (((const uchar*) (A))[0]) << 8)))
48-
#define mi_uint3korr(A) ((uint32) (((uint32) (((const uchar*) (A))[2])) +\
49-
(((uint32) (((const uchar*) (A))[1])) << 8) +\
49+
#define mi_uint3korr(A) ((uint32) (((uint32) (((const uchar*) (A))[2])) |\
50+
(((uint32) (((const uchar*) (A))[1])) << 8) |\
5051
(((uint32) (((const uchar*) (A))[0])) << 16)))
51-
#define mi_uint4korr(A) ((uint32) (((uint32) (((const uchar*) (A))[3])) +\
52-
(((uint32) (((const uchar*) (A))[2])) << 8) +\
53-
(((uint32) (((const uchar*) (A))[1])) << 16) +\
52+
#define mi_uint4korr(A) ((uint32) (((uint32) (((const uchar*) (A))[3])) |\
53+
(((uint32) (((const uchar*) (A))[2])) << 8) |\
54+
(((uint32) (((const uchar*) (A))[1])) << 16) |\
5455
(((uint32) (((const uchar*) (A))[0])) << 24)))
5556

5657
#ifndef HAVE_mi_uint5korr
57-
#define mi_uint5korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[4])) +\
58-
(((uint32) (((const uchar*) (A))[3])) << 8) +\
59-
(((uint32) (((const uchar*) (A))[2])) << 16) +\
60-
(((uint32) (((const uchar*) (A))[1])) << 24)) +\
58+
#define mi_uint5korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[4])) |\
59+
(((uint32) (((const uchar*) (A))[3])) << 8) |\
60+
(((uint32) (((const uchar*) (A))[2])) << 16) |\
61+
(((uint32) (((const uchar*) (A))[1])) << 24)) |\
6162
(((ulonglong) (((const uchar*) (A))[0])) << 32))
6263
#endif /* HAVE_mi_uint5korr */
6364

6465
#ifndef HAVE_mi_uint6korr
65-
#define mi_uint6korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[5])) +\
66-
(((uint32) (((const uchar*) (A))[4])) << 8) +\
67-
(((uint32) (((const uchar*) (A))[3])) << 16) +\
68-
(((uint32) (((const uchar*) (A))[2])) << 24)) +\
69-
(((ulonglong) (((uint32) (((const uchar*) (A))[1])) +\
66+
#define mi_uint6korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[5])) |\
67+
(((uint32) (((const uchar*) (A))[4])) << 8) |\
68+
(((uint32) (((const uchar*) (A))[3])) << 16) |\
69+
(((uint32) (((const uchar*) (A))[2])) << 24)) |\
70+
(((ulonglong) (((uint32) (((const uchar*) (A))[1])) |\
7071
(((uint32) (((const uchar*) (A))[0]) << 8)))) <<\
7172
32))
7273
#endif /* HAVE_mi_uint6korr */
7374

7475
#ifndef HAVE_mi_uint7korr
75-
#define mi_uint7korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[6])) +\
76-
(((uint32) (((const uchar*) (A))[5])) << 8) +\
77-
(((uint32) (((const uchar*) (A))[4])) << 16) +\
78-
(((uint32) (((const uchar*) (A))[3])) << 24)) +\
79-
(((ulonglong) (((uint32) (((const uchar*) (A))[2])) +\
80-
(((uint32) (((const uchar*) (A))[1])) << 8) +\
76+
#define mi_uint7korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[6])) |\
77+
(((uint32) (((const uchar*) (A))[5])) << 8) |\
78+
(((uint32) (((const uchar*) (A))[4])) << 16) |\
79+
(((uint32) (((const uchar*) (A))[3])) << 24)) |\
80+
(((ulonglong) (((uint32) (((const uchar*) (A))[2])) |\
81+
(((uint32) (((const uchar*) (A))[1])) << 8) |\
8182
(((uint32) (((const uchar*) (A))[0])) << 16))) <<\
8283
32))
8384
#endif /* HAVE_mi_uint7korr */
8485

8586
#ifndef HAVE_mi_uint8korr
86-
#define mi_uint8korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[7])) +\
87-
(((uint32) (((const uchar*) (A))[6])) << 8) +\
88-
(((uint32) (((const uchar*) (A))[5])) << 16) +\
89-
(((uint32) (((const uchar*) (A))[4])) << 24)) +\
90-
(((ulonglong) (((uint32) (((const uchar*) (A))[3])) +\
91-
(((uint32) (((const uchar*) (A))[2])) << 8) +\
92-
(((uint32) (((const uchar*) (A))[1])) << 16) +\
87+
#define mi_uint8korr(A) ((ulonglong)(((uint32) (((const uchar*) (A))[7])) |\
88+
(((uint32) (((const uchar*) (A))[6])) << 8) |\
89+
(((uint32) (((const uchar*) (A))[5])) << 16) |\
90+
(((uint32) (((const uchar*) (A))[4])) << 24)) |\
91+
(((ulonglong) (((uint32) (((const uchar*) (A))[3])) |\
92+
(((uint32) (((const uchar*) (A))[2])) << 8) |\
93+
(((uint32) (((const uchar*) (A))[1])) << 16) |\
9394
(((uint32) (((const uchar*) (A))[0])) << 24))) <<\
9495
32))
9596
#endif /* HAVE_mi_uint8korr */

libmariadb

mysql-test/main/func_math.result

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,54 @@ STDDEV_SAMP(a)
967967
NULL
968968
DROP TABLE t1;
969969
#
970+
# MDEV-21977 main.func_math fails due to undefined behaviour
971+
#
972+
SELECT 9223372036854775808 DIV 1;
973+
9223372036854775808 DIV 1
974+
9223372036854775808
975+
SELECT 9223372036854775808 DIV -1;
976+
ERROR 22003: BIGINT UNSIGNED value is out of range in '9223372036854775808 DIV -1'
977+
SELECT -9223372036854775808 DIV 1;
978+
ERROR 22003: BIGINT value is out of range in '-9223372036854775808 DIV 1'
979+
SELECT -9223372036854775808 DIV -1;
980+
ERROR 22003: BIGINT value is out of range in '-9223372036854775808 DIV -1'
981+
SELECT 9223372036854775808 MOD 1;
982+
9223372036854775808 MOD 1
983+
0
984+
SELECT 9223372036854775808 MOD -1;
985+
9223372036854775808 MOD -1
986+
0
987+
SELECT -9223372036854775808 MOD 1;
988+
-9223372036854775808 MOD 1
989+
0
990+
SELECT -9223372036854775808 MOD -1;
991+
-9223372036854775808 MOD -1
992+
0
993+
SELECT 1 MOD 9223372036854775808;
994+
1 MOD 9223372036854775808
995+
1
996+
SELECT -1 MOD 9223372036854775808;
997+
-1 MOD 9223372036854775808
998+
-1
999+
SELECT 1 MOD -9223372036854775808;
1000+
1 MOD -9223372036854775808
1001+
1
1002+
SELECT -1 MOD -9223372036854775808;
1003+
-1 MOD -9223372036854775808
1004+
-1
1005+
SELECT 9223372036854775808 MOD 9223372036854775808;
1006+
9223372036854775808 MOD 9223372036854775808
1007+
0
1008+
SELECT 9223372036854775808 MOD -9223372036854775808;
1009+
9223372036854775808 MOD -9223372036854775808
1010+
0
1011+
SELECT -9223372036854775808 MOD 9223372036854775808;
1012+
-9223372036854775808 MOD 9223372036854775808
1013+
0
1014+
SELECT -9223372036854775808 MOD -9223372036854775808;
1015+
-9223372036854775808 MOD -9223372036854775808
1016+
0
1017+
#
9701018
# End of 10.1 tests
9711019
#
9721020
#

mysql-test/main/func_math.test

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,35 @@ INSERT INTO t1 VALUES (0);
688688
SELECT STDDEV_SAMP(a) FROM t1;
689689
DROP TABLE t1;
690690

691+
--echo #
692+
--echo # MDEV-21977 main.func_math fails due to undefined behaviour
693+
--echo #
694+
695+
SELECT 9223372036854775808 DIV 1;
696+
--error ER_DATA_OUT_OF_RANGE
697+
SELECT 9223372036854775808 DIV -1;
698+
--error ER_DATA_OUT_OF_RANGE
699+
SELECT -9223372036854775808 DIV 1;
700+
--error ER_DATA_OUT_OF_RANGE
701+
SELECT -9223372036854775808 DIV -1;
702+
703+
SELECT 9223372036854775808 MOD 1;
704+
SELECT 9223372036854775808 MOD -1;
705+
SELECT -9223372036854775808 MOD 1;
706+
SELECT -9223372036854775808 MOD -1;
707+
708+
SELECT 1 MOD 9223372036854775808;
709+
SELECT -1 MOD 9223372036854775808;
710+
SELECT 1 MOD -9223372036854775808;
711+
SELECT -1 MOD -9223372036854775808;
712+
713+
SELECT 9223372036854775808 MOD 9223372036854775808;
714+
SELECT 9223372036854775808 MOD -9223372036854775808;
715+
SELECT -9223372036854775808 MOD 9223372036854775808;
716+
SELECT -9223372036854775808 MOD -9223372036854775808;
717+
718+
719+
691720
--echo #
692721
--echo # End of 10.1 tests
693722
--echo #

mysql-test/main/gis-rtree.result

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,13 +1576,13 @@ INSERT INTO t1 VALUES(GeomFromText('LINESTRING(2 2, 3 3)'));
15761576
SELECT COUNT(*) FROM t1 IGNORE INDEX(l) WHERE MBRContains(l, GEOMFROMTEXT('POINT(0 0)'));
15771577
COUNT(*)
15781578
1
1579-
SELECT COUNT(*) FROM t1 IGNORE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0 0)'), l);
1579+
SELECT COUNT(*) FROM t1 IGNORE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0.5 0.5)'), l);
15801580
COUNT(*)
15811581
1
15821582
SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRContains(l, GEOMFROMTEXT('POINT(0 0)'));
15831583
COUNT(*)
15841584
1
1585-
SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0 0)'), l);
1585+
SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0.5 0.5)'), l);
15861586
COUNT(*)
15871587
1
15881588
DROP TABLE t1;

mysql-test/main/gis-rtree.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -964,10 +964,10 @@ INSERT INTO t1 VALUES(GeomFromText('LINESTRING(1 1, 2 2)'));
964964
INSERT INTO t1 VALUES(GeomFromText('LINESTRING(2 2, 3 3)'));
965965

966966
SELECT COUNT(*) FROM t1 IGNORE INDEX(l) WHERE MBRContains(l, GEOMFROMTEXT('POINT(0 0)'));
967-
SELECT COUNT(*) FROM t1 IGNORE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0 0)'), l);
967+
SELECT COUNT(*) FROM t1 IGNORE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0.5 0.5)'), l);
968968

969969
SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRContains(l, GEOMFROMTEXT('POINT(0 0)'));
970-
SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0 0)'), l);
970+
SELECT COUNT(*) FROM t1 FORCE INDEX(l) WHERE MBRWithin(GEOMFROMTEXT('POINT(0.5 0.5)'), l);
971971

972972
DROP TABLE t1;
973973

mysql-test/main/gis.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ NULL
16831683
#
16841684
create table t1 (pt point);
16851685
insert into t1 values(Geomfromtext('POLYGON((1 1, 2 2, 2 1, 1 1))'));
1686-
ERROR 22007: Incorrect POINT value: 'POLYGON' for column `test`.`t1`.`pt` at row 1
1686+
ERROR 22007: Incorrect POINT value: 'POLYGON((1 1,2 2,2 1,1 1))' for column `test`.`t1`.`pt` at row 1
16871687
drop table t1;
16881688
SELECT st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100));
16891689
st_astext(ST_Buffer(ST_PolygonFromText('POLYGON((3 5, 2 4, 2 5, 3 5))'), -100))

0 commit comments

Comments
 (0)