Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.6.4, 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5, 10.6
-
None
Description
The problem can be reproduced as follows
create database x;
|
use x;
|
|
create table t (i int);
|
insert into t values (1);
|
|
|
delete from x.t
|
where x.t.i in (
|
with u (i) as (
|
select 1
|
)
|
select i
|
from u
|
);
|
There is an error in the DELETE statement:
SQL Error [1046] [3D000]: (conn:77) No database selected
|
Using the syntax in a SELECT statement works as expected:
select *
|
from x.t
|
where x.t.i in (
|
with u (i) as (
|
select 1
|
)
|
select i
|
from u
|
);
|
And so does replacing the CTE by a derived table:
delete from x.t
|
where x.t.i in (
|
select i
|
from (select 3 i) u
|
);
|
Attachments
Issue Links
- relates to
-
MDEV-26469 "No database selected" error reported even if a database is selected
- Closed