summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/gis-alter_table_online.test
blob: be6d2137e7767e7e7be9c13f93bf26807e8c0c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
--source include/have_innodb.inc
--source include/have_geometry.inc

--echo #
--echo # Start of 10.1 tests
--echo #

--echo #
--echo # MDEV-8948 ALTER ... INPLACE does work for BINARY, BLOB
--echo #

#
# Blob variants to GEOMETRY
#
CREATE TABLE t1 (a TINYBLOB);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE;
DROP TABLE t1;

CREATE TABLE t1 (a MEDIUMBLOB);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE;
DROP TABLE t1;

CREATE TABLE t1 (a BLOB);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE;
DROP TABLE t1;

CREATE TABLE t1 (a LONGBLOB);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE;
DROP TABLE t1;

#
# GEOMETRY to BLOB variants
#

CREATE TABLE t1 (a GEOMETRY);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a TINYBLOB, ALGORITHM=INPLACE;
DROP TABLE t1;

CREATE TABLE t1 (a GEOMETRY);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a MEDIUMBLOB, ALGORITHM=INPLACE;
DROP TABLE t1;

CREATE TABLE t1 (a GEOMETRY);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a BLOB, ALGORITHM=INPLACE;
DROP TABLE t1;

CREATE TABLE t1 (a GEOMETRY);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a LONGBLOB, ALGORITHM=INPLACE;
DROP TABLE t1;

#
# Different GEOMETRY types
#

# Can't do INPLACE from a supertype to a subtype
CREATE TABLE t1 (a GEOMETRY);
--error ER_ALTER_OPERATION_NOT_SUPPORTED
ALTER TABLE t1 MODIFY a POLYGON, ALGORITHM=INPLACE;
DROP TABLE t1;

# Ok to do INPLACE from a subtype to a supertype
CREATE TABLE t1 (a POLYGON);
ALTER TABLE t1 MODIFY a GEOMETRY, ALGORITHM=INPLACE;
DROP TABLE t1;

# Ok to do INPLACE for two equal geometry subtypes
CREATE TABLE t1 (a POLYGON);
ALTER TABLE t1 MODIFY a POLYGON, ALGORITHM=INPLACE;
DROP TABLE t1;


--echo #
--echo # End of 10.1 tests
--echo #