Changeset: 68db09afc566 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=68db09afc566 Added Files: sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.sql sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.err sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.out sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.sql sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.err sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.out Modified Files: sql/test/BugTracker-2015/Tests/All Branch: Jul2015 Log Message:
Test for Bug 3828 diffs (246 lines): diff --git a/sql/test/BugTracker-2015/Tests/All b/sql/test/BugTracker-2015/Tests/All --- a/sql/test/BugTracker-2015/Tests/All +++ b/sql/test/BugTracker-2015/Tests/All @@ -1,3 +1,5 @@ +alter-table.Bug-3828-part1.sql +alter-table.Bug-3828-part2.sql inet-ordering.Bug-3646 sharp-alias.Bug-3467 name_conflict.Bug-3650 diff --git a/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.sql b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.sql @@ -0,0 +1,46 @@ +CREATE TABLE hmda_lar_14 (AsOfYear DOUBLE PRECISION, RespondentID VARCHAR(255), AgencyCode VARCHAR(255), LoanType DOUBLE PRECISION, PropertyType VARCHAR(255), LoanPurpose DOUBLE PRECISION, Occupancy DOUBLE PRECISION, LoanAmount DOUBLE PRECISION, Preapproval VARCHAR(255), ActionType DOUBLE PRECISION, MSA_MD VARCHAR(255), StateCode VARCHAR(255), CountyCode VARCHAR(255), CensusTractNumber VARCHAR(255), ApplicantEthnicity VARCHAR(255), CoApplicantEthnicity VARCHAR(255), ApplicantRace1 VARCHAR(255), ApplicantRace2 VARCHAR(255), ApplicantRace3 VARCHAR(255), ApplicantRace4 VARCHAR(255), ApplicantRace5 VARCHAR(255), CoApplicantRace1 VARCHAR(255), CoApplicantRace2 VARCHAR(255), CoApplicantRace3 VARCHAR(255), CoApplicantRace4 VARCHAR(255), CoApplicantRace5 VARCHAR(255), ApplicantSex DOUBLE PRECISION, CoApplicantSex DOUBLE PRECISION, ApplicantIncome VARCHAR(255), PurchaserType VARCHAR(255), DenialReason1 VARCHAR(255), DenialReason2 VARCHAR(255), DenialReason3 VARCHAR(255), RateSpread VARCHAR(2 55), HOEPAStatus VARCHAR(255), LienStatus VARCHAR(255), EditStatus VARCHAR(255), SequenceNumber VARCHAR(255), Population VARCHAR(255), MinorityPopulationPct VARCHAR(255), HUDMedianFamilyIncome VARCHAR(255), TracttoMSA_MDIncomePct VARCHAR(255), NumberofOwnerOccupiedUnits VARCHAR(255), Numberof1to4Familyunits VARCHAR(255), ApplicationDateIndicator DOUBLE PRECISION); + +ALTER TABLE hmda_lar_14 ADD COLUMN temp_double DOUBLE; +ALTER TABLE hmda_lar_14 DROP COLUMN tracttomsa_mdincomepct; +ALTER TABLE hmda_lar_14 ADD COLUMN tracttomsa_mdincomepct DOUBLE; +ALTER TABLE hmda_lar_14 DROP COLUMN temp_double; +ALTER TABLE hmda_lar_14 ADD COLUMN temp_double DOUBLE; +ALTER TABLE hmda_lar_14 DROP COLUMN numberofowneroccupiedunits; +ALTER TABLE hmda_lar_14 ADD COLUMN numberofowneroccupiedunits DOUBLE; +ALTER TABLE hmda_lar_14 DROP COLUMN temp_double; +ALTER TABLE hmda_lar_14 ADD COLUMN temp_double DOUBLE; +ALTER TABLE hmda_lar_14 DROP COLUMN numberof1to4familyunits; +ALTER TABLE hmda_lar_14 ADD COLUMN numberof1to4familyunits DOUBLE; +ALTER TABLE hmda_lar_14 DROP COLUMN temp_double; + +CREATE TABLE hmda_ins_14 ( + activityyear DOUBLE, + respondentid VARCHAR(255), + agencycode VARCHAR(255), + fedtaxid VARCHAR(255), + respondentname_ts VARCHAR(255), + respondentmailingaddress VARCHAR(255), + respondentcity_ts VARCHAR(255), + respondentstate_ts VARCHAR(255), + respondentzipcode VARCHAR(255), + parentname_ts VARCHAR(255), + parentaddress VARCHAR(255), + parentcity_ts VARCHAR(255), + parentstate_ts VARCHAR(255), + parentzipcode VARCHAR(255), + respondentname_panel VARCHAR(255), + respondentcity_panel VARCHAR(255), + respondentstate_panel VARCHAR(255), + assets_panel DOUBLE, + otherlendercode_panel DOUBLE, + regioncode_panel DOUBLE, + larcount DOUBLE, + validityerror VARCHAR(255) +); + +CREATE TABLE hmda_14 AS SELECT a.* , b.activityyear, b.fedtaxid, b.respondentname_ts, b.respondentmailingaddress, b.respondentcity_ts, b.respondentstate_ts, b.respondentzipcode, b.parentname_ts, b.parentaddress, b.parentcity_ts, b.parentstate_ts, b.parentzipcode, b.respondentname_panel, b.respondentcity_panel, b.respondentstate_panel, b.assets_panel, b.otherlendercode_panel, b.regioncode_panel, b.larcount, b.validityerror FROM hmda_lar_14 AS a INNER JOIN hmda_ins_14 AS b ON a.respondentid = b.respondentid AND a.agencycode = b.agencycode WITH DATA; + +select actiontype, propertytype, loanpurpose, count(*) as num_records from hmda_14 group by actiontype, propertytype, loanpurpose; + +select tables.name, columns.name, location from tables inner join columns on tables.id=columns.table_id left join storage on tables.name=storage.table and columns.name=storage.column where location is null and tables.name like 'hmda%'; + diff --git a/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.err b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.err @@ -0,0 +1,37 @@ +stderr of test 'alter-table.Bug-3828-part1` in directory 'sql/test/BugTracker-2015` itself: + + +# 14:20:06 > +# 14:20:06 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33859" "--set" "mapi_usock=/var/tmp/mtest-40632/.s.monetdb.33859" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_BugTracker-2015" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 14:20:06 > + +# builtin opt gdk_dbpath = /Users/hannes/monetdb-install/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = no +# builtin opt monet_prompt = > +# builtin opt monet_daemon = no +# builtin opt mapi_port = 50000 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_optimizer = default_pipe +# builtin opt sql_debug = 0 +# cmdline opt gdk_nr_threads = 0 +# cmdline opt mapi_open = true +# cmdline opt mapi_port = 33859 +# cmdline opt mapi_usock = /var/tmp/mtest-40632/.s.monetdb.33859 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_BugTracker-2015 +# cmdline opt mal_listing = 0 +# cmdline opt embedded_r = yes +# cmdline opt gdk_debug = 536870922 + +# 14:20:06 > +# 14:20:06 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-40632" "--port=33859" +# 14:20:06 > + + +# 14:20:07 > +# 14:20:07 > "Done." +# 14:20:07 > + diff --git a/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.out b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part1.stable.out @@ -0,0 +1,106 @@ +stdout of test 'alter-table.Bug-3828-part1` in directory 'sql/test/BugTracker-2015` itself: + + +# 14:20:06 > +# 14:20:06 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=33859" "--set" "mapi_usock=/var/tmp/mtest-40632/.s.monetdb.33859" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/Users/hannes/monetdb-install/var/MonetDB/mTests_sql_test_BugTracker-2015" "--set" "mal_listing=0" "--set" "embedded_r=yes" +# 14:20:06 > + +# MonetDB 5 server v11.21.6 +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2015', using 4 threads +# Compiled for x86_64-apple-darwin14.5.0/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 16.000 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://dhcp-44.eduroam.cwi.nl:33859/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-40632/.s.monetdb.33859 +# MonetDB/GIS module loaded +# Start processing logs sql/sql_logs version 52200 +# Finished processing logs sql/sql_logs +# MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. +# SQL catalog created, loading sql scripts once +# loading sql script: 09_like.sql +# loading sql script: 10_math.sql +# loading sql script: 11_times.sql +# loading sql script: 12_url.sql +# loading sql script: 13_date.sql +# loading sql script: 14_inet.sql +# loading sql script: 15_querylog.sql +# loading sql script: 16_tracelog.sql +# loading sql script: 17_temporal.sql +# loading sql script: 20_vacuum.sql +# loading sql script: 21_dependency_functions.sql +# loading sql script: 22_clients.sql +# loading sql script: 23_skyserver.sql +# loading sql script: 24_zorder.sql +# loading sql script: 25_debug.sql +# loading sql script: 26_sysmon.sql +# loading sql script: 27_rejects.sql +# loading sql script: 39_analytics.sql +# loading sql script: 39_analytics_hge.sql +# loading sql script: 40_geom.sql +# loading sql script: 40_json.sql +# loading sql script: 40_json_hge.sql +# loading sql script: 41_md5sum.sql +# loading sql script: 45_uuid.sql +# loading sql script: 46_gsl.sql +# loading sql script: 51_sys_schema_extension.sql +# loading sql script: 75_storagemodel.sql +# loading sql script: 80_statistics.sql +# loading sql script: 80_udf.sql +# loading sql script: 80_udf_hge.sql +# loading sql script: 90_generator.sql +# loading sql script: 90_generator_hge.sql +# loading sql script: 99_system.sql + +# 14:20:06 > +# 14:20:06 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-40632" "--port=33859" +# 14:20:06 > + +#CREATE TABLE hmda_lar_14 (AsOfYear DOUBLE PRECISION, RespondentID VARCHAR(255), AgencyCode VARCHAR(255), LoanType DOUBLE PRECISION, PropertyType VARCHAR(255), LoanPurpose DOUBLE PRECISION, Occupancy DOUBLE PRECISION, LoanAmount DOUBLE PRECISION, Preapproval VARCHAR(255), ActionType DOUBLE PRECISION, MSA_MD VARCHAR(255), StateCode VARCHAR(255), CountyCode VARCHAR(255), CensusTractNumber VARCHAR(255), ApplicantEthnicity VARCHAR(255), CoApplicantEthnicity VARCHAR(255), ApplicantRace1 VARCHAR(255), ApplicantRace2 VARCHAR(255), ApplicantRace3 VARCHAR(255), ApplicantRace4 VARCHAR(255), ApplicantRace5 VARCHAR(255), CoApplicantRace1 VARCHAR(255), CoApplicantRace2 VARCHAR(255), CoApplicantRace3 VARCHAR(255), CoApplicantRace4 VARCHAR(255), CoApplicantRace5 VARCHAR(255), ApplicantSex DOUBLE PRECISION, CoApplicantSex DOUBLE PRECISION, ApplicantIncome VARCHAR(255), PurchaserType VARCHAR(255), DenialReason1 VARCHAR(255), DenialReason2 VARCHAR(255), DenialReason3 VARCHAR(255), RateSpread VARCHAR( 255), HOEPAStatus VARCHAR(255), LienStatus VARCHAR(255), EditStatus VARCHAR(255), SequenceNumber VARCHAR(255), Population VARCHAR(255), MinorityPopulationPct VARCHAR(255), HUDMedianFamilyIncome VARCHAR(255), TracttoMSA_MDIncomePct VARCHAR(255), NumberofOwnerOccupiedUnits VARCHAR(255), Numberof1to4Familyunits VARCHAR(255), ApplicationDateIndicator DOUBLE PRECISION); +#ALTER TABLE hmda_lar_14 ADD COLUMN temp_double DOUBLE; +#ALTER TABLE hmda_lar_14 DROP COLUMN tracttomsa_mdincomepct; +#ALTER TABLE hmda_lar_14 ADD COLUMN tracttomsa_mdincomepct DOUBLE; +#ALTER TABLE hmda_lar_14 DROP COLUMN temp_double; +#ALTER TABLE hmda_lar_14 ADD COLUMN temp_double DOUBLE; +#ALTER TABLE hmda_lar_14 DROP COLUMN numberofowneroccupiedunits; +#ALTER TABLE hmda_lar_14 ADD COLUMN numberofowneroccupiedunits DOUBLE; +#ALTER TABLE hmda_lar_14 DROP COLUMN temp_double; +#ALTER TABLE hmda_lar_14 ADD COLUMN temp_double DOUBLE; +#ALTER TABLE hmda_lar_14 DROP COLUMN numberof1to4familyunits; +#ALTER TABLE hmda_lar_14 ADD COLUMN numberof1to4familyunits DOUBLE; +#ALTER TABLE hmda_lar_14 DROP COLUMN temp_double; +#CREATE TABLE hmda_ins_14 ( +# activityyear DOUBLE, +# respondentid VARCHAR(255), +# agencycode VARCHAR(255), +# fedtaxid VARCHAR(255), +# respondentname_ts VARCHAR(255), +# respondentmailingaddress VARCHAR(255), +# respondentcity_ts VARCHAR(255), +# respondentstate_ts VARCHAR(255), +# respondentzipcode VARCHAR(255), +# parentname_ts VARCHAR(255), +# parentaddress VARCHAR(255), +# parentcity_ts VARCHAR(255), +# parentstate_ts VARCHAR(255), +#CREATE TABLE hmda_14 AS SELECT a.* , b.activityyear, b.fedtaxid, b.respondentname_ts, b.respondentmailingaddress, b.respondentcity_ts, b.respondentstate_ts, b.respondentzipcode, b.parentname_ts, b.parentaddress, b.parentcity_ts, b.parentstate_ts, b.parentzipcode, b.respondentname_panel, b.respondentcity_panel, b.respondentstate_panel, b.assets_panel, b.otherlendercode_panel, b.regioncode_panel, b.larcount, b.validityerror FROM hmda_lar_14 AS a INNER JOIN hmda_ins_14 AS b ON a.respondentid = b.respondentid AND a.agencycode = b.agencycode WITH DATA; +#select actiontype, propertytype, loanpurpose, count(*) as num_records from hmda_14 group by actiontype, propertytype, loanpurpose; +% sys.hmda_14, sys.hmda_14, sys.hmda_14, sys.L1 # table_name +% actiontype, propertytype, loanpurpose, num_records # name +% double, varchar, double, wrd # type +% 24, 0, 24, 1 # length +#select tables.name, columns.name, location from tables inner join columns on tables.id=columns.table_id left join storage on tables.name=storage.table and columns.name=storage.column where location is null and tables.name like 'hmda%'; +% .tables, .columns, .storage # table_name +% name, name, location # name +% varchar, varchar, clob # type +% 0, 0, 0 # length + +# 14:20:07 > +# 14:20:07 > "Done." +# 14:20:07 > + diff --git a/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.sql b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.sql @@ -0,0 +1,8 @@ +select actiontype, propertytype, loanpurpose, count(*) as num_records from hmda_14 group by actiontype, propertytype, loanpurpose; + +-- produces timeout/segfault, disabled for now +-- select tables.name, columns.name, location from tables inner join columns on tables.id=columns.table_id left join storage on tables.name=storage.table and columns.name=storage.column where location is null and tables.name like 'hmda%'; + +drop table hmda_lar_14; +drop table hmda_ins_14; +drop table hmda_14; diff --git a/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.err b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.err @@ -0,0 +1,2 @@ + +# manually created, should not produce any error diff --git a/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.out b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2015/Tests/alter-table.Bug-3828-part2.stable.out @@ -0,0 +1,8 @@ + +# manually created + +#select actiontype, propertytype, loanpurpose, count(*) as num_records from hmda_14 group by actiontype, propertytype, loanpurpose; +% sys.hmda_14, sys.hmda_14, sys.hmda_14, sys.L1 # table_name +% actiontype, propertytype, loanpurpose, num_records # name +% double, varchar, double, wrd # type +% 24, 0, 24, 1 # length _______________________________________________ checkin-list mailing list [email protected] https://www.monetdb.org/mailman/listinfo/checkin-list
