Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: Compute modulo of rand() in an UPDATE stmt crashes mserver5 #2766

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

SQL: Compute modulo of rand() in an UPDATE stmt crashes mserver5 #2766

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2011-01-21 11:37:34 +0100
From: @yzchang
To: SQL devs <>
Version: 11.1.1 (Mar2011) [obsolete]
CC: @njnes, @yzchang

Last updated: 2011-04-28 16:25:40 +0200

Comment 15399

Date: 2011-01-21 11:37:34 +0100
From: @yzchang

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.15) Gecko/20101027 Fedora/3.5.15-1.fc12 Firefox/3.5.15
Build Identifier:

The following queries result in a segmentation fault in mserver5. The cause is the combined use of mod() and rand():

create table test (v int);
insert into test values (23), (34), (12), (54);
update test set a = mod(rand(), 32);

GDB says that the problem is in .../monet/default/sql/server/sql_statement.c:708: n->data = push_project(sa, rows, n->data);

Reproducible: Always

Comment 15400

Date: 2011-01-21 11:54:33 +0100
From: @yzchang

The same error exists in the Oct2010 branch.

Comment 15673

Date: 2011-03-28 17:35:57 +0200
From: @sjoerdmullender

The Mar2011 version has been released.

Comment 15722

Date: 2011-04-05 12:45:19 +0200
From: @njnes

Changeset 28933e6ccd80 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=28933e6ccd80

Changeset description:

fixed bug #2766

used incorrect structure/pointer leading to the crash, now the correct
list is used.

Comment 15723

Date: 2011-04-05 12:46:10 +0200
From: @njnes

added test to BugTracker-2011/crash_in_modulo_rand.Bug-2766.sql

incorrect pointer was used, now the correct argument list is used.

Comment 15756

Date: 2011-04-28 16:25:40 +0200
From: @sjoerdmullender

The Apr2011 release has been uploaded.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants