mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Automerge
This commit is contained in:
commit
8a3d59ea99
3 changed files with 42 additions and 6 deletions
|
@ -6963,6 +6963,22 @@ CALL p1();
|
|||
CALL p1();
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #46629: Item_in_subselect::val_int(): Assertion `0'
|
||||
# on subquery inside a SP
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(a INT, b INT PRIMARY KEY);
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
SELECT a FROM t1 A WHERE A.b IN (SELECT b FROM t2 AS B);
|
||||
END|
|
||||
CALL p1;
|
||||
ERROR 42S22: Unknown column 'A.b' in 'IN/ALL/ANY subquery'
|
||||
CALL p1;
|
||||
ERROR 42S22: Unknown column 'A.b' in 'IN/ALL/ANY subquery'
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1, t2;
|
||||
# ------------------------------------------------------------------
|
||||
# -- End of 5.1 tests
|
||||
# ------------------------------------------------------------------
|
||||
|
|
|
@ -8242,6 +8242,28 @@ while ($tab_count)
|
|||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #46629: Item_in_subselect::val_int(): Assertion `0'
|
||||
--echo # on subquery inside a SP
|
||||
--echo #
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(a INT, b INT PRIMARY KEY);
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p1 ()
|
||||
BEGIN
|
||||
SELECT a FROM t1 A WHERE A.b IN (SELECT b FROM t2 AS B);
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
CALL p1;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
CALL p1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
--echo # ------------------------------------------------------------------
|
||||
--echo # -- End of 5.1 tests
|
||||
--echo # ------------------------------------------------------------------
|
||||
|
|
|
@ -155,13 +155,11 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref)
|
|||
if (check_stack_overrun(thd, STACK_MIN_SIZE, (uchar*)&res))
|
||||
return TRUE;
|
||||
|
||||
res= engine->prepare();
|
||||
|
||||
// all transformation is done (used by prepared statements)
|
||||
changed= 1;
|
||||
|
||||
if (!res)
|
||||
if (!(res= engine->prepare()))
|
||||
{
|
||||
// all transformation is done (used by prepared statements)
|
||||
changed= 1;
|
||||
|
||||
if (substitution)
|
||||
{
|
||||
int ret= 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue