Skip to content

Commit e17e0d8

Browse files
committed
Revert "WL#8579 Spatial Reference Systems"
1 parent ba843b3 commit e17e0d8

File tree

120 files changed

+2017
-23971
lines changed

Some content is hidden

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

120 files changed

+2017
-23971
lines changed

client/upgrade/program.cc

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "my_default.h"
2828
#include "check/mysqlcheck.h"
2929
#include "../scripts/mysql_fix_privilege_tables_sql.c"
30-
#include "../scripts/sql_commands_system_tables_data_fix.h"
3130
#include "../scripts/sql_commands_sys_schema.h"
3231

3332
#include "base/abstract_connection_program.h"
@@ -212,11 +211,6 @@ class Program : public Base::Abstract_connection_program
212211
return EXIT_UPGRADING_QUERIES_ERROR;
213212
}
214213

215-
if (this->run_commands_system_tables_data_fix() != 0)
216-
{
217-
return EXIT_UPGRADING_QUERIES_ERROR;
218-
}
219-
220214
if (this->m_upgrade_systables_only == false)
221215
{
222216
this->print_verbose_message("Checking system database.");
@@ -615,42 +609,6 @@ class Program : public Base::Abstract_connection_program
615609
return 0;
616610
}
617611

618-
/**
619-
Update system table data
620-
621-
@retval 0 Success
622-
@retval non-zero Error
623-
*/
624-
int run_commands_system_tables_data_fix()
625-
{
626-
const char **query_ptr;
627-
int result;
628-
629-
Mysql_query_runner runner(*this->m_query_runner);
630-
Instance_callback<int64, const Mysql_query_runner::Row&, Program>
631-
result_cb(this, &Program::result_callback);
632-
Instance_callback<int64, const Message_data&, Program>
633-
message_cb(this, &Program::fix_privilage_tables_error);
634-
635-
runner.add_result_callback(&result_cb);
636-
runner.add_message_callback(&message_cb);
637-
638-
this->print_verbose_message("Upgrading system table data.");
639-
640-
for (query_ptr= &mysql_system_tables_data_fix[0];
641-
*query_ptr != NULL;
642-
query_ptr++)
643-
{
644-
result= runner.run_query(*query_ptr);
645-
if (!this->m_ignore_errors && result != 0)
646-
{
647-
return result;
648-
}
649-
}
650-
651-
return 0;
652-
}
653-
654612
/**
655613
Update the sys schema
656614
*/

libmysqld/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ SET(LIBMYSQLD_BOOST_SOURCES
106106
../sql/debug_sync.cc
107107
../sql/handler.cc
108108
../sql/geometry_rtree.cc
109-
../sql/gis/srs/srs.cc
110-
../sql/gis/srs/wkt_parser.cc
111109
../sql/item_geofunc.cc
112110
../sql/item_geofunc_buffer.cc
113111
../sql/item_geofunc_internal.cc
@@ -163,15 +161,6 @@ IF(HAVE_UNDEF)
163161
COMPILE_FLAGS "-Wno-undef")
164162
ENDIF()
165163

166-
# Boost source compares signed and unsigned integer expressions
167-
MY_CHECK_CXX_COMPILER_FLAG("-Wsign-compare" HAVE_SIGN_COMPARE)
168-
IF(HAVE_SIGN_COMPARE)
169-
ADD_COMPILE_FLAGS(
170-
../sql/gis/srs/wkt_parser.cc
171-
COMPILE_FLAGS "-Wno-sign-compare"
172-
)
173-
ENDIF()
174-
175164
# Boost source use auto_ptr, deprecated in C++11
176165
MY_CHECK_CXX_COMPILER_FLAG("-Wdeprecated-declarations"
177166
HAVE_DEPRECATED_DECLARATIONS)

mysql-test/r/dd_schema_definition_ci.result

Lines changed: 261 additions & 261 deletions
Large diffs are not rendered by default.

mysql-test/r/dd_schema_definition_cs.result

Lines changed: 261 additions & 261 deletions
Large diffs are not rendered by default.

mysql-test/r/gis-precise.result

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,13 +1288,13 @@ ST_ISVALID(ST_GEOMFROMTEXT('GEOMETRYCOLLECTION(GEOMETRYCOLLECTION(POINT(0 0)))')
12881288
#
12891289
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)', 4236),
12901290
ST_GEOMFROMTEXT('POINT(0 0)', 0)));
1291-
ERROR HY000: Binary geometry function st_makeenvelope given two geometries of different srids: 4236 and 0, which should have been identical.
1291+
ERROR HY000: Incorrect arguments to st_makeenvelope
12921292
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)', 1),
12931293
ST_GEOMFROMTEXT('POINT(0 0)', 0)));
1294-
ERROR HY000: Binary geometry function st_makeenvelope given two geometries of different srids: 1 and 0, which should have been identical.
1294+
ERROR HY000: Incorrect arguments to st_makeenvelope
12951295
SELECT ST_ASTEXT(ST_MAKEENVELOPE(ST_GEOMFROMTEXT('POINT(0 1)', 0),
12961296
ST_GEOMFROMTEXT('POINT(0 0)', 100)));
1297-
ERROR HY000: Binary geometry function st_makeenvelope given two geometries of different srids: 0 and 100, which should have been identical.
1297+
ERROR HY000: Incorrect arguments to st_makeenvelope
12981298
#
12991299
# Bug #20085563 ASSERTION `!NULL_VALUE && OPDONE && STR_VALUE_ARG->LENGTH() > 0' FAILED
13001300
#
@@ -1566,9 +1566,9 @@ result
15661566
SELECT ST_ISVALID(ST_GEOMFROMTEXT('POINT(0 0)', -1));
15671567
ERROR 22003: SRID value is out of range in 'st_geomfromtext'
15681568
SELECT ST_ISVALID(ST_GEOMFROMTEXT('POINT(0 0)', 1));
1569-
ERROR SR001: Function st_isvalid is only defined for Cartesian spatial reference systems, but one of its arguments is in SRID 1, which has not been defined.
1569+
ERROR HY000: Incorrect arguments to st_isvalid
15701570
SELECT ST_ISVALID(ST_GEOMFROMTEXT('POINT(0 0)', 1000));
1571-
ERROR SR001: Function st_isvalid is only defined for Cartesian spatial reference systems, but one of its arguments is in SRID 1000, which has not been defined.
1571+
ERROR HY000: Incorrect arguments to st_isvalid
15721572
#
15731573
# Bug#20406850 WL#8034 : CRASH WITH ST_ISVAID() IN ITEM_FUNC_ISVALID::VAL_INT FUNCTION
15741574
#

mysql-test/r/gis.result

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,8 +1332,6 @@ FROM named_places
13321332
WHERE name = 'Goose Island';
13331333
ST_AsText(ST_Envelope(boundary))
13341334
POLYGON((59 13,67 13,67 18,59 18,59 13))
1335-
Warnings:
1336-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_envelope will be done in SRID 0.
13371335
# Conformance Item T15
13381336
SELECT ST_X(position)
13391337
FROM bridges
@@ -1364,8 +1362,6 @@ FROM road_segments
13641362
WHERE fid = 106;
13651363
ST_Length(centerline)
13661364
26
1367-
Warnings:
1368-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_length will be done in SRID 0.
13691365
# Conformance Item T22
13701366
SELECT ST_NumPoints(centerline)
13711367
FROM road_segments
@@ -1384,16 +1380,12 @@ FROM named_places
13841380
WHERE name = 'Goose Island';
13851381
ST_AsText(ST_Centroid(boundary))
13861382
POINT(63 15.5)
1387-
Warnings:
1388-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_centroid will be done in SRID 0.
13891383
# Conformance Item T26
13901384
SELECT ST_Area(boundary)
13911385
FROM named_places
13921386
WHERE name = 'Goose Island';
13931387
ST_Area(boundary)
13941388
40
1395-
Warnings:
1396-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_area will be done in SRID 0.
13971389
# Conformance Item T27
13981390
SELECT ST_AsText(ST_ExteriorRing(shore))
13991391
FROM lakes
@@ -1436,24 +1428,18 @@ FROM divided_routes
14361428
WHERE name = 'Route 75';
14371429
ST_Length(centerlines)
14381430
96
1439-
Warnings:
1440-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_length will be done in SRID 0.
14411431
# Conformance Item T34
14421432
SELECT ST_AsText(ST_Centroid(shores))
14431433
FROM ponds
14441434
WHERE fid = 120;
14451435
ST_AsText(ST_Centroid(shores))
14461436
POINT(25 42)
1447-
Warnings:
1448-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_centroid will be done in SRID 0.
14491437
# Conformance Item T36
14501438
SELECT ST_Area(shores)
14511439
FROM ponds
14521440
WHERE fid = 120;
14531441
ST_Area(shores)
14541442
8
1455-
Warnings:
1456-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_area will be done in SRID 0.
14571443
# Conformance Item T37
14581444
SELECT ST_Equals(boundary,
14591445
ST_PolyFromText('POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )',101))
@@ -1462,8 +1448,6 @@ WHERE name = 'Goose Island';
14621448
ST_Equals(boundary,
14631449
ST_PolyFromText('POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )',101))
14641450
1
1465-
Warnings:
1466-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_equals will be done in SRID 0.
14671451
SELECT ST_Equals(boundary,
14681452
ST_PolyFromText('POLYGON( ( 67 13, 67 18, 59 18, 59 13, 67 13) )',1))
14691453
FROM named_places
@@ -1476,89 +1460,67 @@ WHERE divided_routes.name = 'Route 75'
14761460
AND named_places.name = 'Ashton';
14771461
ST_Disjoint(centerlines, boundary)
14781462
1
1479-
Warnings:
1480-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_disjoint will be done in SRID 0.
14811463
# Conformance Item T39
14821464
SELECT ST_Touches(centerline, shore)
14831465
FROM streams, lakes
14841466
WHERE streams.name = 'Cam Stream'
14851467
AND lakes.name = 'Blue Lake';
14861468
ST_Touches(centerline, shore)
14871469
1
1488-
Warnings:
1489-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_touches will be done in SRID 0.
14901470
# Conformance Item T42
14911471
SELECT ST_Crosses(road_segments.centerline, divided_routes.centerlines)
14921472
FROM road_segments, divided_routes
14931473
WHERE road_segments.fid = 102
14941474
AND divided_routes.name = 'Route 75';
14951475
ST_Crosses(road_segments.centerline, divided_routes.centerlines)
14961476
1
1497-
Warnings:
1498-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_crosses will be done in SRID 0.
14991477
# Conformance Item T43
15001478
SELECT ST_Intersects(road_segments.centerline, divided_routes.centerlines)
15011479
FROM road_segments, divided_routes
15021480
WHERE road_segments.fid = 102
15031481
AND divided_routes.name = 'Route 75';
15041482
ST_Intersects(road_segments.centerline, divided_routes.centerlines)
15051483
1
1506-
Warnings:
1507-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_intersects will be done in SRID 0.
15081484
# Conformance Item T44
15091485
SELECT ST_Contains(forests.boundary, named_places.boundary)
15101486
FROM forests, named_places
15111487
WHERE forests.name = 'Green Forest'
15121488
AND named_places.name = 'Ashton';
15131489
ST_Contains(forests.boundary, named_places.boundary)
15141490
0
1515-
Warnings:
1516-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_contains will be done in SRID 0.
15171491
# Conformance Item T46
15181492
SELECT ST_Distance(position, boundary)
15191493
FROM bridges, named_places
15201494
WHERE bridges.name = 'Cam Bridge'
15211495
AND named_places.name = 'Ashton';
15221496
ST_Distance(position, boundary)
15231497
12
1524-
Warnings:
1525-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_distance will be done in SRID 0.
15261498
# Conformance Item T48
15271499
SELECT ST_AsText(ST_Difference(named_places.boundary, forests.boundary))
15281500
FROM named_places, forests
15291501
WHERE named_places.name = 'Ashton'
15301502
AND forests.name = 'Green Forest';
15311503
ST_AsText(ST_Difference(named_places.boundary, forests.boundary))
15321504
POLYGON((84 42,84 48,62 48,56 34,84 42))
1533-
Warnings:
1534-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_difference will be done in SRID 0.
15351505
SELECT ST_AsText(ST_Union(shore, boundary))
15361506
FROM lakes, named_places
15371507
WHERE lakes.name = 'Blue Lake'
15381508
AND named_places.name = 'Goose Island';
15391509
ST_AsText(ST_Union(shore, boundary))
15401510
POLYGON((52 18,48 6,73 9,66 23,52 18))
1541-
Warnings:
1542-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_union will be done in SRID 0.
15431511
# Conformance Item T50
15441512
SELECT ST_AsText(ST_SymDifference(shore, boundary))
15451513
FROM lakes, named_places
15461514
WHERE lakes.name = 'Blue Lake'
15471515
AND named_places.name = 'Ashton';
15481516
ST_AsText(ST_SymDifference(shore, boundary))
15491517
MULTIPOLYGON(((52 18,48 6,73 9,66 23,52 18),(59 18,67 18,67 13,59 13,59 18)),((62 48,56 34,56 30,84 30,84 48,62 48)))
1550-
Warnings:
1551-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_symdifference will be done in SRID 0.
15521518
# Conformance Item T51
15531519
SELECT count(*)
15541520
FROM buildings, bridges
15551521
WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1;
15561522
count(*)
15571523
1
1558-
Warnings:
1559-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_buffer will be done in SRID 0.
1560-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_contains will be done in SRID 0.
1561-
Warning 3519 There's no spatial reference system with SRID 101. Calculations in function st_contains will be done in SRID 0.
15621524
DROP DATABASE gis_ogs;
15631525
#
15641526
# Bug#13362660 ASSERTION `FIELD_POS < FIELD_COUNT' FAILED. IN PROTOCOL_TEXT::STORE

