Skip to content

Crash when using CHECK constraint #7577

Description

@suyZhong

Describe the bug

The following test case crashed the monetdb server.

Reproduction steps

DROP TABLE IF EXISTS t0 CASCADE;

CREATE  TABLE  t0(c0 INT, c1 INT CHECK (c0 < 10)) ;
INSERT INTO t0(c0) VALUES (11);

Expected behavior

No crash

MonetDB release

11.52.0 (hg id: 2674011)

Executables source

Self compiled and installed

Operating System

Ubuntu 22.04

Additional context

backtrace:

#0  0x00007fc267a4c01f in column () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#1  0x00007fc267a66502 in sql_insert_check () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#2  0x00007fc267a66bd0 in rel2bin_insert () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#3  0x00007fc267a71b5c in subrel_bin () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#4  0x00007fc267a71ed0 in output_rel_bin () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#5  0x00007fc267aa8287 in sql_relation2stmt () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#6  0x00007fc267aa84bc in backend_dumpstmt_body () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#7  0x00007fc267aa88a3 in backend_dumpstmt () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#8  0x00007fc267a3af97 in SQLparser_body () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#9  0x00007fc267a3bb7b in SQLparser () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#10 0x00007fc267a3bd1a in SQLengine_ () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#11 0x00007fc267a3bdf0 in SQLengine () from /usr/local/lib/libmonetdbsql-11.52.0.so.15
#12 0x00007fc269cf5a9b in runScenarioBody () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#13 0x00007fc269cf5ba9 in runScenario () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#14 0x00007fc269cf7ca2 in MSserveClient () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#15 0x00007fc269cf74ad in MSscheduleClient () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#16 0x00007fc269dfb4bd in doChallenge () from /usr/local/lib/libmonetdb5-11.52.0.so.36
#17 0x00007fc268fdd626 in thread_starter () from /usr/local/lib/libbat-11.52.0.so.29
#18 0x00007fc268785ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#19 0x00007fc268816a04 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100

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

> docker exec -it monetdb-test mserver5 --version         
MonetDB 5 server 11.52.0 (hg id: 2674011) (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: @e595a82a09b6 (x86_64-pc-linux-gnu)
Compilation: /usr/bin/cc 
Linking    : /usr/bin/ld

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions