[SERVER-6081] Querying count on non-existent table returns 0 instead of error Created: 13/Jun/12 Updated: 11/Nov/13 Resolved: 23/Jun/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | 2.0.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ben McCann | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
Running "db.asdfqwerty.count();" returns 0 if table "asdfqwerty" does not exist. This scared the crap out of me. I had a typo in my table name and thought I deleted the whole table. It would be much better if this returned an error. |
| Comments |
| Comment by Eliot Horowitz (Inactive) [ 23/Jun/12 ] |
|
Given that there is no create generally, people generally want this behavior (returning 0). |