You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an amazing project, unfortunately it seems that this project is lack of maintaining and improvement.
I found some issues for the normal SQL parsing, such as :
CREATE TABLE IF NOT EXISTS docs ( id int(6) unsigned NOT NULL, rev int(3) unsigned NOT NULL, content varchar(200) NOT NULL,
PRIMARY KEY (id,rev)
) DEFAULT CHARSET=utf8;
INSERT INTO docs (id, rev, content) VALUES
('1', '1', 'The earth is flat'),
('2', '1', 'One hundred angels can dance on the head of a pin'),
('1', '2', 'The earth is flat and rests on a bull's horn'),
('1', '3', 'The earth is like a ball.');
SELECT a.id, a.rev, a.content
FROM docs a
INNER JOIN (
SELECT id, MAX(rev) rev
FROM docs
GROUP BY id
) b ON a.id = b.id AND a.rev = b.rev;
SELECT a.*
FROM docs a
LEFT OUTER JOIN docs b
ON a.id = b.id AND a.rev < b.rev
WHERE b.id IS NULL;
The text was updated successfully, but these errors were encountered:
This is an amazing project, unfortunately it seems that this project is lack of maintaining and improvement.
I found some issues for the normal SQL parsing, such as :
CREATE TABLE IF NOT EXISTS
docs
(id
int(6) unsigned NOT NULL,rev
int(3) unsigned NOT NULL,content
varchar(200) NOT NULL,PRIMARY KEY (
id
,rev
)) DEFAULT CHARSET=utf8;
INSERT INTO
docs
(id
,rev
,content
) VALUES('1', '1', 'The earth is flat'),
('2', '1', 'One hundred angels can dance on the head of a pin'),
('1', '2', 'The earth is flat and rests on a bull's horn'),
('1', '3', 'The earth is like a ball.');
SELECT a.id, a.rev, a.content
FROM
docs
aINNER JOIN (
SELECT id, MAX(rev) rev
FROM
docs
GROUP BY id
) b ON a.id = b.id AND a.rev = b.rev;
SELECT a.*
FROM
docs
aLEFT OUTER JOIN
docs
bON a.id = b.id AND a.rev < b.rev
WHERE b.id IS NULL;
The text was updated successfully, but these errors were encountered: