Changeset: 7d90474e5d48 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7d90474e5d48 Modified Files: sql/backends/monet5/rel_bin.c sql/test/SQLancer/Tests/sqlancer02.sql sql/test/SQLancer/Tests/sqlancer02.stable.out Branch: clean-candidates Log Message:
Merged with default diffs (293 lines): diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve the sytem +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Create a setting with minimal input for an external user to demonstrate him the buggy behavior. +This includes the relevant part of the database schema description. +Performance trace of the roque query (using the TRACE command) + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Software versions** + - MonetDB version number [a milestone label] + - OS and version: [e.g. Ubuntu 18.04] + - Installed from release package or self-installed and compiled + + +**Issue labeling ** +Make liberal use of the labels to characterise the issue topics. e.g. identify severity, version, etc.. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at i...@monetdb.org. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c --- a/sql/backends/monet5/rel_bin.c +++ b/sql/backends/monet5/rel_bin.c @@ -3762,7 +3762,7 @@ insert_check_fkey(backend *be, list *ins s = stmt_binop(be, stmt_aggr(be, idx_inserts, NULL, NULL, cnt, 1, 0, 1), stmt_atom_lng(be, 1), ne); } else { /* releqjoin.count <> inserts[col1].count */ - s = stmt_binop(be, stmt_aggr(be, idx_inserts, NULL, NULL, cnt, 1, 0, 1), stmt_aggr(be, s, NULL, NULL, cnt, 1, 0, 1), ne); + s = stmt_binop(be, stmt_aggr(be, idx_inserts, NULL, NULL, cnt, 1, 0, 1), stmt_aggr(be, column(be, s), NULL, NULL, cnt, 1, 0, 1), ne); } /* s should be empty */ diff --git a/sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.sql b/sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.sql --- a/sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.sql +++ b/sql/test/BugTracker-2017/Tests/insert_self_ref_FK.Bug-6131.sql @@ -45,3 +45,9 @@ 0.5299192301063729 0.7609386265982908 ROLLBACK; + +START TRANSACTION; +CREATE TABLE "t0"("tc0" CHARACTER LARGE OBJECT NOT NULL,CONSTRAINT "t0_tc0_pkey" PRIMARY KEY ("tc0"), +CONSTRAINT "t0_tc0_fkey" FOREIGN KEY ("tc0") REFERENCES "sys"."t0" ("tc0")); +INSERT INTO t0(tc0) VALUES('b' BETWEEN 'a' AND 'c'); +ROLLBACK; diff --git a/sql/test/SQLancer/Tests/All b/sql/test/SQLancer/Tests/All --- a/sql/test/SQLancer/Tests/All +++ b/sql/test/SQLancer/Tests/All @@ -5,3 +5,4 @@ sqlancer04 sqlancer05 sqlancer06 sqlancer07 +sqlancer08 diff --git a/sql/test/SQLancer/Tests/sqlancer02.sql b/sql/test/SQLancer/Tests/sqlancer02.sql --- a/sql/test/SQLancer/Tests/sqlancer02.sql +++ b/sql/test/SQLancer/Tests/sqlancer02.sql @@ -241,8 +241,9 @@ ROLLBACK; SELECT CASE 1 WHEN 1 THEN 'rr' WHEN ln(-2) THEN 'a' END FROM (values (1),(2)) as t0(c0); -- rr -- rr -SELECT CASE 1 WHEN 3 THEN 'rr' WHEN ln(-2) THEN 'a' END FROM (values (1),(2)) as t0(c0); - -- error, ln -2 cannot be computed +SELECT CASE 1 WHEN 3 THEN 'rr' WHEN ln(c0) THEN 'a' END FROM (values (1.2),(2.3)) as t0(c0); + -- NULL + -- NULL START TRANSACTION; CREATE TABLE "sys"."t0" ("tc0" TIMESTAMP NOT NULL,CONSTRAINT "t0_tc0_pkey" PRIMARY KEY ("tc0"),CONSTRAINT "t0_tc0_unique" UNIQUE ("tc0")); diff --git a/sql/test/SQLancer/Tests/sqlancer02.stable.err b/sql/test/SQLancer/Tests/sqlancer02.stable.err --- a/sql/test/SQLancer/Tests/sqlancer02.stable.err +++ b/sql/test/SQLancer/Tests/sqlancer02.stable.err @@ -26,9 +26,6 @@ MAPI = (monetdb) /var/tmp/mtest-817278/ QUERY = SELECT 1 WHERE scale_up(CAST(0.89767724 AS REAL), 1); --error function scale_up not available for real,tinyint ERROR = !types real(24,0) and boolean(1,0) are not equal CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-713199/.s.monetdb.36377 -QUERY = SELECT CASE 1 WHEN 3 THEN 'rr' WHEN ln(-2) THEN 'a' END FROM (values (1),(2)) as t0(c0); -ERROR = !Math exception: Numerical argument out of domain # 17:04:12 > # 17:04:12 > "Done." diff --git a/sql/test/SQLancer/Tests/sqlancer02.stable.out b/sql/test/SQLancer/Tests/sqlancer02.stable.out --- a/sql/test/SQLancer/Tests/sqlancer02.stable.out +++ b/sql/test/SQLancer/Tests/sqlancer02.stable.out @@ -343,6 +343,13 @@ stdout of test 'sqlancer02` in directory % 2 # length [ "rr" ] [ "rr" ] +#SELECT CASE 1 WHEN 3 THEN 'rr' WHEN ln(c0) THEN 'a' END FROM (values (1.2),(2.3)) as t0(c0); +% .%4 # table_name +% %4 # name +% char # type +% 2 # length +[ NULL ] +[ NULL ] #START TRANSACTION; #CREATE TABLE "sys"."t0" ("tc0" TIMESTAMP NOT NULL,CONSTRAINT "t0_tc0_pkey" PRIMARY KEY ("tc0"),CONSTRAINT "t0_tc0_unique" UNIQUE ("tc0")); #COPY 4 RECORDS INTO "sys"."t0" FROM stdin USING DELIMITERS E'\t',E'\n','"'; diff --git a/sql/test/SQLancer/Tests/sqlancer08.sql b/sql/test/SQLancer/Tests/sqlancer08.sql new file mode 100644 --- /dev/null +++ b/sql/test/SQLancer/Tests/sqlancer08.sql @@ -0,0 +1,9 @@ +START TRANSACTION; +CREATE TABLE "t0" ("tc0" VARCHAR(32) NOT NULL,CONSTRAINT "t0_tc0_pkey" PRIMARY KEY ("tc0"),CONSTRAINT "t0_tc0_unique" UNIQUE ("tc0")); +INSERT INTO "t0" VALUES ('1048409847'), ('ph'), ('CV'), ('T\t'), ('!iG&'); +CREATE TABLE "t1" ("tc0" VARCHAR(32) NOT NULL,CONSTRAINT "t1_tc0_unique" UNIQUE ("tc0"),CONSTRAINT "t1_tc0_fkey" FOREIGN KEY ("tc0") REFERENCES "t1" ("tc0")); +select 1 from t0 join t1 on sql_min(true, t1.tc0 between rtrim(t0.tc0) and 'a'); + -- empty +select cast("isauuid"(t1.tc0) as int) from t0 full outer join t1 on +not (sql_min(not ((interval '505207731' day) in (interval '1621733891' day)), (nullif(t0.tc0, t1.tc0)) between asymmetric (rtrim(t0.tc0)) and (cast((r'_7') in (r'', t0.tc0) as string(891))))); +ROLLBACK; diff --git a/sql/test/SQLancer/Tests/sqlancer08.stable.err b/sql/test/SQLancer/Tests/sqlancer08.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/SQLancer/Tests/sqlancer08.stable.err @@ -0,0 +1,12 @@ +stderr of test 'sqlancer08` in directory 'sql/test/SQLancer` itself: + + +# 11:38:36 > +# 11:38:36 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-68619" "--port=38834" +# 11:38:36 > + + +# 11:38:36 > +# 11:38:36 > "Done." +# 11:38:36 > + diff --git a/sql/test/SQLancer/Tests/sqlancer08.stable.out b/sql/test/SQLancer/Tests/sqlancer08.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/SQLancer/Tests/sqlancer08.stable.out @@ -0,0 +1,34 @@ +stdout of test 'sqlancer08` in directory 'sql/test/SQLancer` itself: + + +# 11:38:36 > +# 11:38:36 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-68619" "--port=38834" +# 11:38:36 > + +#START TRANSACTION; +#CREATE TABLE "t0" ("tc0" VARCHAR(32) NOT NULL,CONSTRAINT "t0_tc0_pkey" PRIMARY KEY ("tc0"),CONSTRAINT "t0_tc0_unique" UNIQUE ("tc0")); +#INSERT INTO "t0" VALUES ('1048409847'), ('ph'), ('CV'), ('T\t'), ('!iG&'); +[ 5 ] +#CREATE TABLE "t1" ("tc0" VARCHAR(32) NOT NULL,CONSTRAINT "t1_tc0_unique" UNIQUE ("tc0"),CONSTRAINT "t1_tc0_fkey" FOREIGN KEY ("tc0") REFERENCES "t1" ("tc0")); +#select 1 from t0 join t1 on sql_min(true, t1.tc0 between rtrim(t0.tc0) and 'a'); +% .%1 # table_name +% %1 # name +% tinyint # type +% 1 # length +#select cast("isauuid"(t1.tc0) as int) from t0 full outer join t1 on +#not (sql_min(not ((interval '505207731' day) in (interval '1621733891' day)), (nullif(t0.tc0, t1.tc0)) between asymmetric (rtrim(t0.tc0)) and (cast((r'_7') in (r'', t0.tc0) as string(891))))); +% .%7 # table_name +% %7 # name +% int # type +% 1 # length +[ NULL ] +[ NULL ] +[ NULL ] +[ NULL ] +[ NULL ] +#ROLLBACK; + +# 11:38:36 > +# 11:38:36 > "Done." +# 11:38:36 > + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list