qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1698428 - /qpid/trunk/qpid/cpp/src/qpid/broker/SelectorExpression.cpp
Date Fri, 28 Aug 2015 22:16:40 GMT
Author: gsim
Date: Fri Aug 28 22:16:40 2015
New Revision: 1698428

URL: http://svn.apache.org/r1698428
Log:
QPID-6717: fix evaluation of BETWEEN and NOT IN when types are mismatched

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/SelectorExpression.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SelectorExpression.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SelectorExpression.cpp?rev=1698428&r1=1698427&r2=1698428&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SelectorExpression.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SelectorExpression.cpp Fri Aug 28 22:16:40 2015
@@ -375,6 +375,7 @@ public:
         Value vu(u->eval(env));
         if (!unknown(vu) && ve>vu) return BN_FALSE;
         if (unknown(vl) || unknown(vu)) return BN_UNKNOWN;
+        else if (numeric(ve) != numeric(vu) || numeric(ve) != numeric(vl)) return BN_FALSE;
         return BN_TRUE;
     }
 };
@@ -403,7 +404,7 @@ public:
         BoolOrNone r = BN_FALSE;
         for (std::size_t i = 0; i<l.size(); ++i){
             Value li(l[i].eval(env));
-            if (unknown(li)) {
+            if (unknown(li) || numeric(li) != numeric(ve)) {
                 r = BN_UNKNOWN;
                 continue;
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message