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
DROP TABLE IF EXISTS `c_file`;
CREATE TABLE `c_file` (
`filename` varchar(255) NOT NULL,
`data` text NOT NULL,
`timestamp` bigint NOT NULL,
PRIMARY KEY (`filename`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `c_file` (`filename`,`data`,`timestamp`) VALUES ('huey.txt','huey task queue',1515225600);
INSERT INTO `c_file` (`filename`,`data`,`timestamp`) VALUES ('peewee.txt','peewee orm',1515052800);
INSERT INTO `c_file` (`filename`,`data`,`timestamp`) VALUES ('walrus.txt','walrus redis toolkit',1515139200);
DROP TABLE IF EXISTS `c_note`;
CREATE TABLE `c_note` (
`id` int NOT NULL AUTO_INCREMENT,
`content` text NOT NULL,
`timestamp` bigint NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
INSERT INTO `c_note` (`id`,`content`,`timestamp`) VALUES (1,'note-a',1514793600);
INSERT INTO `c_note` (`id`,`content`,`timestamp`) VALUES (2,'note-b',1514880000);
INSERT INTO `c_note` (`id`,`content`,`timestamp`) VALUES (3,'note-c',1514966400);
Consider the following query
(SELECT `t1`.`content`, `t1`.`timestamp` FROM `c_note` AS `t1`) UNION (SELECT `t2`.`filename`, `t2`.`timestamp` FROM `c_file` AS `t2`) ORDER BY timestamp DESC LIMIT 4;
Consider the following setup:
Consider the following query
Dolt incorrectly returns
Mysql correctly returns
The text was updated successfully, but these errors were encountered: