Skip to content

Commit b4ec331

Browse files
committed
Merge 10.4 into 10.5
2 parents 2916a7e + 3e5a11e commit b4ec331

File tree

11 files changed

+123
-10
lines changed

11 files changed

+123
-10
lines changed

mysql-test/main/cte_nonrecursive.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ NULL UNION RESULT <union4,5> ALL NULL NULL NULL NULL NULL NULL
11261126
NULL UNION RESULT <union11,12> ALL NULL NULL NULL NULL NULL NULL
11271127
NULL UNION RESULT <union1,6> ALL NULL NULL NULL NULL NULL NULL
11281128
Warnings:
1129-
Note 1003 with cte_e as (with cte_o as (with cte_i as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2`
1129+
Note 1003 with cte_e as (with cte_o as (with cte_i as (/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)/* select#3 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)/* select#4 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union /* select#5 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)/* select#1 */ select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union /* select#6 */ select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2`
11301130
drop table t1;
11311131
#
11321132
# MDEV-13753: embedded CTE in a VIEW created in prepared statement

mysql-test/main/cte_recursive.result

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4790,3 +4790,22 @@ a
47904790
NULL
47914791
DROP TABLE t1;
47924792
# End of 10.3 tests
4793+
#
4794+
# MDEV-26108: Recursive CTE embedded into another CTE which is used twice
4795+
#
4796+
create table t1 (a int);
4797+
insert into t1 values (5), (7);
4798+
with cte_e as (
4799+
with recursive cte_r as (
4800+
select a from t1 union select a+1 as a from cte_r r where a < 10
4801+
) select * from cte_r
4802+
) select * from cte_e s1, cte_e s2 where s1.a=s2.a;
4803+
a a
4804+
5 5
4805+
7 7
4806+
6 6
4807+
8 8
4808+
9 9
4809+
10 10
4810+
drop table t1;
4811+
# End of 10.4 tests

mysql-test/main/cte_recursive.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3087,3 +3087,20 @@ SELECT * FROM cte;
30873087
DROP TABLE t1;
30883088

30893089
--echo # End of 10.3 tests
3090+
3091+
--echo #
3092+
--echo # MDEV-26108: Recursive CTE embedded into another CTE which is used twice
3093+
--echo #
3094+
3095+
create table t1 (a int);
3096+
insert into t1 values (5), (7);
3097+
3098+
with cte_e as (
3099+
with recursive cte_r as (
3100+
select a from t1 union select a+1 as a from cte_r r where a < 10
3101+
) select * from cte_r
3102+
) select * from cte_e s1, cte_e s2 where s1.a=s2.a;
3103+
3104+
drop table t1;
3105+
3106+
--echo # End of 10.4 tests

mysql-test/main/wolfssl.result

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SELECT @@ssl_cipher;
2+
@@ssl_cipher
3+
ECDHE-RSA-AES256-GCM-SHA384
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@@ -470,4 +470,4 @@
2+
FROM information_schema.global_status
3+
WHERE variable_name = 'innodb_instant_alter_column';
4+
instants
5+
-33
6+
+32
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
# Default values that applies to all MySQL Servers
3+
[mysqld]
4+
local-infile
5+
character-set-server= latin1
6+
default-storage-engine=myisam
7+
8+
# Increase default connect_timeout to avoid intermittent
9+
# disconnects when test servers are put under load see BUG#28359
10+
connect-timeout= 60
11+
12+
log-bin-trust-function-creators=1
13+
key_buffer_size= 1M
14+
sort_buffer_size= 256K
15+
max_heap_table_size= 1M
16+
17+
loose-innodb_data_file_path= ibdata1:10M:autoextend
18+
loose-innodb_buffer_pool_size= 8M
19+
loose-innodb_lru_scan_depth= 100
20+
loose-innodb_write_io_threads= 2
21+
loose-innodb_read_io_threads= 2
22+
loose-innodb_log_buffer_size= 1M
23+
loose-innodb_log_file_size= 5M
24+
loose-innodb_log_files_in_group= 2
25+
26+
slave-net-timeout=120
27+
28+
log-bin=mysqld-bin
29+
30+
# No performance schema sizing provided
31+
32+
# Disable everything, we only need the sizing data,
33+
# and also need a stable output for show engine performance_schema status
34+
loose-performance-schema-consumer-global-instrumentation=OFF
35+
36+
loose-performance-schema-instrument='%=ON'
37+
38+
loose-performance-schema-consumer-events-stages-current=ON
39+
loose-performance-schema-consumer-events-stages-history=ON
40+
loose-performance-schema-consumer-events-stages-history-long=ON
41+
loose-performance-schema-consumer-events-statements-current=ON
42+
loose-performance-schema-consumer-events-statements-history=ON
43+
loose-performance-schema-consumer-events-statements-history-long=ON
44+
loose-performance-schema-consumer-events-transactions-current=ON
45+
loose-performance-schema-consumer-events-transactions-history=ON
46+
loose-performance-schema-consumer-events-transactions-history-long=ON
47+
loose-performance-schema-consumer-events-waits-current=ON
48+
loose-performance-schema-consumer-events-waits-history=ON
49+
loose-performance-schema-consumer-events-waits-history-long=ON
50+
loose-performance-schema-consumer-thread-instrumentation=ON
51+
52+
binlog-direct-non-transactional-updates
53+

mysql-test/suite/perfschema/include/have_aligned_memory.inc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
# For tests sensitive to the internal sizes (show engine performance_schema
55
# status), make sure we use a platform with aligned memory.
66

7-
--disable_query_log
8-
let $aligned = `SELECT count(*) from performance_schema.session_connect_attrs where PROCESSLIST_ID = connection_id() and ATTR_NAME = '_os' and ATTR_VALUE in ('Linux', 'Windows')`;
9-
if (!$aligned)
7+
if (`SELECT count(*)=0 from performance_schema.session_connect_attrs where PROCESSLIST_ID = connection_id() and ATTR_NAME = '_os' and ATTR_VALUE in ('Linux', 'Windows')`)
108
{
119
skip Need a platform with aligned memory;
1210
}
13-
--enable_query_log

sql/sql_cte.cc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,7 @@ st_select_lex_unit *With_element::clone_parsed_spec(LEX *old_lex,
10391039

10401040
bool parse_status= false;
10411041
st_select_lex *with_select;
1042+
st_select_lex *last_clone_select;
10421043

10431044
char save_end= unparsed_spec.str[unparsed_spec.length];
10441045
((char*) &unparsed_spec.str[unparsed_spec.length])[0]= '\0';
@@ -1125,11 +1126,14 @@ st_select_lex_unit *With_element::clone_parsed_spec(LEX *old_lex,
11251126
lex->unit.include_down(with_table->select_lex);
11261127
lex->unit.set_slave(with_select);
11271128
lex->unit.cloned_from= spec;
1129+
last_clone_select= lex->all_selects_list;
1130+
while (last_clone_select->next_select_in_list())
1131+
last_clone_select= last_clone_select->next_select_in_list();
11281132
old_lex->all_selects_list=
11291133
(st_select_lex*) (lex->all_selects_list->
1130-
insert_chain_before(
1131-
(st_select_lex_node **) &(old_lex->all_selects_list),
1132-
with_select));
1134+
insert_chain_before(
1135+
(st_select_lex_node **) &(old_lex->all_selects_list),
1136+
last_clone_select));
11331137

11341138
/*
11351139
Now all references to the CTE defined outside of the cloned specification

storage/spider/mysql-test/spider/r/basic_sql.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,12 @@ connection master_1;
721721
create table t2345678911234567892123456789312345678941234567895123234234(id int) ENGINE=SPIDER
722722
COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"';
723723
drop table t2345678911234567892123456789312345678941234567895123234234;
724+
#
725+
# MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes
726+
#
727+
create table mdev_26139 (id int) ENGINE=SPIDER
728+
COMMENT="host '192.168.21.1', user 'spider', password 'password', database 'test'";
729+
drop table mdev_26139;
724730

725731
deinit
726732
connection master_1;

storage/spider/mysql-test/spider/t/basic_sql.test

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,6 +2682,13 @@ create table t2345678911234567892123456789312345678941234567895123234234(id int)
26822682
COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"';
26832683
drop table t2345678911234567892123456789312345678941234567895123234234;
26842684

2685+
--echo #
2686+
--echo # MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes
2687+
--echo #
2688+
create table mdev_26139 (id int) ENGINE=SPIDER
2689+
COMMENT="host '192.168.21.1', user 'spider', password 'password', database 'test'";
2690+
drop table mdev_26139;
2691+
26852692
--echo
26862693
--echo deinit
26872694
--disable_warnings

0 commit comments

Comments
 (0)