Add ability to define NAMESPACE without DATABASE
Once somebody had specified USE NAMESPACE to select a namespace, it was not possible to DEFINE a DATABASE underneath the NAMESPACE, as an error that ‘no database is selected’ would be returned. Not it is possible to DEFINE DATABASE having selected only a NAMESPACE.
This commit is contained in:
parent
7d88c389e1
commit
b724d864f8
1 changed files with 6 additions and 1 deletions
|
@ -54,7 +54,12 @@ func (o *options) get(kind int) (kv, ns, db string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
if ns == "" || db == "" {
|
||||
if kind >= AuthNS && ns == "" {
|
||||
err = &BlankError{}
|
||||
return
|
||||
}
|
||||
|
||||
if kind >= AuthDB && db == "" {
|
||||
err = &BlankError{}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue