mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
A bug with tables with different ref_length's whose order is
changed in table initialization
This commit is contained in:
parent
9e65ac47ea
commit
3e16752ebf
4 changed files with 72 additions and 13 deletions
|
|
@ -80,3 +80,28 @@ while ($1)
|
|||
enable_query_log;
|
||||
delete t1 from t1,t2 where t1.id1 = t2.id2 and t1.id1 > 500;
|
||||
drop table t1,t2;
|
||||
DROP TABLE IF EXISTS a,b,c;
|
||||
CREATE TABLE a (
|
||||
id int(11) NOT NULL default '0',
|
||||
name varchar(10) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
INSERT INTO a VALUES (1,'aaa'),(2,'aaa'),(3,'aaa');
|
||||
CREATE TABLE b (
|
||||
id int(11) NOT NULL default '0',
|
||||
name varchar(10) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
INSERT INTO b VALUES (2,'bbb'),(3,'bbb'),(4,'bbb');
|
||||
CREATE TABLE c (
|
||||
id int(11) NOT NULL default '0',
|
||||
mydate datetime default NULL,
|
||||
PRIMARY KEY (id)
|
||||
) TYPE=MyISAM;
|
||||
INSERT INTO c VALUES (1,'2002-02-04 00:00:00'),(3,'2002-05-12 00:00:00'),(5,'2002-05-12 00:00:00'),(6,'2002-06-22
|
||||
00:00:00'),(7,'2002-07-22 00:00:00');
|
||||
delete a,b,c from a,b,c
|
||||
where to_days(now())-to_days(c.mydate)>=30
|
||||
and c.id=a.id and c.id=b.id;
|
||||
select * from c;
|
||||
DROP TABLE IF EXISTS a,b,c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue