types-spatial.td 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. $ set-sql-timeout duration=1s
  10. #
  11. # Spatial types not supported
  12. #
  13. > CREATE SECRET mysqlpass AS '${arg.mysql-root-password}'
  14. > CREATE CONNECTION mysql_conn TO MYSQL (
  15. HOST mysql,
  16. USER root,
  17. PASSWORD SECRET mysqlpass
  18. )
  19. $ mysql-connect name=mysql url=mysql://root@mysql password=${arg.mysql-root-password}
  20. $ mysql-execute name=mysql
  21. DROP DATABASE IF EXISTS public;
  22. CREATE DATABASE public;
  23. USE public;
  24. CREATE TABLE geometry_type (f1 GEOMETRY);
  25. INSERT INTO geometry_type VALUES (POINT(48.290003372145726, 14.291629908347193));
  26. CREATE TABLE geometry_type_with_srid (f1 GEOMETRY NOT NULL SRID 4326);
  27. INSERT INTO geometry_type_with_srid VALUES (ST_SRID(POINT(51.50556752713903, -0.07534114282176071), 4326));
  28. CREATE TABLE point_type (f1 POINT);
  29. INSERT INTO point_type VALUES (ST_GeomFromText('POINT(69.91075849296699 27.03176710555435)'));
  30. CREATE TABLE linestring_type (f1 LINESTRING);
  31. INSERT INTO linestring_type VALUES (ST_GeomFromText('LINESTRING(0 0,1 1,2 2)'));
  32. CREATE TABLE polygon_type (f1 POLYGON);
  33. INSERT INTO polygon_type VALUES (ST_GeomFromText('POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))'));
  34. CREATE TABLE multipoint_type (f1 MULTIPOINT);
  35. INSERT INTO multipoint_type VALUES (ST_GeomFromText('MULTIPOINT(0 0, 20 20, 80 80, 120 120)'));
  36. CREATE TABLE multilinestring_type (f1 MULTILINESTRING);
  37. INSERT INTO multilinestring_type VALUES (ST_GeomFromText('MULTILINESTRING((10 10, 20 20), (15 15, 60 15))'));
  38. CREATE TABLE multipolygon_type (f1 MULTIPOLYGON);
  39. INSERT INTO multipolygon_type VALUES (ST_GeomFromText('MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((8 8,7 8,7 7,8 7, 8 8)))'));
  40. CREATE TABLE geometrycollection_type (f1 GEOMETRYCOLLECTION);
  41. INSERT INTO geometrycollection_type VALUES (ST_GeomFromText('GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))'));
  42. > CREATE SOURCE mz_source FROM MYSQL CONNECTION mysql_conn;
  43. ! CREATE TABLE geometry_type FROM SOURCE mz_source (REFERENCE public.geometry_type);
  44. contains:referenced tables use unsupported types
  45. ! CREATE TABLE geometry_type_with_srid FROM SOURCE mz_source (REFERENCE public.geometry_type_with_srid);
  46. contains:referenced tables use unsupported types
  47. ! CREATE TABLE point_type FROM SOURCE mz_source (REFERENCE public.point_type);
  48. contains:referenced tables use unsupported types
  49. ! CREATE TABLE linestring_type FROM SOURCE mz_source (REFERENCE public.linestring_type);
  50. contains:referenced tables use unsupported types
  51. ! CREATE TABLE polygon_type FROM SOURCE mz_source (REFERENCE public.polygon_type);
  52. contains:referenced tables use unsupported types
  53. ! CREATE TABLE multipoint_type FROM SOURCE mz_source (REFERENCE public.multipoint_type);
  54. contains:referenced tables use unsupported types
  55. ! CREATE TABLE multilinestring_type FROM SOURCE mz_source (REFERENCE public.multilinestring_type);
  56. contains:referenced tables use unsupported types
  57. ! CREATE TABLE multipolygon_type FROM SOURCE mz_source (REFERENCE public.multipolygon_type);
  58. contains:referenced tables use unsupported types
  59. ! CREATE TABLE geometrycollection_type FROM SOURCE mz_source (REFERENCE public.geometrycollection_type);
  60. contains:referenced tables use unsupported types