1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-26452 SIGSEGV in Item::cleanup from Item::cleanup_processor

This commit is contained in:
Sergei Golubchik
2021-08-23 15:54:07 +02:00
parent 0299ec29d4
commit 0860b17ef3
3 changed files with 30 additions and 9 deletions

View File

@ -1,4 +1,3 @@
drop table if exists t1,t2,t3;
create table t1 (libname varchar(21) not null, city text, primary key (libname));
create table t2 (isbn varchar(21) not null, author text, title text, primary key (isbn));
create table t3 (isbn varchar(21) not null, libname varchar(21) not null, quantity int ,primary key (isbn,libname));
@ -131,3 +130,16 @@ count(distinct a)
10
drop table t1;
set @@tmp_table_size = default;
#
# End of 5.5 tests
#
#
# MDEV-26452 SIGSEGV in Item::cleanup from Item::cleanup_processor
#
create table t (a int,b date,primary key(a,b));
select b,count(distinct a) from t group by b having b is null;
b count(distinct a)
drop table t;
#
# End of 10.7 tests
#

View File

@ -2,10 +2,6 @@
# Problem with count(distinct)
#
--disable_warnings
drop table if exists t1,t2,t3;
--enable_warnings
create table t1 (libname varchar(21) not null, city text, primary key (libname));
create table t2 (isbn varchar(21) not null, author text, title text, primary key (isbn));
create table t3 (isbn varchar(21) not null, libname varchar(21) not null, quantity int ,primary key (isbn,libname));
@ -149,6 +145,17 @@ select count(distinct a) from t1;
drop table t1;
set @@tmp_table_size = default;
#
# End of 5.5 tests
#
--echo #
--echo # End of 5.5 tests
--echo #
--echo #
--echo # MDEV-26452 SIGSEGV in Item::cleanup from Item::cleanup_processor
--echo #
create table t (a int,b date,primary key(a,b));
select b,count(distinct a) from t group by b having b is null;
drop table t;
--echo #
--echo # End of 10.7 tests
--echo #

View File

@ -2647,7 +2647,7 @@ public:
bool depends_only_on(table_map view_map)
{ return marker & MARKER_FULL_EXTRACTION; }
int get_extraction_flag()
int get_extraction_flag() const
{ return marker & MARKER_EXTRACTION_MASK; }
void set_extraction_flag(int16 flags)
{
@ -4433,6 +4433,8 @@ public:
virtual void top_level_item() override {}
void set_join_tab_idx(uint8 join_tab_idx_arg) override
{ DBUG_ASSERT(0); }
void cleanup() override {}
};
/* The following variablese are stored in a read only segment */