Details
-
Bug
-
Resolution: Fixed
-
Major
-
7.6.0, 7.2.4, 7.2.3
-
Untriaged
-
0
-
Unknown
Description
This is a server ticket for https://couchbasecloud.atlassian.net/browse/AV-69973
Repro steps:
1. Load travel-sample dataset
2. Run the following queries:
a.
select * from system:indexes
|
The result count of the above query:
"resultCount": 23 |
b. Run a COUNT() against system:indexes without a predicate.
select count(*) from system:indexes;
|
The result is:
[
|
{
|
"$1": 34 |
}
|
]
|
This is because the Count() implementation of the system:indexes keyspace does the following:
1. In 7.6.0 onwards - Counts the primary index on the _system._query collection ( which is not included in system:indexes)
2. Counts the indexes created on the bucket i.e on the bucket’s default._default collection - _twice.
Since the Object is a keyspace and a bucket.
Attachments
Issue Links
- backports to
-
MB-60294 [BP to 7.2.5] - COUNT(*) on system:indexes can return incorrect results
- Closed