Skip to content

Commit

Permalink
Merge tag 'mariadb-10.0.35' into 10.0-galera
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Lindström committed May 7, 2018
2 parents 648cf71 + 42fac32 commit e1ffb66
Show file tree
Hide file tree
Showing 323 changed files with 5,001 additions and 2,835 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pcre/testdata/greppatN4 -text
*.frm binary
*.MYD binary
*.MYI binary
*.jar binary

*.c diff=cpp
*.h diff=cpp
Expand Down
3 changes: 1 addition & 2 deletions CREDITS
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ The current main sponsors of the MariaDB Foundation are:

Alibaba Cloud https://www.alibabacloud.com/ (2017)
Booking.com https://www.booking.com (2013)
MariaDB Corporation https://www.mariadb.com (2013)
Microsoft https://microsoft.com/ (2017)
Tencent Cloud https://cloud.tencent.com (2017)
Development Bank of Singapore https://dbs.com (2016)
IBM https://www.ibm.com (2017)
MariaDB Corporation https://www.mariadb.com (2013)
Visma https://visma.com (2015)
Acronis http://acronis.com (2016)
Nexedi https://www.nexedi.com (2016)
Automattic https://automattic.com (2014)
Tencent Game DBA http://tencentdba.com/about (2016)
Tencent TDSQL http://tdsql.org (2016)
Verkkokauppa.com https://www.verkkokauppa.com (2015)
Expand Down
2 changes: 1 addition & 1 deletion client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ void close_statements()
for (con= connections; con < next_con; con++)
{
if (con->stmt)
mysql_stmt_close(con->stmt);
do_stmt_close(con);
con->stmt= 0;
}
DBUG_VOID_RETURN;
Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Build-Depends: bison,
${LIBREADLINE_DEV}
Standards-Version: 3.8.3
Homepage: http://mariadb.org/
Vcs-Browser: http://bazaar.launchpad.net/~maria-captains/maria/10.0/files
Vcs-Bzr: bzr://lp:maria
Vcs-Browser: https://github.com/MariaDB/server/
Vcs-Git: https://github.com/MariaDB/server.git

Package: mariadb-galera-test-10.0
Section: database
Expand Down
3 changes: 1 addition & 2 deletions mysql-test/r/contributors.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ Booking.com https://www.booking.com Founding member, Platinum Sponsor of the Mar
Alibaba Cloud https://www.alibabacloud.com/ Platinum Sponsor of the MariaDB Foundation
Tencent Cloud https://cloud.tencent.com Platinum Sponsor of the MariaDB Foundation
Microsoft https://microsoft.com/ Platinum Sponsor of the MariaDB Foundation
MariaDB Corporation https://mariadb.com Founding member, Gold Sponsor of the MariaDB Foundation
MariaDB Corporation https://mariadb.com Founding member, Platinum Sponsor of the MariaDB Foundation
Visma https://visma.com Gold Sponsor of the MariaDB Foundation
DBS https://dbs.com Gold Sponsor of the MariaDB Foundation
IBM https://www.ibm.com Gold Sponsor of the MariaDB Foundation
Nexedi https://www.nexedi.com Silver Sponsor of the MariaDB Foundation
Acronis http://www.acronis.com Silver Sponsor of the MariaDB Foundation
Auttomattic https://automattic.com Bronze Sponsor of the MariaDB Foundation
Verkkokauppa.com https://www.verkkokauppa.com Bronze Sponsor of the MariaDB Foundation
Virtuozzo https://virtuozzo.com Bronze Sponsor of the MariaDB Foundation
Tencent Game DBA http://tencentdba.com/about Bronze Sponsor of the MariaDB Foundation
Expand Down
10 changes: 10 additions & 0 deletions mysql-test/r/dyncol.result
Original file line number Diff line number Diff line change
Expand Up @@ -1883,5 +1883,15 @@ SELECT COLUMN_JSON(COLUMN_CREATE('test','First line\nSecond line')) AS json;
json
{"test":"First line\u000ASecond line"}
#
# MDEV-15230: column_json breaks cyrillic in 10.1.31
#
set names utf8;
create table t1 (b blob);
insert into t1 values (column_create('description',column_create('title','Описание')));
select column_json(b) from t1;
column_json(b)
{"description":{"title":"Описание"}}
drop table t1;
#
# end of 10.0 tests
#
6 changes: 6 additions & 0 deletions mysql-test/r/func_concat.result
Original file line number Diff line number Diff line change
Expand Up @@ -262,3 +262,9 @@ c2
abcdefghi-abcdefghi
DROP TABLE t1;
SET optimizer_switch=@save_optimizer_switch;
#
# MDEV-13790 UNHEX() of a somewhat complicated CONCAT() returns NULL
#
SELECT UNHEX(CONCAT('414C2', HEX(8 + ROUND(RAND()*7)), SUBSTR(SHA(UUID()),6,33),HEX(2+ROUND(RAND()*8)))) IS NULL AS c1;
c1
0
14 changes: 7 additions & 7 deletions mysql-test/r/func_misc.result
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,13 @@ AND 57813X540X1723 = 'Test';
N AVG
0 NULL
drop table t1;
SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
ERROR HY000: Incorrect arguments to NAME_CONST
SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
ERROR HY000: Incorrect arguments to NAME_CONST
SELECT NAME_CONST('a', -(1)) OR 1;
NAME_CONST('a', -(1)) OR 1
1
#
# MDEV-15630 uuid() function evaluates at wrong time in query
#
Expand All @@ -582,13 +589,6 @@ COUNT(1) uid
1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
1 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
DROP TABLE t1;
SELECT NAME_CONST('a', -(1 OR 2)) OR 1;
ERROR HY000: Incorrect arguments to NAME_CONST
SELECT NAME_CONST('a', -(1 AND 2)) OR 1;
ERROR HY000: Incorrect arguments to NAME_CONST
SELECT NAME_CONST('a', -(1)) OR 1;
NAME_CONST('a', -(1)) OR 1
1
#
# End of 5.5 tests
#
Expand Down
37 changes: 37 additions & 0 deletions mysql-test/r/func_str.result
Original file line number Diff line number Diff line change
Expand Up @@ -4551,3 +4551,40 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select char(0xdf) AS `CHAR(0xDF)`
#
# MDEV-15619 using CONVERT() inside AES_ENCRYPT() in an UPDATE corrupts data
#
CREATE TABLE t1 (
id int(11) NOT NULL,
session_id varchar(255) DEFAULT NULL,
directory mediumtext,
checksum int(10) DEFAULT NULL,
last_update datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY lastupdate (last_update)
) DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,'',NULL,38391,'2017-06-24 07:35:28');
UPDATE t1 SET directory = AES_ENCRYPT(CONVERT('test stringrererejrjerjehrjekhrjkehrjkehrkjehrjkerhkjehrjekrhkjehrkjerhjkehrkjehrkjehrjkehrjkehrjkehrjkerjkehrjkehrjkehrjke rekjhrejrejhrjehgrehjgrhjerjhegrjherejhgrjhegrjehgrjhegrejhrgjehgrjhegrjhegrjhergjhegrjhegrhjegrjerhthkjjkdhjkgdfjkgjkdgdjkfjkhgjkfdhjgjkfdghkjdfghkjfdghfjkdghkdjfghdkjfghfjkdghfkjdghkjfdghfkjdghfkdjghfkjdghfdjkghjkdfhgdfjkghfjkdghfjkdghfjdkghfjkdghkfjdghfkjdghfkjdghkjdfghfjdkghjkfdghkjdfhgjkdfhgjkfdhgkjfdghkfjdhgkjfdgdjkejktjherjthkjrethkjrethjkerthjkerhtjkerhtkjerhtjkerhtjkerhtjkrehtkjerhtkjrehtjkrehtkjrehtkjerhtkjerhtjkrehtkjrehtjkrehtkjrethjkrethkjrehtkjethjkerhtjkrehtjkretkjerhtkjrehtjkerhtjkrehtjrehtkjrekjtrfgdsfgdhjsghjgfdhjsfhjdfgdhjshjdshjfghjdsfgjhsfgjhsdfgjhdsfgjdhsfgsjhfgjhsdfgsdjhfgjdhsfdjshfgdsjhfgjsdhfdjshfgdjhsfgdjshfgjdhsfgjhsdfgjhsdgfjhsdgfjhdsgfjhsgfjhsdgfjhdsgfhjsdehkjthrkjethjkre' USING latin1), '95F5A1F52A554'), last_update= NOW();
SELECT directory IS NULL FROM t1;
directory IS NULL
0
DROP TABLE t1;
CREATE TABLE t1 (
id int(11) NOT NULL PRIMARY KEY,
directory mediumtext
) DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,AES_ENCRYPT(CONVERT(REPEAT('a',800) USING latin1),'95F5A1F52A554'));
SELECT AES_DECRYPT(directory,'95F5A1F52A554') FROM t1;
AES_DECRYPT(directory,'95F5A1F52A554')
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
SET @enc=AES_ENCRYPT(REPEAT(_latin1'a',800),'95F5A1F52A554');
CREATE TABLE t1 (
id int(11) NOT NULL PRIMARY KEY,
directory mediumtext
) DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,AES_DECRYPT(CONVERT(@enc USING binary),'95F5A1F52A554'));
SELECT * FROM t1;
id directory
1 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
24 changes: 24 additions & 0 deletions mysql-test/r/func_time.result
Original file line number Diff line number Diff line change
Expand Up @@ -2878,5 +2878,29 @@ NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
#
# MDEV-13202 Assertion `ltime->neg == 0' failed in date_to_datetime
#
CREATE TABLE t1 (i INT, d DATE);
INSERT INTO t1 VALUES (1, '1970-01-01');
SELECT MAX(NULLIF(i,1)) FROM t1 ORDER BY DATE_SUB(d,INTERVAL 17300000 HOUR);
MAX(NULLIF(i,1))
NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
DROP TABLE t1;
CREATE TABLE t1 (i INT, d DATE);
INSERT INTO t1 VALUES (1, '1970-01-01');
SELECT CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR)) FROM t1;
CONCAT(DATE_SUB(d, INTERVAL 17300000 HOUR))
NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
DROP TABLE t1;
SELECT CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR));
CONCAT(DATE_SUB(TIMESTAMP'1970-01-01 00:00:00', INTERVAL 17300000 HOUR))
NULL
Warnings:
Warning 1441 Datetime function: datetime field overflow
#
# End of 10.0 tests
#
14 changes: 14 additions & 0 deletions mysql-test/r/having.result
Original file line number Diff line number Diff line change
Expand Up @@ -723,4 +723,18 @@ SELECT * FROM t1 JOIN t2 ON c1 = c2 HAVING c2 > 'a' ORDER BY c2 LIMIT 1;
c1 c2
x x
DROP TABLE t1,t2;
#
# MDEV-6736: Valgrind warnings 'Invalid read' in subselect_engine::calc_const_tables with SQ
# in WHERE and HAVING, ORDER BY, materialization+semijoin
#
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES (3),(8);
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
INSERT INTO t2 VALUES (2),(1);
SELECT a FROM t1
WHERE 9 IN ( SELECT MIN( a ) FROM t1 )
HAVING a <> ( SELECT COUNT(*) FROM t2 )
ORDER BY a;
a
DROP TABLE t1,t2;
End of 10.0 tests
2 changes: 2 additions & 0 deletions mysql-test/r/mysqld--help.result
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit.
--no-defaults Don't read default options from any option file.
The following specify which files/extra groups are read (specified before remaining options):
--defaults-file=# Only read default options from the given file #.
--defaults-extra-file=# Read this file after the global files are read.
--defaults-group-suffix=# Additionally read default groups with # appended as a suffix.

--allow-suspicious-udfs
Allows use of UDFs consisting of only one symbol xxx()
Expand Down
11 changes: 11 additions & 0 deletions mysql-test/r/partition.result
Original file line number Diff line number Diff line change
Expand Up @@ -2634,3 +2634,14 @@ alter table t1 drop partition if exists p5;
Warnings:
Note 1507 Error in list of partitions to DROP
DROP TABLE t1;
CREATE TABLE t1 (a INT) ENGINE=MyISAM PARTITION BY RANGE(a) (PARTITION p1 VALUES LESS THAN (0));
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES LESS THAN (1));
PREPARE stmt FROM 'ALTER TABLE t1 ADD PARTITION IF NOT EXISTS (PARTITION p2 VALUES LESS THAN (2))';
EXECUTE stmt;
Warnings:
Note 1517 Duplicate partition name p2
EXECUTE stmt;
Warnings:
Note 1517 Duplicate partition name p2
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
2 changes: 1 addition & 1 deletion mysql-test/r/perror.result
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ MySQL error code 1062 (ER_DUP_ENTRY): Duplicate entry '%-.192s' for key %d
MySQL error code 1408 (ER_STARTUP): %s: ready for connections.
Version: '%s' socket: '%s' port: %d %s
MySQL error code 1459 (ER_TABLE_NEEDS_UPGRADE): Table upgrade required. Please do "REPAIR TABLE `%-.32s`" or dump/reload to fix it!
MySQL error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %lu)
MySQL error code 1461 (ER_MAX_PREPARED_STMT_COUNT_REACHED): Can't create more than max_prepared_stmt_count statements (current value: %u)
2 changes: 1 addition & 1 deletion mysql-test/r/ps.result
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ Warnings:
Warning 1292 Truncated incorrect max_prepared_stmt_count value: '10000000000000000'
select @@max_prepared_stmt_count;
@@max_prepared_stmt_count
1048576
4294967295
set global max_prepared_stmt_count=default;
select @@max_prepared_stmt_count;
@@max_prepared_stmt_count
Expand Down
6 changes: 6 additions & 0 deletions mysql-test/r/sp-destruct.result
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,9 @@ create database mysqltest1;
create procedure mysqltest1.foo() select "foo";
update mysql.proc set name='' where db='mysqltest1';
drop database mysqltest1;
create procedure p1() set @foo = 10;
alter table mysql.proc drop primary key;
drop procedure p1;
ERROR HY000: Cannot load from mysql.proc. The table is probably corrupted
alter table mysql.proc add primary key (db,name,type);
drop procedure p1;
34 changes: 34 additions & 0 deletions mysql-test/r/sp-innodb.result
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,37 @@ SET @@innodb_lock_wait_timeout= @innodb_lock_wait_timeout_saved;
#
# BUG 16041903: End of test case
#
#
# MDEV-15035: SP using query with outer join and a parameter
# in ON expression
#
CREATE TABLE t1 (
id int NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1), (2);
CREATE TABLE t2 (
id int NOT NULL,
id_foo int NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB;
INSERT INTO t2 VALUES (1, 1);
DROP PROCEDURE IF EXISTS test_proc;
CREATE PROCEDURE test_proc(IN param int)
LANGUAGE SQL
READS SQL DATA
BEGIN
SELECT DISTINCT f.id
FROM t1 f
LEFT OUTER JOIN t2 b ON b.id_foo = f.id
WHERE (param <> 0 OR b.id IS NOT NULL);
END|
CALL test_proc(0);
id
1
CALL test_proc(1);
id
1
2
DROP PROCEDURE IF EXISTS test_proc;
DROP TABLE t1, t2;
18 changes: 18 additions & 0 deletions mysql-test/r/statistics.result
Original file line number Diff line number Diff line change
Expand Up @@ -1641,3 +1641,21 @@ FROM mysql.column_stats;
db_name table_name column_name HEX(min_value) HEX(max_value) nulls_ratio avg_frequency hist_size hist_type HEX(histogram)
test t1 a D879626AF872675F73E662F8 D879626AF872675F73E662F8 0.0000 1.0000 0 NULL NULL
drop table t1;
#
# MDEB-9744: session optimizer_use_condition_selectivity=5 causing SQL Error (1918):
# Encountered illegal value '' when converting to DECIMAL
#
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set optimizer_use_condition_selectivity=3, use_stat_tables=preferably;
create table t1 (id int(10),cost decimal(9,2)) engine=innodb;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
create temporary table t2 (id int);
insert into t2 (id) select id from t1 where cost > 0;
select * from t2;
id
set use_stat_tables=@save_use_stat_tables;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2;
26 changes: 26 additions & 0 deletions mysql-test/r/subselect_sj.result
Original file line number Diff line number Diff line change
Expand Up @@ -3155,4 +3155,30 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2`,`test`.`t4`.`c4` AS `c4` from `test`.`t1` left join (`test`.`t2` join `test`.`t4`) on(((`test`.`t2`.`c2` = `test`.`t1`.`c1`) and <in_optimizer>(`test`.`t1`.`c1`,<exists>(select `test`.`t3`.`c3` from `test`.`t3` where (<cache>(`test`.`t2`.`c2`) = `test`.`t3`.`c3`))))) where 1
DROP TABLE t1,t2,t3,t4;
#
# MDEV-13699: Assertion `!new_field->field_name.str ||
# strlen(new_field->field_name.str) == new_field->field_name.length'
# failed in create_tmp_table on 2nd execution of PS with semijoin
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
CREATE TABLE t3 (c INT);
CREATE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
INSERT INTO t3 VALUES (5),(6);
PREPARE stmt FROM
"SELECT * FROM t1
WHERE EXISTS (
SELECT * FROM t2 WHERE t1.a IN ( SELECT c AS fld FROM v3 )
)";
EXECUTE stmt;
a
EXECUTE stmt;
a
EXECUTE stmt;
a
drop view v3;
drop table t1,t2,t3;
# End of 5.5 test
set optimizer_switch=@subselect_sj_tmp;
26 changes: 26 additions & 0 deletions mysql-test/r/subselect_sj_jcl6.result
Original file line number Diff line number Diff line change
Expand Up @@ -3169,6 +3169,32 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t1`.`c1` AS `c1`,`test`.`t2`.`c2` AS `c2`,`test`.`t4`.`c4` AS `c4` from `test`.`t1` left join (`test`.`t2` join `test`.`t4`) on(((`test`.`t2`.`c2` = `test`.`t1`.`c1`) and <in_optimizer>(`test`.`t1`.`c1`,<exists>(select `test`.`t3`.`c3` from `test`.`t3` where (<cache>(`test`.`t2`.`c2`) = `test`.`t3`.`c3`))))) where 1
DROP TABLE t1,t2,t3,t4;
#
# MDEV-13699: Assertion `!new_field->field_name.str ||
# strlen(new_field->field_name.str) == new_field->field_name.length'
# failed in create_tmp_table on 2nd execution of PS with semijoin
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
CREATE TABLE t3 (c INT);
CREATE ALGORITHM=MERGE VIEW v3 AS SELECT * FROM t3;
INSERT INTO t3 VALUES (5),(6);
PREPARE stmt FROM
"SELECT * FROM t1
WHERE EXISTS (
SELECT * FROM t2 WHERE t1.a IN ( SELECT c AS fld FROM v3 )
)";
EXECUTE stmt;
a
EXECUTE stmt;
a
EXECUTE stmt;
a
drop view v3;
drop table t1,t2,t3;
# End of 5.5 test
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
Expand Down
Loading

0 comments on commit e1ffb66

Please sign in to comment.