diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.cc b/server/modules/filter/dbfwfilter/dbfwfilter.cc index d930b95e3..f73c65f36 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.cc +++ b/server/modules/filter/dbfwfilter/dbfwfilter.cc @@ -1383,9 +1383,13 @@ int DbfwSession::routeQuery(GWBUF* buffer) } SUser suser = find_user_data(this_thread.users, user(), remote()); - bool query_ok = command_is_mandatory(buffer); + bool query_ok = false; - if (suser) + if (command_is_mandatory(buffer)) + { + query_ok = true; + } + else if (suser) { char* rname = NULL; bool match = suser->match(m_instance, this, analyzed_queue, &rname);