Commit 4ef9c9bb authored by Daniel Black's avatar Daniel Black

Merge remote-tracking branch 10.5 into 10.6

Notably MDEV-33290, columnstore disable stays in 10.5.
parents 19f3796e 5ce6a352
......@@ -458,3 +458,43 @@ id select_type table type possible_keys key key_len ref rows Extra
NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL
Warnings:
Note 1249 Select 4 was reduced during optimization
#
# End of 10.4 tests
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
EXPLAIN SELECT * FROM t1, t2 WHERE t2.b IN (SELECT 5 UNION SELECT 6);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where; Using join buffer (flat, BNL join)
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
EXPLAIN DELETE t2 FROM t1, t2 WHERE t2.b IN (SELECT 5 UNION SELECT 6);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
prepare stmt from "EXPLAIN DELETE t2 FROM t1, t2 WHERE t2.b IN (SELECT 5 UNION SELECT 6)";
execute stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
execute stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL No tables used
3 DEPENDENT UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
DROP TABLE t1, t2;
#
# End of 10.5 tests
#
......@@ -372,3 +372,26 @@ drop table t1;
explain
VALUES ( (VALUES (2))) UNION VALUES ( (SELECT 3));
--enable_ps_protocol
--echo #
--echo # End of 10.4 tests
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (3),(4);
EXPLAIN SELECT * FROM t1, t2 WHERE t2.b IN (SELECT 5 UNION SELECT 6);
EXPLAIN DELETE t2 FROM t1, t2 WHERE t2.b IN (SELECT 5 UNION SELECT 6);
prepare stmt from "EXPLAIN DELETE t2 FROM t1, t2 WHERE t2.b IN (SELECT 5 UNION SELECT 6)";
execute stmt;
execute stmt;
# Cleanup
DROP TABLE t1, t2;
--echo #
--echo # End of 10.5 tests
--echo #
......@@ -917,6 +917,10 @@ int Log_event_writer::write_header(uchar *pos, size_t len)
int Log_event_writer::write_data(const uchar *pos, size_t len)
{
DBUG_ENTER("Log_event_writer::write_data");
if (!len)
DBUG_RETURN(0);
if (checksum_len)
crc= my_checksum(crc, pos, len);
......
......@@ -28716,7 +28716,6 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
bool distinct,const char *message)
{
THD *thd=join->thd;
select_result *result=join->result;
DBUG_ENTER("select_describe");
if (join->select_lex->pushdown_select)
......@@ -28751,7 +28750,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order,
if (unit->explainable())
{
if (mysql_explain_union(thd, unit, result))
if (mysql_explain_union(thd, unit, unit->result))
DBUG_VOID_RETURN;
}
}
......@@ -29,14 +29,17 @@
#include <thr_alarm.h>
#include "sql_connect.h"
#include "thread_cache.h"
#if defined(HAVE_MALLINFO) || defined(HAVE_MALLINFO2)
#if defined(HAVE_MALLOC_H)
#include <malloc.h>
#elif defined(HAVE_SYS_MALLOC_H)
#endif
#if defined(HAVE_SYS_MALLOC_H)
#include <sys/malloc.h>
#elif defined(HAVE_MALLOC_ZONE)
#include <malloc/malloc.h>
#endif
#if defined(HAVE_MALLOC_ZONE)
#include <malloc/malloc.h>
#endif
#ifdef HAVE_EVENT_SCHEDULER
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment