Skip to content

Commit e6e24fe

Browse files
committed
Merge branch '10.2' of https://github.com/mariadb/server into 10.2
2 parents b9e0945 + 0de565a commit e6e24fe

File tree

88 files changed

+2167
-5651
lines changed

Some content is hidden

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

88 files changed

+2167
-5651
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
MYSQL_VERSION_MAJOR=10
22
MYSQL_VERSION_MINOR=2
3-
MYSQL_VERSION_PATCH=12
3+
MYSQL_VERSION_PATCH=13

extra/comp_err.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ static int create_header_files(struct errors *error_head)
267267
fprintf(sql_statef, "/* Autogenerated file, please don't edit */\n\n");
268268
fprintf(er_namef, "/* Autogenerated file, please don't edit */\n\n");
269269

270+
fprintf(er_definef, "#ifndef ER_ERROR_FIRST\n");
270271
fprintf(er_definef, "#define ER_ERROR_FIRST %d\n", error_head->d_code);
271272

272273
current_d_code= error_head->d_code -1;
@@ -314,6 +315,7 @@ static int create_header_files(struct errors *error_head)
314315
}
315316
/* finishing off with mysqld_error.h */
316317
fprintf(er_definef, "#define ER_ERROR_LAST %d\n", er_last);
318+
fprintf(er_definef, "#endif /* ER_ERROR_FIRST */\n");
317319
my_fclose(er_definef, MYF(0));
318320
my_fclose(sql_statef, MYF(0));
319321
my_fclose(er_namef, MYF(0));

include/my_time.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ static inline my_bool validate_timestamp_range(const MYSQL_TIME *t)
173173
}
174174

175175
/* Can't include mysqld_error.h, it needs mysys to build, thus hardcode 2 error values here. */
176+
#ifndef ER_WARN_DATA_OUT_OF_RANGE
176177
#define ER_WARN_DATA_OUT_OF_RANGE 1264
177178
#define ER_WARN_INVALID_TIMESTAMP 1299
179+
#endif
178180

179181
my_time_t
180182
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, uint *error_code);

mysql-test/include/innodb_gis_row_format_basic.inc

Lines changed: 0 additions & 420 deletions
This file was deleted.

mysql-test/include/innodb_gis_undo.inc

Lines changed: 0 additions & 83 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[redundant]
2+
innodb_default_row_format=redundant
3+
4+
[compact]
5+
innodb_default_row_format=compact
6+
7+
[dynamic]
8+
innodb_default_row_format=dynamic
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# The goal of including this file is to enable innodb_default_row_format
2+
# combinations (see include/innodb_row_format.combinations)
3+
4+
--source include/have_innodb.inc

mysql-test/include/wait_innodb_all_purged.inc

Lines changed: 0 additions & 60 deletions
This file was deleted.

mysql-test/r/cte_nonrecursive.result

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ ERROR 42S21: Duplicate column name 'f1'
705705
with t as (select * from t2 where c>3),
706706
t as (select a from t1 where a>2)
707707
select * from t,t1 where t1.a=t.c;
708-
ERROR HY000: Duplicate query name in WITH clause
708+
ERROR HY000: Duplicate query name in WITH clause 't'
709709
with t as (select a from s where a<5),
710710
s as (select a from t1 where b>='d')
711711
select * from t,s where t.a=s.a;
@@ -1265,3 +1265,33 @@ a
12651265
4
12661266
deallocate prepare stmt;
12671267
drop table t1;
1268+
#
1269+
# MDEV-14852: CTE using temporary table in query
1270+
# with two references to the CTE
1271+
#
1272+
create temporary table t1 (i int);
1273+
insert into t1 values (5),(4),(1),(2),(3);
1274+
with
1275+
c1 as (select i from t1),
1276+
c2 as (select i from c1 where c1.i=2)
1277+
select i from c1 where i > 3 union select i from c2;
1278+
i
1279+
5
1280+
4
1281+
2
1282+
drop table t1;
1283+
create table t1 (term char(10));
1284+
create temporary table t2 (term char(10));
1285+
insert into t1 values ('TERM01'),('TERM02'),('TERM03');
1286+
insert into t2 values ('TERM02'),('TERM03'),('TERM04');
1287+
with c1 as (select * from t1), c2 as (select * from t2)
1288+
(select * from c1 left outer join c2 on c1.term = c2.term)
1289+
union all
1290+
(select * from c1 right outer join c2 on c1.term = c2.term
1291+
where c1.term is null);
1292+
term term
1293+
TERM02 TERM02
1294+
TERM03 TERM03
1295+
TERM01 NULL
1296+
NULL TERM04
1297+
drop table t1,t2;

mysql-test/r/gis-rtree.result

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
DROP TABLE IF EXISTS t1, t2;
21
CREATE TABLE t1 (
3-
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
2+
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
43
g GEOMETRY NOT NULL,
54
SPATIAL KEY(g)
6-
) ENGINE=MyISAM;
5+
);
76
SHOW CREATE TABLE t1;
87
Table Create Table
98
t1 CREATE TABLE `t1` (
@@ -183,9 +182,9 @@ fid AsText(g)
183182
2 LINESTRING(149 149,151 151)
184183
DROP TABLE t1;
185184
CREATE TABLE t2 (
186-
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
185+
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
187186
g GEOMETRY NOT NULL
188-
) ENGINE=MyISAM;
187+
);
189188
INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 10 * 10 - 9), Point(10 * 10, 10 * 10)));
190189
INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 9 * 10 - 9), Point(10 * 10, 9 * 10)));
191190
INSERT INTO t2 (g) VALUES (LineString(Point(10 * 10 - 9, 8 * 10 - 9), Point(10 * 10, 8 * 10)));
@@ -298,11 +297,11 @@ t2 CREATE TABLE `t2` (
298297
SELECT count(*) FROM t2;
299298
count(*)
300299
100
301-
EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g,
300+
EXPLAIN SELECT fid, AsText(g) FROM t2 WHERE Within(g,
302301
GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
303302
id select_type table type possible_keys key key_len ref rows Extra
304303
1 SIMPLE t2 range g g 34 NULL 4 Using where
305-
SELECT fid, AsText(g) FROM t2 WHERE Within(g,
304+
SELECT fid, AsText(g) FROM t2 WHERE Within(g,
306305
GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
307306
fid AsText(g)
308307
46 LINESTRING(51 41,60 50)
@@ -710,9 +709,6 @@ SELECT count(*) FROM t2;
710709
count(*)
711710
100
712711
DROP TABLE t2;
713-
drop table if exists t1;
714-
Warnings:
715-
Note 1051 Unknown table 'test.t1'
716712
CREATE TABLE t1 (a geometry NOT NULL, SPATIAL (a));
717713
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
718714
INSERT INTO t1 VALUES (GeomFromText("LINESTRING(100 100, 200 200, 300 300)"));
@@ -751,20 +747,20 @@ Table Op Msg_type Msg_text
751747
test.t1 analyze status OK
752748
drop table t1;
753749
CREATE TABLE t1 (
754-
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
750+
fid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
755751
g GEOMETRY NOT NULL,
756752
SPATIAL KEY(g)
757-
) ENGINE=MyISAM;
753+
);
758754
INSERT INTO t1 (g) VALUES (GeomFromText('LineString(1 2, 2 3)')),(GeomFromText('LineString(1 2, 2 4)'));
759755
drop table t1;
760756
CREATE TABLE t1 (
761757
line GEOMETRY NOT NULL,
762758
kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
763759
name VARCHAR(32),
764760
SPATIAL KEY (line)
765-
) engine=myisam;
761+
);
766762
ALTER TABLE t1 DISABLE KEYS;
767-
INSERT INTO t1 (name, kind, line) VALUES
763+
INSERT INTO t1 (name, kind, line) VALUES
768764
("Aadaouane", "pp", GeomFromText("POINT(32.816667 35.983333)")),
769765
("Aadassiye", "pp", GeomFromText("POINT(35.816667 36.216667)")),
770766
("Aadbel", "pp", GeomFromText("POINT(34.533333 36.100000)")),
@@ -803,7 +799,7 @@ CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom));
803799
INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1;
804800
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
805801
drop table t1, t2;
806-
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
802+
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) DEFAULT CHARSET=latin1;
807803
INSERT INTO t1 (geometry) VALUES
808804
(PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, -18.6055555000
809805
-66.8158332999, -18.7186111000 -66.8102777000, -18.7211111000 -66.9269443999,
@@ -819,7 +815,7 @@ drop table t1;
819815
CREATE TABLE t1 (
820816
c1 geometry NOT NULL default '',
821817
SPATIAL KEY i1 (c1)
822-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
818+
) DEFAULT CHARSET=latin1;
823819
INSERT INTO t1 (c1) VALUES (
824820
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
825821
-18.6055555000 -66.8158332999,
@@ -833,7 +829,7 @@ DROP TABLE t1;
833829
CREATE TABLE t1 (
834830
c1 geometry NOT NULL default '',
835831
SPATIAL KEY i1 (c1)
836-
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
832+
) DEFAULT CHARSET=latin1;
837833
INSERT INTO t1 (c1) VALUES (
838834
PolygonFromText('POLYGON((-18.6086111000 -66.9327777000,
839835
-18.6055555000 -66.8158332999,
@@ -874,7 +870,7 @@ c3 varchar(10) collate utf8_bin default NULL,
874870
spatial_point point NOT NULL,
875871
PRIMARY KEY(id),
876872
SPATIAL KEY (spatial_point)
877-
)ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
873+
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
878874
INSERT INTO t1 (c2, c1, c3, spatial_point) VALUES
879875
('y', 's', 'j', GeomFromText('POINT(167 74)')),
880876
('r', 'n', 'd', GeomFromText('POINT(215 118)')),
@@ -1544,11 +1540,11 @@ HANDLER t1 CLOSE;
15441540
DROP TABLE t1;
15451541
End of 5.0 tests.
15461542
#
1547-
# Bug #57323/11764487: myisam corruption with insert ignore
1543+
# Bug #57323/11764487: myisam corruption with insert ignore
15481544
# and invalid spatial data
15491545
#
15501546
CREATE TABLE t1(a POINT NOT NULL, b GEOMETRY NOT NULL,
1551-
SPATIAL KEY(a), SPATIAL KEY(b)) ENGINE=MyISAM;
1547+
SPATIAL KEY(a), SPATIAL KEY(b));
15521548
INSERT INTO t1 VALUES(GEOMFROMTEXT("point (0 0)"), GEOMFROMTEXT("point (1 1)"));
15531549
INSERT IGNORE INTO t1 SET a=GEOMFROMTEXT("point (-6 0)"), b=GEOMFROMTEXT("error");
15541550
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
@@ -1559,7 +1555,7 @@ ASTEXT(a) ASTEXT(b)
15591555
POINT(0 0) POINT(1 1)
15601556
DROP TABLE t1;
15611557
CREATE TABLE t1(a INT NOT NULL, b GEOMETRY NOT NULL,
1562-
KEY(a), SPATIAL KEY(b)) ENGINE=MyISAM;
1558+
KEY(a), SPATIAL KEY(b));
15631559
INSERT INTO t1 VALUES(0, GEOMFROMTEXT("point (1 1)"));
15641560
INSERT IGNORE INTO t1 SET a=0, b=GEOMFROMTEXT("error");
15651561
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
@@ -1573,7 +1569,7 @@ End of 5.1 tests
15731569
CREATE TABLE t1 (
15741570
l LINESTRING NOT NULL,
15751571
SPATIAL KEY(l)
1576-
) ENGINE = myisam;
1572+
);
15771573
INSERT INTO t1 VALUES(GeomFromText('LINESTRING(0 0, 1 1)'));
15781574
INSERT INTO t1 VALUES(GeomFromText('LINESTRING(1 1, 2 2)'));
15791575
INSERT INTO t1 VALUES(GeomFromText('LINESTRING(2 2, 3 3)'));
@@ -1596,7 +1592,7 @@ DROP TABLE t1;
15961592
#
15971593
# MDEV-8239 Reverse spatial operations OP(const, field) do not get optimized
15981594
#
1599-
CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)) ENGINE=MyISAM;
1595+
CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a));
16001596
INSERT INTO t1 VALUES (Point(1,2)),(Point(1,3));
16011597
EXPLAIN SELECT * FROM t1 WHERE MBRINTERSECTS(a,Point(1,2));
16021598
id select_type table type possible_keys key key_len ref rows Extra
@@ -1614,7 +1610,7 @@ DROP TABLE t1;
16141610
#
16151611
# MDEV-8610 "WHERE CONTAINS(indexed_geometry_column,1)" causes full table scan
16161612
#
1617-
CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a)) ENGINE=MyISAM;
1613+
CREATE TABLE t1 (a GEOMETRY NOT NULL, SPATIAL KEY(a));
16181614
INSERT INTO t1 VALUES (Point(1,1)),(Point(2,2)),(Point(3,3));
16191615
EXPLAIN SELECT * FROM t1 WHERE CONTAINS(a,1);
16201616
id select_type table type possible_keys key key_len ref rows Extra

0 commit comments

Comments
 (0)