Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
f1aa066d
Commit
f1aa066d
authored
Dec 11, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes
parent
fcc9014a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
mysql-test/r/multi_update.result
mysql-test/r/multi_update.result
+9
-4
mysql-test/t/multi_update.test
mysql-test/t/multi_update.test
+10
-4
No files found.
mysql-test/r/multi_update.result
View file @
f1aa066d
...
@@ -464,9 +464,14 @@ ERROR HY000: You can't specify target table 't1' for update in FROM clause
...
@@ -464,9 +464,14 @@ ERROR HY000: You can't specify target table 't1' for update in FROM clause
delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1;
delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2.col1;
ERROR HY000: You can't specify target table 't1' for update in FROM clause
ERROR HY000: You can't specify target table 't1' for update in FROM clause
drop table t1,t2;
drop table t1,t2;
drop table if exists t2, t1;
create table t1 (
create table t1(aclid bigint not null primary key, status tinyint(1) not null ) type = innodb;
aclid bigint not null primary key,
create table t2(refid bigint not null primary key, aclid bigint, index idx_acl(aclid) )type = innodb;
status tinyint(1) not null
) engine = innodb;
create table t2 (
refid bigint not null primary key,
aclid bigint, index idx_acl(aclid)
) engine = innodb;
insert into t2 values(1,null);
insert into t2 values(1,null);
delete t2, t1 from t2
as a left join t1 as b on (a.aclid=b.aclid) where a
.refid='1';
delete t2, t1 from t2
left join t1 on (t2.aclid=t1.aclid) where t2
.refid='1';
drop table t1, t2;
drop table t1, t2;
mysql-test/t/multi_update.test
View file @
f1aa066d
...
@@ -433,10 +433,16 @@ delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2
...
@@ -433,10 +433,16 @@ delete t1 from t1,t2 where t1.col1 < (select max(col1) from t1) and t1.col1 = t2
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
# Test for BUG#5837 - delete with outer join and const tables
# Test for BUG#5837 - delete with outer join and const tables
drop
table
if
exists
t2
,
t1
;
create
table
t1
(
create
table
t1
(
aclid
bigint
not
null
primary
key
,
status
tinyint
(
1
)
not
null
)
type
=
innodb
;
aclid
bigint
not
null
primary
key
,
create
table
t2
(
refid
bigint
not
null
primary
key
,
aclid
bigint
,
index
idx_acl
(
aclid
)
)
type
=
innodb
;
status
tinyint
(
1
)
not
null
)
engine
=
innodb
;
create
table
t2
(
refid
bigint
not
null
primary
key
,
aclid
bigint
,
index
idx_acl
(
aclid
)
)
engine
=
innodb
;
insert
into
t2
values
(
1
,
null
);
insert
into
t2
values
(
1
,
null
);
delete
t2
,
t1
from
t2
as
a
left
join
t1
as
b
on
(
a
.
aclid
=
b
.
aclid
)
where
a
.
refid
=
'1'
;
delete
t2
,
t1
from
t2
left
join
t1
on
(
t2
.
aclid
=
t1
.
aclid
)
where
t2
.
refid
=
'1'
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment