Debian Codegraph @

mysql-test/suite/innodb/r/upgrade_geometry_56.result

raw
1 #
2 # This test upgrades a 5.7 database with a table containing GEOMETRY columns. This table
3 # was originally created in 5.6 and then upgraded to 5.7. An additional table containing
4 # GEOMETRY columns was created in 5.7
5 #
6 # Stop the running server
7 #################################################################################
8 # Copy and unzip the datadir created with 5.6 version and upgraded to 5.7
9 #################################################################################
10 # Restart the server with the unzipped datadir
11 # restart: --datadir=DATADIR --innodb_page_size=16k
12 # Check the contents of INFORMATION_SCHEMA
13 SHOW TABLES;
14 Tables_in_test
15 t56_geometry_table
16 t57_geometry_table
17 SELECT NAME, ROW_FORMAT, SPACE_TYPE FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE name LIKE '%test/t_%'
18 ORDER BY name;
19 NAME ROW_FORMAT SPACE_TYPE
20 test/t56_geometry_table Compact Single
21 test/t57_geometry_table Dynamic Single
22 SHOW CREATE TABLE t56_geometry_table;
23 Table Create Table
24 t56_geometry_table CREATE TABLE `t56_geometry_table` (
25 `c56_pk` int NOT NULL DEFAULT '0',
26 `c56_geometry` geometry NOT NULL,
27 `c56_geometrycollection` geomcollection NOT NULL,
28 `c56_linestring` linestring NOT NULL,
29 `c56_multilinestring` multilinestring NOT NULL,
30 `c56_multipoint` multipoint NOT NULL,
31 `c56_multipolygon` multipolygon NOT NULL,
32 `c56_point` point NOT NULL,
33 `c56_polygon` polygon NOT NULL,
34 PRIMARY KEY (`c56_pk`),
35 SPATIAL KEY `si56_point` (`c56_point`)
36 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
37 SHOW CREATE TABLE t57_geometry_table;
38 Table Create Table
39 t57_geometry_table CREATE TABLE `t57_geometry_table` (
40 `c57_pk` int NOT NULL,
41 `c57_geometry` geometry NOT NULL,
42 `c57_geometrycollection` geomcollection NOT NULL,
43 `c57_linestring` linestring NOT NULL,
44 `c57_multilinestring` multilinestring NOT NULL,
45 `c57_point` point NOT NULL,
46 `c57_multipoint` multipoint NOT NULL,
47 `c57_polygon` polygon NOT NULL,
48 `c57_multipolygon` multipolygon NOT NULL,
49 PRIMARY KEY (`c57_pk`),
50 SPATIAL KEY `si57_point` (`c57_point`)
51 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
52 # Perform some basic operations on the tables
53 ALTER TABLE t56_geometry_table ADD SPATIAL INDEX si56_geometry (`c56_geometry`);
54 Warnings:
55 Warning 3674 The spatial index on column 'c56_geometry' will not be used by the query optimizer since the column does not have an SRID attribute. Consider adding an SRID attribute to the column.
56 SHOW CREATE TABLE t56_geometry_table;
57 Table Create Table
58 t56_geometry_table CREATE TABLE `t56_geometry_table` (
59 `c56_pk` int NOT NULL DEFAULT '0',
60 `c56_geometry` geometry NOT NULL,
61 `c56_geometrycollection` geomcollection NOT NULL,
62 `c56_linestring` linestring NOT NULL,
63 `c56_multilinestring` multilinestring NOT NULL,
64 `c56_multipoint` multipoint NOT NULL,
65 `c56_multipolygon` multipolygon NOT NULL,
66 `c56_point` point NOT NULL,
67 `c56_polygon` polygon NOT NULL,
68 PRIMARY KEY (`c56_pk`),
69 SPATIAL KEY `si56_point` (`c56_point`),
70 SPATIAL KEY `si56_geometry` (`c56_geometry`)
71 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
72 ALTER TABLE t57_geometry_table ADD SPATIAL INDEX si57_geometry (`c57_geometry`);
73 Warnings:
74 Warning 3674 The spatial index on column 'c57_geometry' will not be used by the query optimizer since the column does not have an SRID attribute. Consider adding an SRID attribute to the column.
75 SHOW CREATE TABLE t57_geometry_table;
76 Table Create Table
77 t57_geometry_table CREATE TABLE `t57_geometry_table` (
78 `c57_pk` int NOT NULL,
79 `c57_geometry` geometry NOT NULL,
80 `c57_geometrycollection` geomcollection NOT NULL,
81 `c57_linestring` linestring NOT NULL,
82 `c57_multilinestring` multilinestring NOT NULL,
83 `c57_point` point NOT NULL,
84 `c57_multipoint` multipoint NOT NULL,
85 `c57_polygon` polygon NOT NULL,
86 `c57_multipolygon` multipolygon NOT NULL,
87 PRIMARY KEY (`c57_pk`),
88 SPATIAL KEY `si57_point` (`c57_point`),
89 SPATIAL KEY `si57_geometry` (`c57_geometry`)
90 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
91 ALTER TABLE t56_geometry_table DROP INDEX si56_point;
92 ALTER TABLE t57_geometry_table DROP INDEX si57_point;
93 SHOW CREATE TABLE t56_geometry_table;
94 Table Create Table
95 t56_geometry_table CREATE TABLE `t56_geometry_table` (
96 `c56_pk` int NOT NULL DEFAULT '0',
97 `c56_geometry` geometry NOT NULL,
98 `c56_geometrycollection` geomcollection NOT NULL,
99 `c56_linestring` linestring NOT NULL,
100 `c56_multilinestring` multilinestring NOT NULL,
101 `c56_multipoint` multipoint NOT NULL,
102 `c56_multipolygon` multipolygon NOT NULL,
103 `c56_point` point NOT NULL,
104 `c56_polygon` polygon NOT NULL,
105 PRIMARY KEY (`c56_pk`),
106 SPATIAL KEY `si56_geometry` (`c56_geometry`)
107 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
108 SHOW CREATE TABLE t57_geometry_table;
109 Table Create Table
110 t57_geometry_table CREATE TABLE `t57_geometry_table` (
111 `c57_pk` int NOT NULL,
112 `c57_geometry` geometry NOT NULL,
113 `c57_geometrycollection` geomcollection NOT NULL,
114 `c57_linestring` linestring NOT NULL,
115 `c57_multilinestring` multilinestring NOT NULL,
116 `c57_point` point NOT NULL,
117 `c57_multipoint` multipoint NOT NULL,
118 `c57_polygon` polygon NOT NULL,
119 `c57_multipolygon` multipolygon NOT NULL,
120 PRIMARY KEY (`c57_pk`),
121 SPATIAL KEY `si57_geometry` (`c57_geometry`)
122 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
123 # Cleanup
124 # Shutdown server
125 # Remove copied files
126 # Restart the server
127 # restart