Project

General

Profile

8459.patch

Radu Apetrii, 03/18/2024 03:50 AM

Download (980 Bytes)

View differences:

new/src/main/org/h2/expression/condition/Comparison.java 2024-03-18 07:37:57 +0000
249 249
    @Override
250 250
    public Value getValue(Session session) {
251 251
        Value l = left.getValue(session);
252
        // Optimization: do not evaluate right if not necessary
253
        if (l == ValueNull.INSTANCE && (compareType & NULL_SAFE) == 0) {
254
            return ValueNull.INSTANCE;
255
        }
256 252
        return compare(database, l, right.getValue(session), compareType);
257 253
    }
258 254

  
......
269 265
        Value result;
270 266
        switch (compareType) {
271 267
        case EQUAL: {
272
            int cmp = database.compareWithNull(l, r, true);
268
            int cmp = database.compare(l, r);
273 269
            if (cmp == 0) {
274 270
                result = ValueBoolean.TRUE;
275 271
            } else if (cmp == Integer.MIN_VALUE) {