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

Null type resolution in disjunction fails (sqlsmith) #6313

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

Null type resolution in disjunction fails (sqlsmith) #6313

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

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2017-05-13 14:14:44 +0200
From: @mlkersten
To: SQL devs <>
Version: 11.25.21 (Dec2016-SP4)
CC: @njnes

Last updated: 2017-07-17 16:07:42 +0200

Comment 25315

Date: 2017-05-13 14:14:44 +0200
From: @mlkersten

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko/20100101 Firefox/53.0
Build Identifier:

It seems that the type resolution of the following predicate is incorrect.

where ((select r_regionkey from sys.region) is NULL)
or ((select index_type_name from sys.index_types) is not NULL);

Reproducible: Always

Steps to Reproduce:

select auxiliary
from sys.tablestoragemodel
where ((select r_regionkey from sys.region) is NULL)
or ((select index_type_name from sys.index_types) is not NULL);

Comment 25320

Date: 2017-05-13 23:25:09 +0200
From: @mlkersten

Another disjoint query shows similar problems.

select
sample_69.f_table_catalog as c2
from
sys.storagemodel as sample_65
left join sys.geometry_columns as sample_69
on (sample_65.type = sample_69.f_table_catalog )
where
((select default_schema from sys.users) is NULL)
or (cast(coalesce((select side_effect from sys.functions) ,
sample_65.revsorted) as boolean) is not NULL);

!types boolean(1,0) and int(32,0) are not equal for column 'L140'

Comment 25360

Date: 2017-05-31 16:46:02 +0200
From: MonetDB Mercurial Repository <>

Changeset 595f2fed54eb 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=595f2fed54eb

Changeset description:

fixes for bug #6313, ie compare types of a union on the parts which need
to be unioned (ie not the intermediate selects + subquery crossproducts or joins)

Comment 25361

Date: 2017-05-31 16:54:10 +0200
From: @njnes

fixed, ie check union types on the base tables not on the intermediates needed for the or expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant