mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
84 lines
294 KiB
PHP
84 lines
294 KiB
PHP
|
|
||
|
eval CREATE TABLE t1 (
|
||
|
p INT NOT NULL AUTO_INCREMENT,
|
||
|
g LINESTRING NOT NULL,
|
||
|
PRIMARY KEY(p)
|
||
|
) ENGINE=InnoDB ROW_FORMAT=$row_format;
|
||
|
|
||
|
if ($index == 'spatial_none') {
|
||
|
eval ALTER TABLE t1 ADD INDEX prefix_idx (g($prefix_size));
|
||
|
}
|
||
|
|
||
|
if ($index == 'spatial_only') {
|
||
|
ALTER TABLE t1 ADD SPATIAL INDEX spatial_idx (g);
|
||
|
}
|
||
|
|
||
|
if ($index == 'spatial_mixed') {
|
||
|
ALTER TABLE t1 ADD SPATIAL INDEX spatial_idx (g);
|
||
|
eval ALTER TABLE t1 ADD INDEX prefix_idx (g($prefix_size));
|
||
|
}
|
||
|
|
||
|
INSERT INTO t1(g) VALUES(ST_linefromtext('linestring(-5 -576,0 -576,0 -571,0 -571,5 -568,6 -564,6 -565,6 -563)'));
|
||
|
INSERT INTO t1(g) VALUES(ST_linefromtext(concat('linestring','(18 106,19 106,24 111,27 108,32 104,37 107,42 107,44 112,44 116,40 118,43 114,46 114,42 118,44 123,45 123,49 123,53 119,50 123,50 124,54 126,58 125,59 126,64 127,65 127,69 131,74 132,75 135,78 139,2078 141,2075 143,2077 143,2079 143,2084 143,2085 147,2090 -1853,2086 -1852,2086 -1856,2089 -1852,2093 -1850,2090 -1851,2090 -1852,2091 -1851,2092 -1850,2097 -1847,2102 -1848,2100 -1852,2100 -1852,7100 -1851,7103 -1850,7104 -1847,7109 -1842,65 127,67 131,66 131,61 132,61 133,62 137,65 1137,2065 1135,2061 1135,2064 1135,5064 1135,5066 1135,5070 1136,5070 1141,5071 1138,5074 1141,5075 1141,5074 1137,5076 1137,5071 1139,5066 1142,5065 2142,5068 2147,5073 2151,5069 2156,5071 2157,5072 2162,5074 2165,5069 2169,5072 2169,5076 2173,5074 2169,5078 2169,5076 2170,76 2175,74 2179,75 2184,80 2188,83 2190,87 2189,84 2193,87 2189,86 2190,87 2195,87 2200,87 1200,85 1202,86 1199,87 1200,87 1201,91 1206,92 1204,94 1204,98 1206,102 1208,105 1211,102 1216,105 1220,109 1224,110 1224,114 1225,117 1224,118 1229,117 1232,122 1237,123 1236,120 1235,124 1237,121 1236,122 1240,126 1244,127 1246,126 1249,125 5249,123 5251,127 5251,131 5251,135 5256,138 5257,135 5257,139 5257,138 5258,141 5260,146 5260,146 5260,143 10260,147 10265,151 10270,156 10266,157 10269,162 10273,166 12273,168 12274,163 12270,168 12275,170 12277,170 12277,-3830 12277,-3825 12277,-3824 12278,-3825 12276,-3825 12278,-3822 12277,-3825 12275,-3829 12278,-3828 12275,-3824 12280,-3827 12280,-3826 12282,-3822 12283,-3822 12286,-3820 12288,-3818 12289,-3816 12294,-3817 12297,-3819 12300,-3816 12297,-3813 12295,-3811 12299,-3811 12297,-3806 12298,-3806 12298,-3804 12301,-3801 12306,-3803 17306,-3803 17306,-3798 17306,-3803 17310,-3801 17314,-3798 17317,-3797 17317,-797 17321,-797 17323,-796 17325,-793 17326,-792 17322,-789 17327,-784 17331,-780 17335,-776 17339,-774 17339,-771 17342,-770 17345,-765 17348,-765 17349,-763 17353,-760 17350,-760 22350,-756 22346,-752 22349,-748 22352,-752 22348,-748 22347,-746 22345,-745 27345,-743 27346,257 27350,260 27349,261 27352,266 27348,266 22348,269 22347,271 22347,272 22347,273 22348,273 22352,278 22348,279 22344,282 22345,282 22342,283 22347,283 22347,288 22349,292 22347,292 22348,293 22348,298 22348,303 22351,306 22352,309 22352,308 22354,310 22356,311 22361,311 22358,311 22360,311 22360,315 22356,320 22358,325 22363,326 22366,321 22371,318 22373,318 22375,314 22375,316 22375,321 22376,321 22376,322 22372,32 104,36 109,40 114,40 113,40 117,44 119,49 123,49 126,49 129,53 133,50 137,50 139,49 137,48 138,43 138,42 139,46 142,46 138,41 139,45 141,4045 5141,4045 5146,4042 5147,4043 10147,4041 10150,4042 10152,4045 10152,4041 10156,4041 10152,4041 10152,4046 10153,4049 10156,4046 10155,4051 10157,4055 10159,4055 10160,4056 10161,4055 10166,4054 10169,4054 10172,4054 15172,4051 15176,4047 15177,4049 15174,4047 15176,4047 15176,4046 15177,4046 15180,4043 15184,4043 15187,4038 15190,4040 15194,4040 15199,4045 15196,4047 15197,4050 15200,4050 15204,4050 15208,4047 15212,4047 15215,4049 15216,4046 15218,4042 15223,4042 15228,4042 15232,4047 15235,4050 15236,4050 15239,4051 15243,4053 15243,4050 17243,4052 17243,4052 18243,4057 18247,4061 18249,4064 18249,4067 20249,4067 20250,4067 20255,4066 20259,4066 20259,4067 20255,4069 20256,4071 20258,4072 20254,4067 20257,4067 20260,4069 20265,4065 20267,4069 20266,4070 20267,4071 20264,4074 20259,4070 20264,4073 20260,4074 20263,4077 20268,4082 20271,4084 20273,4084 20277,4081 18277,4085 18279,4086 18276,4087 18273,4087 18275,4092 18277,4093 18279,4093 18280,4095 18280,4091 18283,4092 18281,4094 18283,4090 18287,4094 18287,138 5257,138 5255,138 5258,-1862 5254,-1860 5256,-1856 5258,-1851 5255,-1850 5260,-1847 5260,-1847 5263,-1847 5258,-1850 5257,-1850 5259,-1851 5257,-1855 5258,-1853 5261,-1849 5261,-1849 5258,-1849 5259,-1845 5264,-1847 5264,-1850 5268,-1852 5266,-1853 5270,-1856 5265,-1852 5262,-1847 5263,-1842 5263,-1842 5260,-1842 5265,-1841 5265,-1844 5265,-1842 5270,-1837 5274,-1838 5279,-1843 5275,-1842 5280,-1838 5281,-1838 5285,-1833 5285,-1828 52
|
||
|
INSERT INTO t1(g) VALUES (ST_linefromtext(concat('linestring','(20 110, 21 110, 26 115, 29 112, 34 108, 39 111, 44 111, 46 116, 46 120, 42 122, 45 118, 48 118, 44 122, 46 127, 47 127, 51 127, 55 123, 52 127, 52 128, 56 130, 60 129, 61 130, 66 131, 67 131, 71 135, 76 136, 77 139, 80 143, 2080 145, 2077 147, 2079 147, 2081 147, 2086 147, 2087 151, 2092 -1849, 2088 -1848, 2088 -1852, 2091 -1848, 2095 -1846, 2092 -1847, 2092 -1848, 2093 -1847, 2094 -1846, 2099 -1843, 2104 -1844, 2102 -1848, 2102 -1848, 7102 -1847, 7105 -1846, 7106 -1843, 7111 -1838, 67 131, 69 135, 68 135, 63 136, 63 137, 64 141, 67 1141, 2067 1139, 2063 1139, 2066 1139, 5066 1139, 5068 1139, 5072 1140, 5072 1145, 5073 1142, 5076 1145, 5077 1145, 5076 1141, 5078 1141, 5073 1143, 5068 1146, 5067 2146, 5070 2151, 5075 2155, 5071 2160, 5073 2161, 5074 2166, 5076 2169, 5071 2173, 5074 2173, 5078 2177, 5076 2173, 5080 2173, 5078 2174, 78 2179, 76 2183, 77 2188, 82 2192, 85 2194, 89 2193, 86 2197, 89 2193, 88 2194, 89 2199, 89 2204, 89 1204, 87 1206, 88 1203, 89 1204, 89 1205, 93 1210, 94 1208, 96 1208, 100 1210, 104 1212, 107 1215, 104 1220, 107 1224, 111 1228, 112 1228, 116 1229, 119 1228, 120 1233, 119 1236, 124 1241, 125 1240, 122 1239, 126 1241, 123 1240, 124 1244, 128 1248, 129 1250, 128 1253, 127 5253, 125 5255, 129 5255, 133 5255, 137 5260, 140 5261, 137 5261, 141 5261, 140 5262, 143 5264, 148 5264, 148 5264, 145 10264, 149 10269, 153 10274, 158 10270, 159 10273, 164 10277, 168 12277, 170 12278, 165 12274, 170 12279, 172 12281, 172 12281, -3828 12281, -3823 12281, -3822 12282, -3823 12280, -3823 12282, -3820 12281, -3823 12279, -3827 12282, -3826 12279, -3822 12284, -3825 12284, -3824 12286, -3820 12287, -3820 12290, -3818 12292, -3816 12293, -3814 12298, -3815 12301, -3817 12304, -3814 12301, -3811 12299, -3809 12303, -3809 12301, -3804 12302, -3804 12302, -3802 12305, -3799 12310, -3801 17310, -3801 17310, -3796 17310, -3801 17314, -3799 17318, -3796 17321, -3795 17321, -795 17325, -795 17327, -794 17329, -791 17330, -790 17326, -787 17331, -782 17335, -778 17339, -774 17343, -772 17343, -769 17346, -768 17349, -763 17352, -763 17353, -761 17357, -758 17354, -758 22354, -754 22350, -750 22353, -746 22356, -750 22352, -746 22351, -744 22349, -743 27349, -741 27350, 259 27354, 262 27353, 263 27356, 268 27352, 268 22352, 271 22351, 273 22351, 274 22351, 275 22352, 275 22356, 280 22352, 281 22348, 284 22349, 284 22346, 285 22351, 285 22351, 290 22353, 294 22351, 294 22352, 295 22352, 300 22352, 305 22355, 308 22356, 311 22356, 310 22358, 312 22360, 313 22365, 313 22362, 313 22364, 313 22364, 317 22360, 322 22362, 327 22367, 328 22370, 323 22375, 320 22377, 320 22379, 316 22379, 318 22379, 323 22380, 323 22380, 324 22376, 34 108, 38 113, 42 118, 42 117, 42 121, 46 123, 51 127, 51 130, 51 133, 55 137, 52 141, 52 143, 51 141, 50 142, 45 142, 44 143, 48 146, 48 142, 43 143, 47 145, 4047 5145, 4047 5150, 4044 5151, 4045 10151, 4043 10154, 4044 10156, 4047 10156, 4043 10160, 4043 10156, 4043 10156, 4048 10157, 4051 10160, 4048 10159, 4053 10161, 4057 10163, 4057 10164, 4058 10165, 4057 10170, 4056 10173, 4056 10176, 4056 15176, 4053 15180, 4049 15181, 4051 15178, 4049 15180, 4049 15180, 4048 15181, 4048 15184, 4045 15188, 4045 15191, 4040 15194, 4042 15198, 4042 15203, 4047 15200, 4049 15201, 4052 15204, 4052 15208, 4052 15212, 4049 15216, 4049 15219, 4051 15220, 4048 15222, 4044 15227, 4044 15232, 4044 15236, 4049 15239, 4052 15240, 4052 15243, 4053 15247, 4055 15247, 4052 17247, 4054 17247, 4054 18247, 4059 18251, 4063 18253, 4066 18253, 4069 20253, 4069 20254, 4069 20259, 4068 20263, 4068 20263, 4069 20259, 4071 20260, 4073 20262, 4074 20258, 4069 20261, 4069 20264, 4071 20269, 4067 20271, 4071 20270, 4072 20271, 4073 20268, 4076 20263, 4072 20268, 4075 20264, 4076 20267, 4079 20272, 4084 20275, 4086 20277, 4086 20281, 4083 18281, 4087 18283, 4088 18280, 4089 18277, 4089 18279, 4094 18281, 4095 18283, 4095 18284, 4097 18284, 4093 18287, 4094 18285, 4096 18287, 4092 18291, 4096 18291, 140 5261, 140 5259, 140 5262, -1860 5258, -1858 5260, -1854 5262, -1849 5259,
|
||
|
BEGIN;
|
||
|
|
||
|
DELETE FROM t1 WHERE p = 3;
|
||
|
UPDATE t1 SET g = ST_linefromtext('linestring(448 -689,453 -684,451 -679,453 -677,458 -681,463 -681,468 -678,470 -676,470 -678,468 -675,472 -675,472 -675,474 -674,479 -676,477 -675,473 -676,475 1324,479 1319,484 1322,483 1323,486 1323,491 1328,492 1325,496 1325,498 1325,501 1330,498 1331,500 1331,504 1330,508 1329,512 1332,513 1337,518 1339,518 1339,513 1344,513 1344,512 1346,514 1351,515 1353,519 1358,518 1362,522 1365,525 1360,526 1362,527 1362,528 1367,525 1371,528 1366,532 1369,536 1374,539 1377,543 1379,539 1381,541 1382,543 1383,546 1388,549 1393,554 1393,554 1395,554 1392,550 1394,550 1392,546 1394,549 1397,550 1393,549 1394,554 1390,554 1391,549 1396,551 1396,547 1400,547 1402,551 1407,554 1412,554 1415,558 1418,463 -681,465 -677,465 -675,470 -670,470 -665,470 -660,470 -659,473 -656,476 -656,481 -655,482 -652,486 -654,486 -652,486 -648,491 -646,490 -651,494 -646,493 -644,493 -644,490 -644,491 2356,495 2359,495 2364,500 2359,503 5359,504 5364,509 5368,504 5367,499 5368,498 5371,498 5369,500 5370,504 5370,508 5370,511 5370,507 5374,508 5378,511 5382,507 5387,509 5389,512 5388,515 5393,520 5396,517 5397,517 5402,515 5404,520 5402,521 5405,525 5405,526 5408,530 7408,535 7413,533 7415,529 7412,532 7416,4532 7416,4534 7421,4533 7417,4536 7413,4536 7418,4540 3418,4545 3418,4549 3415,4551 3419,4554 3421,4559 3423,4559 3426,4557 3424,4561 3428,4558 3428,4563 3431,4565 3435,4569 3439,4569 3439,4569 3444,4567 3444,4572 3446,4577 3447,4581 3444,4581 3448,4584 3448,4579 3447,4580 3450,4583 3449,4583 3453,4587 3455,4588 3458,4593 3463,4598 3465,4601 3468,4598 3464,4598 3460,4593 5460,4595 5461,4600 5464,4600 5465,4601 5466,4606 5466,4608 5466,4605 5464,4608 5467,4607 5468,4609 5465,4614 5461,4618 5463,4621 5467,4623 5470,4622 5470,4622 5470,4625 6470,4627 6471,4627 6472,4627 6473,6627 6474,6625 6474,6628 6477,6633 6481,6633 6480,6637 6475,7637 6479,7638 6482,7643 6487,7644 6492,7647 6492,7648 6495,7646 6498,7650 6499,7646 6494,7644 6499,7644 6497,7644 6499,7647 6502,7649 6504,7650 6501,7647 6503,7649 6504,7650 6508,7651 6503,7652 6508,7655 6508,7650 6511,7655 6515,7658 6513,7663 6513,7665 6514,7669 6512,7667 6510,7664 6510,472 -675,477 -670,479 -666,482 -663,484 -668,484 -666,485 -664,481 -664,479 -659,482 -659,484 -658,483 -659,488 2341,493 2339,489 2338,491 2342,491 2346,494 2346,490 2348,493 2348,498 2349,498 2350,499 2349,502 2350,503 2348,506 2348,506 2348,507 2353,507 2355,504 2359,504 2364,504 2361,499 2365,502 2360,502 2358,503 2357,504 2353,504 2357,500 2356,497 2355,498 2355,500 2359,502 2361,505 2364,508 2364,506 2368,506 2370,504 2373,499 2373,496 2372,493 2377,497 2380,495 2383,496 7383,493 7386,497 7391,494 7387,495 7389,498 7392,498 7392,495 7395,493 7398,498 7401,498 7403,503 7400,498 8400,501 8401,503 8401,503 8401,501 10401,496 10396,491 10401,492 10399,493 10403,496 10403,491 10403,493 10407,489 10410,493 10407,489 10403,498 7403,497 7399,496 7403,500 7405,500 7407,503 7411,508 7415,511 7415,511 7420,515 7420,520 7423,523 7423,520 7427,523 7427,523 7427,522 7432,525 4432,527 4434,530 4437,534 4441,529 4446,529 4441,534 4436,537 4436,535 4437,532 4437,534 4432,535 4429,538 4430,542 4427,542 4431,538 4431,541 4431,541 4433,543 4433,545 4432,549 4428,552 4426,556 4427,557 4423,560 4427,561 4428,558 4430,559 4434,559 4432,561 4434,561 4437,563 4435,559 4430,561 4435,4561 4437,4566 4441,4568 4446,4568 4450,4569 4455,4565 4458,4561 4463,4561 9463,4564 9463,4565 9461,9565 9463,9560 9467,9560 9466,9555 9469,9555 9471,9559 9469,9557 9473,9553 9478,9555 9480,9557 9481,9557 9481,9557 9483,9562 9487,9558 9487,9558 9490,9561 9493,9562 9493,9557 9493,9560 9496,9555 9501,9553 9503,9553 9506,9557 9510,9558 9511,9561 9514,9563 9512,9568 9514,9567 9514,9567 13514,9570 13517,9566 13521,9571 13521,9571 13526,9573 13521,9571 13521,9576 10521,9580 10526,9582 10525,9584 10528,9584 10531,9584 10533,9589 10533,9588 10537,9588 10541,9589 10542,9593 10544,9595 10540,9597 10541,9600 10545,9601 15545,9603 15549,9605 15553,9601 15558,9601 15553,9605 15551,9605 15550,9605 15554,9607 15556,9605 15556,9604 15561,9607 15559,9603 15559,9603
|
||
|
UPDATE t1 SET g = ST_linefromtext('linestring(-5 -576,0 -576,0 -571,0 -571,5 -568,6 -564,6 -565,6 -563)') WHERE p = 2;
|
||
|
|
||
|
ROLLBACK;
|
||
|
|
||
|
connection con1;
|
||
|
--echo # disable purge
|
||
|
CREATE TABLE t0 (a INT) ENGINE=InnoDB;
|
||
|
BEGIN; SELECT * FROM t0;
|
||
|
|
||
|
connection default;
|
||
|
DELETE FROM t1 WHERE p = 3;
|
||
|
|
||
|
UPDATE t1 SET g = ST_linefromtext('linestring(448 -689,453 -684,451 -679,453 -677,458 -681,463 -681,468 -678,470 -676,470 -678,468 -675,472 -675,472 -675,474 -674,479 -676,477 -675,473 -676,475 1324,479 1319,484 1322,483 1323,486 1323,491 1328,492 1325,496 1325,498 1325,501 1330,498 1331,500 1331,504 1330,508 1329,512 1332,513 1337,518 1339,518 1339,513 1344,513 1344,512 1346,514 1351,515 1353,519 1358,518 1362,522 1365,525 1360,526 1362,527 1362,528 1367,525 1371,528 1366,532 1369,536 1374,539 1377,543 1379,539 1381,541 1382,543 1383,546 1388,549 1393,554 1393,554 1395,554 1392,550 1394,550 1392,546 1394,549 1397,550 1393,549 1394,554 1390,554 1391,549 1396,551 1396,547 1400,547 1402,551 1407,554 1412,554 1415,558 1418,463 -681,465 -677,465 -675,470 -670,470 -665,470 -660,470 -659,473 -656,476 -656,481 -655,482 -652,486 -654,486 -652,486 -648,491 -646,490 -651,494 -646,493 -644,493 -644,490 -644,491 2356,495 2359,495 2364,500 2359,503 5359,504 5364,509 5368,504 5367,499 5368,498 5371,498 5369,500 5370,504 5370,508 5370,511 5370,507 5374,508 5378,511 5382,507 5387,509 5389,512 5388,515 5393,520 5396,517 5397,517 5402,515 5404,520 5402,521 5405,525 5405,526 5408,530 7408,535 7413,533 7415,529 7412,532 7416,4532 7416,4534 7421,4533 7417,4536 7413,4536 7418,4540 3418,4545 3418,4549 3415,4551 3419,4554 3421,4559 3423,4559 3426,4557 3424,4561 3428,4558 3428,4563 3431,4565 3435,4569 3439,4569 3439,4569 3444,4567 3444,4572 3446,4577 3447,4581 3444,4581 3448,4584 3448,4579 3447,4580 3450,4583 3449,4583 3453,4587 3455,4588 3458,4593 3463,4598 3465,4601 3468,4598 3464,4598 3460,4593 5460,4595 5461,4600 5464,4600 5465,4601 5466,4606 5466,4608 5466,4605 5464,4608 5467,4607 5468,4609 5465,4614 5461,4618 5463,4621 5467,4623 5470,4622 5470,4622 5470,4625 6470,4627 6471,4627 6472,4627 6473,6627 6474,6625 6474,6628 6477,6633 6481,6633 6480,6637 6475,7637 6479,7638 6482,7643 6487,7644 6492,7647 6492,7648 6495,7646 6498,7650 6499,7646 6494,7644 6499,7644 6497,7644 6499,7647 6502,7649 6504,7650 6501,7647 6503,7649 6504,7650 6508,7651 6503,7652 6508,7655 6508,7650 6511,7655 6515,7658 6513,7663 6513,7665 6514,7669 6512,7667 6510,7664 6510,472 -675,477 -670,479 -666,482 -663,484 -668,484 -666,485 -664,481 -664,479 -659,482 -659,484 -658,483 -659,488 2341,493 2339,489 2338,491 2342,491 2346,494 2346,490 2348,493 2348,498 2349,498 2350,499 2349,502 2350,503 2348,506 2348,506 2348,507 2353,507 2355,504 2359,504 2364,504 2361,499 2365,502 2360,502 2358,503 2357,504 2353,504 2357,500 2356,497 2355,498 2355,500 2359,502 2361,505 2364,508 2364,506 2368,506 2370,504 2373,499 2373,496 2372,493 2377,497 2380,495 2383,496 7383,493 7386,497 7391,494 7387,495 7389,498 7392,498 7392,495 7395,493 7398,498 7401,498 7403,503 7400,498 8400,501 8401,503 8401,503 8401,501 10401,496 10396,491 10401,492 10399,493 10403,496 10403,491 10403,493 10407,489 10410,493 10407,489 10403,498 7403,497 7399,496 7403,500 7405,500 7407,503 7411,508 7415,511 7415,511 7420,515 7420,520 7423,523 7423,520 7427,523 7427,523 7427,522 7432,525 4432,527 4434,530 4437,534 4441,529 4446,529 4441,534 4436,537 4436,535 4437,532 4437,534 4432,535 4429,538 4430,542 4427,542 4431,538 4431,541 4431,541 4433,543 4433,545 4432,549 4428,552 4426,556 4427,557 4423,560 4427,561 4428,558 4430,559 4434,559 4432,561 4434,561 4437,563 4435,559 4430,561 4435,4561 4437,4566 4441,4568 4446,4568 4450,4569 4455,4565 4458,4561 4463,4561 9463,4564 9463,4565 9461,9565 9463,9560 9467,9560 9466,9555 9469,9555 9471,9559 9469,9557 9473,9553 9478,9555 9480,9557 9481,9557 9481,9557 9483,9562 9487,9558 9487,9558 9490,9561 9493,9562 9493,9557 9493,9560 9496,9555 9501,9553 9503,9553 9506,9557 9510,9558 9511,9561 9514,9563 9512,9568 9514,9567 9514,9567 13514,9570 13517,9566 13521,9571 13521,9571 13526,9573 13521,9571 13521,9576 10521,9580 10526,9582 10525,9584 10528,9584 10531,9584 10533,9589 10533,9588 10537,9588 10541,9589 10542,9593 10544,9595 10540,9597 10541,9600 10545,9601 15545,9603 15549,9605 15553,9601 15558,9601 15553,9605 15551,9605 15550,9605 15554,9607 15556,9605 15556,9604 15561,9607 15559,9603 15559,9603
|
||
|
UPDATE t1 SET g = ST_linefromtext('linestring(-5 -576,0 -576,0 -571,0 -571,5 -568,6 -564,6 -565,6 -563)') WHERE p = 2;
|
||
|
|
||
|
if ($index == 'spatial_none') {
|
||
|
ALTER TABLE t1 ADD SPATIAL INDEX spatial_idx (g);
|
||
|
}
|
||
|
|
||
|
if ($index == 'spatial_only') {
|
||
|
eval ALTER TABLE t1 ADD INDEX prefix_idx (g($prefix_size));
|
||
|
}
|
||
|
|
||
|
if ($index == 'spatial_mixed') {
|
||
|
ALTER TABLE t1 DROP INDEX spatial_idx, DROP INDEX prefix_idx;
|
||
|
}
|
||
|
|
||
|
connection con1;
|
||
|
--echo # enable purge
|
||
|
COMMIT;
|
||
|
|
||
|
connection default;
|
||
|
DELETE FROM t1 WHERE p = 2;
|
||
|
|
||
|
--echo # wait for purge to process the update_undo records.
|
||
|
--source include/wait_innodb_all_purged.inc
|
||
|
|
||
|
eval CREATE TABLE t2 (
|
||
|
p INT PRIMARY KEY,
|
||
|
g1 POINT NOT NULL,
|
||
|
g2 POINT NOT NULL,
|
||
|
g3 LINESTRING NOT NULL,
|
||
|
g4 LINESTRING NOT NULL,
|
||
|
g5 GEOMETRY NOT NULL,
|
||
|
g6 GEOMETRY NOT NULL,
|
||
|
SPATIAL KEY (g1),
|
||
|
SPATIAL KEY (g2),
|
||
|
SPATIAL KEY (g3),
|
||
|
SPATIAL KEY (g4),
|
||
|
SPATIAL KEY (g5),
|
||
|
SPATIAL KEY (g6)
|
||
|
) ENGINE=InnoDB ROW_FORMAT=$row_format;
|
||
|
|
||
|
DROP TABLE t2;
|
||
|
DROP TABLE t1;
|
||
|
DROP TABLE t0;
|