mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-4269 fix.
Item_default_value inherited form Item_field so should create temporary table field similary.
This commit is contained in:
@ -185,3 +185,17 @@ member_id_to COUNT(*)
|
|||||||
518491 5
|
518491 5
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# End of test BUG#12713907
|
# End of test BUG#12713907
|
||||||
|
#
|
||||||
|
# MDEV-4269: crash when grouping by values()
|
||||||
|
#
|
||||||
|
SELECT @@storage_engine INTO @old_engine;
|
||||||
|
set storage_engine=innodb;
|
||||||
|
create table y select 1 b;
|
||||||
|
select 1 from y group by b;
|
||||||
|
1
|
||||||
|
1
|
||||||
|
select 1 from y group by values(b);
|
||||||
|
1
|
||||||
|
1
|
||||||
|
drop table y;
|
||||||
|
SET storage_engine=@old_engine;
|
||||||
|
@ -127,3 +127,17 @@ SELECT member_id_to, COUNT(*) FROM t1 WHERE r_date =
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # End of test BUG#12713907
|
--echo # End of test BUG#12713907
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-4269: crash when grouping by values()
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SELECT @@storage_engine INTO @old_engine;
|
||||||
|
set storage_engine=innodb;
|
||||||
|
|
||||||
|
create table y select 1 b;
|
||||||
|
select 1 from y group by b;
|
||||||
|
select 1 from y group by values(b);
|
||||||
|
drop table y;
|
||||||
|
SET storage_engine=@old_engine;
|
||||||
|
|
||||||
|
@ -9922,6 +9922,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
|
|||||||
}
|
}
|
||||||
case Item::FIELD_ITEM:
|
case Item::FIELD_ITEM:
|
||||||
case Item::DEFAULT_VALUE_ITEM:
|
case Item::DEFAULT_VALUE_ITEM:
|
||||||
|
case Item::INSERT_VALUE_ITEM:
|
||||||
{
|
{
|
||||||
Item_field *field= (Item_field*) item;
|
Item_field *field= (Item_field*) item;
|
||||||
bool orig_modify= modify_item;
|
bool orig_modify= modify_item;
|
||||||
|
Reference in New Issue
Block a user