types-spatial.td 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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
  43. FROM MYSQL CONNECTION mysql_conn
  44. FOR TABLES (public.geometry_type);
  45. contains:referenced tables use unsupported types
  46. ! CREATE SOURCE mz_source
  47. FROM MYSQL CONNECTION mysql_conn
  48. FOR TABLES (public.geometry_type_with_srid);
  49. contains:referenced tables use unsupported types
  50. ! CREATE SOURCE mz_source
  51. FROM MYSQL CONNECTION mysql_conn
  52. FOR TABLES (public.point_type);
  53. contains:referenced tables use unsupported types
  54. ! CREATE SOURCE mz_source
  55. FROM MYSQL CONNECTION mysql_conn
  56. FOR TABLES (public.linestring_type);
  57. contains:referenced tables use unsupported types
  58. ! CREATE SOURCE mz_source
  59. FROM MYSQL CONNECTION mysql_conn
  60. FOR TABLES (public.polygon_type);
  61. contains:referenced tables use unsupported types
  62. ! CREATE SOURCE mz_source
  63. FROM MYSQL CONNECTION mysql_conn
  64. FOR TABLES (public.multipoint_type);
  65. contains:referenced tables use unsupported types
  66. ! CREATE SOURCE mz_source
  67. FROM MYSQL CONNECTION mysql_conn
  68. FOR TABLES (public.multilinestring_type);
  69. contains:referenced tables use unsupported types
  70. ! CREATE SOURCE mz_source
  71. FROM MYSQL CONNECTION mysql_conn
  72. FOR TABLES (public.multipolygon_type);
  73. contains:referenced tables use unsupported types
  74. ! CREATE SOURCE mz_source
  75. FROM MYSQL CONNECTION mysql_conn
  76. FOR TABLES (public.geometrycollection_type);
  77. contains:referenced tables use unsupported types