mysql-test/r/transactional_acl_tables.result

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1762,7 +1762,6 @@ user MyISAM
17621762
Checking if update is needed.
17631763
Checking server version.
17641764
Running queries to upgrade MySQL server.
1765-
Upgrading system table data.
17661765
Checking system database.
17671766
mysql.column_stats OK
17681767
mysql.columns_priv OK

mysql-test/suite/gis/r/geohash_functions.result

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,30 +1769,3 @@ LINESTRING(POINT(1, 1))
17691769
ST_LongFromGeoHash(UpdateXML(1, NULL, NULL))
17701770
);
17711771
ERROR 22023: Invalid GIS data provided to function linestring.
1772-
#
1773-
# WL#8579 Spatial Reference Systems
1774-
#
1775-
# SRID 0 (should pass)
1776-
SELECT ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 0), 10);
1777-
ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 0), 10)
1778-
s000000000
1779-
# Projected SRS (should pass)
1780-
SELECT ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 2000), 10);
1781-
ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 2000), 10)
1782-
s000000000
1783-
# Geographic SRS (should pass)
1784-
SELECT ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 4326), 10);
1785-
ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 4326), 10)
1786-
s000000000
1787-
# Undefined SRS (should pass)
1788-
SELECT ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 19000000), 10);
1789-
ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 19000000), 10)
1790-
s000000000
1791-
# Unparseable SRS definition (should pass)
1792-
INSERT INTO mysql.st_spatial_reference_systems(id, catalog_id, name,
1793-
organization, organization_coordsys_id, definition, description)
1794-
VALUES (11111111, 1, 'TEST11111111', 'Foo', 11111111, 'FOOBAR', '');
1795-
SELECT ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 11111111), 10);
1796-
ST_GEOHASH(ST_GEOMFROMTEXT('POINT(0 0)', 11111111), 10)
1797-
s000000000
1798-
DELETE FROM mysql.st_spatial_reference_systems WHERE id = 11111111;

0 commit comments

Comments
 (0)