Bug #45656 multi table delete over multi databases does not work
Submitted: 22 Jun 16:18 Modified: 22 Jun 20:11
Reporter: Corin Langosch
Status: Duplicate
Category:Server: General Severity:S2 (Serious)
Version:5.1.30-enterprise-gpl-pro OS:Any
Assigned to: Target Version:
Tags: multi delete, multi databases

[22 Jun 16:18] Corin Langosch
Description:
A multi delete statements spaning of multiple databases does not work.

How to repeat:
CREATE DATABASE `a` ;
CREATE TABLE `a`.`a` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE = MYISAM;

CREATE DATABASE `b` ;
CREATE TABLE `b`.`a` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE = MYISAM  ;
CREATE TABLE `b`.`b` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY
) ENGINE = MYISAM  ;

DELETE aa . * FROM a.a AS aa,b.b AS bb WHERE aa.id = bb.id;
#1109 - Unknown table 'aa' in MULTI DELETE 

SELECT aa . * FROM a.a AS aa,b.b AS bb WHERE aa.id = bb.id;
#MySQL returned an empty result set (i.e. zero rows). (Query took 0.0002 sec)

USE b;
# MySQL returned an empty result set (i.e. zero rows).
DELETE aa. * FROM a AS aa,b AS bb WHERE aa.id = bb.id;
# MySQL returned an empty result set (i.e. zero rows).
[22 Jun 16:18] Corin Langosch
forgot server version
[22 Jun 20:11] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes
this very problem. Even if you feel that your issue is somewhat different, the resolution
is likely
to be the same. Because of this, we hope you add your comments to the original bug
instead.

Thank you for your interest in MySQL.

Duplicate of bug #27525.

Please upgrade to version 5.4.0 which inherits 6.0