[Bug 1609557] Re: GROUP BY / HAVING fails to return results
dweber
1609557 at bugs.launchpad.net
Wed Aug 3 21:24:14 UTC 2016
** Description changed:
Ubuntu 12.04 is running on Travis.ci with sqlite 3.7.9 and that's where
we ran into this bug.
-
- On an old sqlite3
+ On sqlite3 3.6.20 (and likely the version on Travis, which is 3.7.9, but
+ not on 3.7.17):
```
sqlite> SELECT * FROM ingests;
- id ingest_id bag_id ingested created_at
+ id ingest_id bag_id ingested created_at
---------- ------------------------------------ ---------- ---------- --------------------------
1 99bb3c9c-79b8-4fb4-bd16-91273a9485c4 1 f 2016-08-03 22:39:37.173484
2 06ac1f23-73a0-4185-9ce8-a3bb33079e68 1 t 2016-08-03 19:39:56.164517
3 308d53c9-a30d-403e-b7d9-182cdd22b33a 2 f 2016-08-03 18:40:20.198619
4 03f98430-c9b7-4500-aae8-4e3fcecdd56b 2 t 2016-08-02 20:40:38.293054
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
sqlite> # wtf?
```
When using sqlite 3.13.0 it returns results, i.e.
```
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
- id ingest_id bag_id ingested created_at
+ id ingest_id bag_id ingested created_at
---------- ------------------------------------ ---------- ---------- --------------------------
1 99bb3c9c-79b8-4fb4-bd16-91273a9485c4 1 f 2016-08-03 22:39:37.173484
3 308d53c9-a30d-403e-b7d9-182cdd22b33a 2 f 2016-08-03 18:40:20.198619
```
** Description changed:
Ubuntu 12.04 is running on Travis.ci with sqlite 3.7.9 and that's where
- we ran into this bug.
+ we ran into this bug (see https://github.com/travis-ci/travis-
+ ci/issues/6406).
On sqlite3 3.6.20 (and likely the version on Travis, which is 3.7.9, but
not on 3.7.17):
```
sqlite> SELECT * FROM ingests;
id ingest_id bag_id ingested created_at
---------- ------------------------------------ ---------- ---------- --------------------------
1 99bb3c9c-79b8-4fb4-bd16-91273a9485c4 1 f 2016-08-03 22:39:37.173484
2 06ac1f23-73a0-4185-9ce8-a3bb33079e68 1 t 2016-08-03 19:39:56.164517
3 308d53c9-a30d-403e-b7d9-182cdd22b33a 2 f 2016-08-03 18:40:20.198619
4 03f98430-c9b7-4500-aae8-4e3fcecdd56b 2 t 2016-08-02 20:40:38.293054
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
sqlite> # wtf?
```
When using sqlite 3.13.0 it returns results, i.e.
```
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
id ingest_id bag_id ingested created_at
---------- ------------------------------------ ---------- ---------- --------------------------
1 99bb3c9c-79b8-4fb4-bd16-91273a9485c4 1 f 2016-08-03 22:39:37.173484
3 308d53c9-a30d-403e-b7d9-182cdd22b33a 2 f 2016-08-03 18:40:20.198619
```
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sqlite3 in Ubuntu.
https://bugs.launchpad.net/bugs/1609557
Title:
GROUP BY / HAVING fails to return results
Status in sqlite3 package in Ubuntu:
New
Bug description:
Ubuntu 12.04 is running on Travis.ci with sqlite 3.7.9 and that's
where we ran into this bug (see https://github.com/travis-ci/travis-
ci/issues/6406).
On sqlite3 3.6.20 (and likely the version on Travis, which is 3.7.9,
but not on 3.7.17):
```
sqlite> SELECT * FROM ingests;
id ingest_id bag_id ingested created_at
---------- ------------------------------------ ---------- ---------- --------------------------
1 99bb3c9c-79b8-4fb4-bd16-91273a9485c4 1 f 2016-08-03 22:39:37.173484
2 06ac1f23-73a0-4185-9ce8-a3bb33079e68 1 t 2016-08-03 19:39:56.164517
3 308d53c9-a30d-403e-b7d9-182cdd22b33a 2 f 2016-08-03 18:40:20.198619
4 03f98430-c9b7-4500-aae8-4e3fcecdd56b 2 t 2016-08-02 20:40:38.293054
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
sqlite> # wtf?
```
When using sqlite 3.13.0 it returns results, i.e.
```
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
id ingest_id bag_id ingested created_at
---------- ------------------------------------ ---------- ---------- --------------------------
1 99bb3c9c-79b8-4fb4-bd16-91273a9485c4 1 f 2016-08-03 22:39:37.173484
3 308d53c9-a30d-403e-b7d9-182cdd22b33a 2 f 2016-08-03 18:40:20.198619
```
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sqlite3/+bug/1609557/+subscriptions
More information about the foundations-bugs
mailing list