mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 20:25:32 +02:00
Merge host.loc:/home/uchum/work/PP/5.0-opt-34620
into host.loc:/home/uchum/work/5.1-opt mysql-test/r/row.result: Auto merged sql/item.h: Auto merged
This commit is contained in:
commit
ee51eeb6de
3 changed files with 51 additions and 0 deletions
|
|
@ -434,3 +434,12 @@ SELECT @x;
|
|||
@x
|
||||
99
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
SELECT ROW(a, 1) IN (SELECT SUM(b), 1) FROM t1 GROUP BY a;
|
||||
ROW(a, 1) IN (SELECT SUM(b), 1)
|
||||
1
|
||||
SELECT ROW(a, 1) IN (SELECT SUM(b), 3) FROM t1 GROUP BY a;
|
||||
ROW(a, 1) IN (SELECT SUM(b), 3)
|
||||
0
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
|
|
@ -224,3 +224,16 @@ SET @x:= (SELECT h FROM t1 WHERE (a,b,c,d,e,f,g)=(1,2,3,4,5,6,7));
|
|||
SELECT @x;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*):
|
||||
# Assertion `0' failed
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1,1);
|
||||
|
||||
SELECT ROW(a, 1) IN (SELECT SUM(b), 1) FROM t1 GROUP BY a;
|
||||
SELECT ROW(a, 1) IN (SELECT SUM(b), 3) FROM t1 GROUP BY a;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
|
|
|||
29
sql/item.h
29
sql/item.h
|
|
@ -2157,6 +2157,35 @@ public:
|
|||
Item_field *filed_for_view_update()
|
||||
{ return (*ref)->filed_for_view_update(); }
|
||||
virtual Ref_Type ref_type() { return REF; }
|
||||
|
||||
// Row emulation: forwarding of ROW-related calls to ref
|
||||
uint cols()
|
||||
{
|
||||
return ref && result_type() == ROW_RESULT ? (*ref)->cols() : 1;
|
||||
}
|
||||
Item* element_index(uint i)
|
||||
{
|
||||
return ref && result_type() == ROW_RESULT ? (*ref)->element_index(i) : this;
|
||||
}
|
||||
Item** addr(uint i)
|
||||
{
|
||||
return ref && result_type() == ROW_RESULT ? (*ref)->addr(i) : 0;
|
||||
}
|
||||
bool check_cols(uint c)
|
||||
{
|
||||
return ref && result_type() == ROW_RESULT ? (*ref)->check_cols(c)
|
||||
: Item::check_cols(c);
|
||||
}
|
||||
bool null_inside()
|
||||
{
|
||||
return ref && result_type() == ROW_RESULT ? (*ref)->null_inside() : 0;
|
||||
}
|
||||
void bring_value()
|
||||
{
|
||||
if (ref && result_type() == ROW_RESULT)
|
||||
(*ref)->bring_value();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue