Skip to content

Commit 681b778

Browse files
committed
Merge branch 10.3 into 10.4
2 parents 4b020bf + 9769567 commit 681b778

Some content is hidden

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

46 files changed

+733
-341
lines changed

appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ init:
66

77
version: build-{build}~branch-{branch}
88

9+
cache:
10+
- C:\ProgramData\chocolatey\bin -> appveyor.yml
11+
- C:\ProgramData\chocolatey\lib -> appveyor.yml
12+
913
clone_depth: 1
1014

1115
build_script:

client/mysql.cc

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ extern "C" {
9999
# endif
100100
# endif
101101
#define HAVE_READLINE
102-
#define USE_POPEN
103102
#endif
103+
#define USE_POPEN
104104
}
105105

106106
#ifdef HAVE_VIDATTR
@@ -4193,11 +4193,6 @@ com_nopager(String *buffer __attribute__((unused)),
41934193
}
41944194
#endif
41954195

4196-
4197-
/*
4198-
Sorry, you can't send the result to an editor in Win32
4199-
*/
4200-
42014196
#ifdef USE_POPEN
42024197
static int
42034198
com_edit(String *buffer,char *line __attribute__((unused)))
@@ -4218,7 +4213,7 @@ com_edit(String *buffer,char *line __attribute__((unused)))
42184213

42194214
if (!(editor = (char *)getenv("EDITOR")) &&
42204215
!(editor = (char *)getenv("VISUAL")))
4221-
editor = "vi";
4216+
editor = IF_WIN("notepad","vi");
42224217
strxmov(buff,editor," ",filename,NullS);
42234218
if ((error= system(buff)))
42244219
{
@@ -4233,7 +4228,7 @@ com_edit(String *buffer,char *line __attribute__((unused)))
42334228
if ((fd = my_open(filename,O_RDONLY, MYF(MY_WME))) < 0)
42344229
goto err;
42354230
(void) buffer->alloc((uint) stat_arg.st_size);
4236-
if ((tmp=read(fd,(char*) buffer->ptr(),buffer->alloced_length())) >= 0L)
4231+
if ((tmp=(int)my_read(fd,(uchar*) buffer->ptr(),buffer->alloced_length(),MYF(0))) >= 0)
42374232
buffer->length((uint) tmp);
42384233
else
42394234
buffer->length(0);

mysql-test/main/compound.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# MDEV-5317 Compound statement / anonymous blocks
33
#
4-
source include/have_log_bin.inc;
4+
source include/have_binlog_format_mixed_or_statement.inc;
55
delimiter |;
66

77
CREATE TABLE t1 (a INT PRIMARY KEY)|
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--character-set-server=utf8mb4,latin1 --collation-server=utf8mb4_unicode_ci
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Start of 10.3 tests
3+
#
4+
#
5+
# MDEV-27195 SIGSEGV in Table_scope_and_contents_source_st::vers_check_system_fields
6+
#
7+
CREATE TABLE t1 ENGINE=MyISAM WITH SYSTEM VERSIONING AS SELECT 0;
8+
DROP TABLE t1;
9+
#
10+
# End of 10.3 tests
11+
#
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--echo #
2+
--echo # Start of 10.3 tests
3+
--echo #
4+
5+
--echo #
6+
--echo # MDEV-27195 SIGSEGV in Table_scope_and_contents_source_st::vers_check_system_fields
7+
--echo #
8+
9+
CREATE TABLE t1 ENGINE=MyISAM WITH SYSTEM VERSIONING AS SELECT 0;
10+
DROP TABLE t1;
11+
12+
13+
--echo #
14+
--echo # End of 10.3 tests
15+
--echo #

mysql-test/main/disabled.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 chang
1616
#show_explain : Psergey: random timeout in range-checked-for-each record query.
1717
file_contents : MDEV-6526 these files are not installed anymore
1818
max_statement_time : cannot possibly work, depends on timing
19-
partition_open_files_limit : open_files_limit check broken by MDEV-18360

mysql-test/main/order_by_innodb.result

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,5 +198,28 @@ id id
198198
1 NULL
199199
2 1
200200
3 3
201+
#
202+
# MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ... LIMIT
203+
#
204+
# This must NOT have "Range checked for each record" without any
205+
# provisions to produce rows in the required ordering:
206+
explain
207+
select
208+
t1.id,t2.id
209+
from
210+
t1 left join
211+
t2 on t2.id2 = t1.id and
212+
t2.id = (select dd.id
213+
from t2 dd
214+
where
215+
dd.id2 = t1.id and
216+
d1 > '2019-02-06 00:00:00'
217+
order by
218+
dd.d1, dd.d2, dd.id limit 1
219+
);
220+
id select_type table type possible_keys key key_len ref rows Extra
221+
1 PRIMARY t1 index NULL PRIMARY 4 NULL # Using index
222+
1 PRIMARY t2 eq_ref PRIMARY,id2 PRIMARY 4 func # Using where
223+
2 DEPENDENT SUBQUERY dd range id2,for_latest_sort for_latest_sort 6 NULL # Using where
201224
drop table t1,t2;
202225
# End of 10.2 tests

mysql-test/main/order_by_innodb.test

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,28 @@ from
184184
order by
185185
dd.d1 desc, dd.d2 desc, dd.id desc limit 1
186186
);
187+
188+
--echo #
189+
--echo # MDEV-27270: Wrong query plan with Range Checked for Each Record and ORDER BY ... LIMIT
190+
--echo #
191+
192+
--echo # This must NOT have "Range checked for each record" without any
193+
--echo # provisions to produce rows in the required ordering:
194+
--replace_column 9 #
195+
explain
196+
select
197+
t1.id,t2.id
198+
from
199+
t1 left join
200+
t2 on t2.id2 = t1.id and
201+
t2.id = (select dd.id
202+
from t2 dd
203+
where
204+
dd.id2 = t1.id and
205+
d1 > '2019-02-06 00:00:00'
206+
order by
207+
dd.d1, dd.d2, dd.id limit 1
208+
);
187209
drop table t1,t2;
188210

189211
--echo # End of 10.2 tests

mysql-test/main/partition_open_files_limit.result

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
DROP TABLE IF EXISTS `t1`;
2+
call mtr.add_suppression("option 'table_open_cache'");
3+
call mtr.add_suppression("option 'max_connections'");
24
# Bug#46922: crash when adding partitions and open_files_limit is reached
35
CREATE TABLE t1 (a INT PRIMARY KEY)
46
ENGINE=MyISAM PARTITION BY KEY () PARTITIONS 1;

0 commit comments

Comments
 (0)