Skip to content

Assertion failure when using JAROWINKLER in ORDER BY clause #7528

Closed

Description

@suyZhong

Describe the bug
The SELECT statement should execute without causing the database to crash. Ideally, the query should return no rows or handle the NULL value appropriately according to SQL standards.

To Reproduce

DROP TABLE IF EXISTS t0 CASCADE;

CREATE TABLE t0(c1 VARCHAR);
SELECT * FROM t0 WHERE NOT NULL ORDER BY JAROWINKLER('a', NULL) DESC; -- unexpected end of file

Expected behavior
As mentioned above

Screenshots

backtrace (using gdb):

#0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=139792386434624) at ./nptl/pthread_kill.c:44
#1  __pthread_kill_internal (signo=6, threadid=139792386434624) at ./nptl/pthread_kill.c:78
#2  __GI___pthread_kill (threadid=139792386434624, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
#3  0x00007f23f68c5476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0x00007f23f68ab7f3 in __GI_abort () at ./stdlib/abort.c:79
#5  0x00007f23f68ab71b in __assert_fail_base (fmt=0x7f23f6a60130 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=0x7f23f829fbdf "!strNil(s)", file=0x7f23f829fba8 "/app/MonetDB/monetdb5/modules/atoms/str.c", 
    line=147, function=<optimized out>) at ./assert/assert.c:92
#6  0x00007f23f68bce96 in __GI___assert_fail (assertion=0x7f23f829fbdf "!strNil(s)", 
    file=0x7f23f829fba8 "/app/MonetDB/monetdb5/modules/atoms/str.c", line=147, 
    function=0x7f23f82a1a38 <__PRETTY_FUNCTION__.74> "UTF8_strlen") at ./assert/assert.c:101
#7  0x00007f23f80c094b in UTF8_strlen () from /usr/local/lib/libmonetdb5-11.50.0.so.35
#8  0x00007f23f81d1ae0 in TXTSIMjarowinkler () from /usr/local/lib/libmonetdb5-11.50.0.so.35
#9  0x00007f23f808c326 in malCommandCall () from /usr/local/lib/libmonetdb5-11.50.0.so.35
#10 0x00007f23f808f7fe in runMALsequence () from /usr/local/lib/libmonetdb5-11.50.0.so.35
#11 0x00007f23f8093446 in DFLOWworker () from /usr/local/lib/libmonetdb5-11.50.0.so.35
#12 0x00007f23f735fa48 in thread_starter () from /usr/local/lib/libbat-11.50.0.so.28
#13 0x00007f23f6917ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#14 0x00007f23f69a8a04 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

Software versions
Build from source https://www.monetdb.org/documentation-Dec2023/dev-guide/installation-from-source/#summary:

> docker exec -it monetdb-test mserver5 --version         
MonetDB 5 server 11.50.0 (hg id: 389e974) (64-bit, 128-bit integers)
This is an unreleased version
Copyright (c) 1993 - July 2008 CWI
Copyright (c) August 2008 - 2023 MonetDB B.V., all rights reserved
Visit https://www.monetdb.org/ for further information
Found 503.5GiB available memory, 128 available cpu cores
Libraries:
Compiled by: @efa472fb0bee (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc 
Linking    : /usr/bin/ld

Issue labeling
Bug

Additional context
Add any other context about the problem here.

Activity

  1. added a commit that references this issue on May 30, 2024
    18bae4c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions