Changeset: 7bab85a12527 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7bab85a12527 Modified Files: Branch: default Log Message:
Merge with Apr2011 branch. diffs (truncated from 1260 to 300 lines): diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c --- a/sql/server/rel_exp.c +++ b/sql/server/rel_exp.c @@ -638,8 +638,6 @@ { sql_exp *l = e->l, *r = e->r; - if (l->card == CARD_ATOM || r->card == CARD_ATOM) - return 1; if (exp_is_complex_select(l) || exp_is_complex_select(r)) return 1; return 0; diff --git a/sql/test/BugTracker-2011/Tests/All b/sql/test/BugTracker-2011/Tests/All --- a/sql/test/BugTracker-2011/Tests/All +++ b/sql/test/BugTracker-2011/Tests/All @@ -10,3 +10,4 @@ groupby_primary_key.Bug-2807 merge_range_exp.Bug-2806 count-count-distinct.Bug-2808 +subquery_in_from_clause.Bug-2812 diff --git a/sql/test/BugTracker-2011/Tests/subquery_in_from_clause.Bug-2812.sql b/sql/test/BugTracker-2011/Tests/subquery_in_from_clause.Bug-2812.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/subquery_in_from_clause.Bug-2812.sql @@ -0,0 +1,1024 @@ + +CREATE TABLE SALESMART ( + --ID BIGINT GENERATED ALWAYS AS IDENTITY NOT NULL PRIMARY KEY, + ITEM VARCHAR(100), + CATEGORY VARCHAR(100), + PRICE NUMERIC(10,2), + CITY VARCHAR(100), + REGION VARCHAR(100), + COUNTRY VARCHAR(100) +); + +COPY 1000 RECORDS INTO SALESMART FROM STDIN USING DELIMITERS ';', '\n', '"'; +L'Oven Fresh white bread;Baked goods;0.59;San Francisco;California;United States +Texas cheese toast;Frozen;1.49;Paris;Ile-De-France;France +Broccoli stir fry mixture;Frozen;0.89;Bluff City;Kansas;United States +Sausage, brown/serve;Frozen;0.99;Plymouth;Tobago;Trinidad and Tobago +Peppers, tricolor pack;Produce;1.99;Glendale;Arizona;United States +Cinnamon Grahams;Snack;0.99;London;Ontario;Canada +Mushrooms;Produce;0.99;Blountsville;Alabama;United States +Tissues;Nonfoods;0.89;Aalestrup;Nordjylland;Denmark +Spoon size shredded wheat;Cereal;1.69;Cairo;Illinois;United States +Cheese, Colby brick;Dairy;1.49;Crooks;South Dakota;United States +Wheat crackers (triscuit);Snack;0.99;Stirling;Scotland;United Kingdom +Eggs, large;Dairy;0.89;Blountsville;Alabama;United States +Broccoli stir fry mixture;Frozen;0.89;Helsinki;Etela-Suomen Laani;Finland +Tissues;Nonfoods;0.89;Bluff City;Kansas;United States +Baking soda;Baking;0.39;West Long Branch;New Jersey;United States +Saltines;Snack;0.69;Amsterdam;Ohio;United States +Lettuce, iceberg;Produce;0.89;North Grafton;Massachusetts;United States +Belmont chocolate chip cookies;Snack;1.49;Victoria Falls;Matabeleland North;Zimbabwe +Orange juice, not from concentrate;Dairy;1.99;Crooks;South Dakota;United States +Milk, 2%;Dairy;2.69;Hechi;Guangxi;China +Cheese, Feta, blue or gorgonzola tub;Dairy;1.69;Amsterdam;Ohio;United States +Single serve fruit/gel bowls;Canned;1.39;Cushing;Texas;United States +Broccoli stir fry mixture;Frozen;0.89;Hamburg;Illinois;United States +Celery;Produce;0.99;Amsterdam;Ohio;United States +Butter;Dairy;1.99;Prudence Island;Rhode Island;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Jerusalem;Yerushalayim (Jerusalem);Israel +Orange juice, not from concentrate;Dairy;1.99;Jerusalem;Yerushalayim (Jerusalem);Israel +Cucumber (large);Produce;0.49;Roma;Texas;United States +Vegetarian vegetable condensed soup;Canned;0.43;Bangkok;Krung Thep Mahanakhon;Thailand +Sausage, brown/serve;Frozen;0.99;Prudence Island;Rhode Island;United States +Snack crackers (ritz);Snack;1.29;Franklin Springs;New York;United States +Sausage, brown/serve;Frozen;0.99;Hawkinsville;Georgia;United States +Saltines;Snack;0.69;Paris;Ile-De-France;France +Beef/bean burrito;Frozen;0.29;Scarborough;Tobago;Trinidad and Tobago +Eggs, large;Dairy;0.89;Holguin;Holguin;Cuba +Larado paper plates;Nonfoods;0.89;Jerusalem;Yerushalayim (Jerusalem);Israel +Baking soda;Baking;0.39;Tornillo;Texas;United States +Larado paper plates;Nonfoods;0.89;Plymouth;Tobago;Trinidad and Tobago +Spoon size shredded wheat;Cereal;1.69;San Francisco;California;United States +Tissues;Nonfoods;0.89;Finlayson;Minnesota;United States +Celery;Produce;0.99;Montpellier;Languedoc-Roussillon;France +Single serve peach cups;Canned;1.39;Jose Leon Suarez;Buenos Aires;Argentina +Sausage, brown/serve;Frozen;0.99;Bluff City;Kansas;United States +Broccoli stir fry mixture;Frozen;0.89;Tornillo;Texas;United States +Beef/bean burrito;Frozen;0.29;Graysville;Tennessee;United States +Celery;Produce;0.99;Madrid;Distrito Capital;Colombia +Deluxe topping pizza;Frozen;1.99;Hamburg;Illinois;United States +Belmont chocolate chip cookies;Snack;1.49;Santiago del Estero;Santiago del Estero;Argentina +Applesauce cups (reg/cinnamon);Canned;0.89;St Andrews;Scotland;United Kingdom +Cookies, chocolate sandwich (Oreo);Snack;0.99;Thousandsticks;Kentucky;United States +Sausage, brown/serve;Frozen;0.99;Plymouth;Tobago;Trinidad and Tobago +Sausage, brown/serve;Frozen;0.99;Elizabeth;New Jersey;United States +Wheat crackers (triscuit);Snack;0.99;St Andrews;Scotland;United Kingdom +Celery;Produce;0.99;Wellington;Wellington;New Zealand +Vegetarian vegetable condensed soup;Canned;0.43;Seven Rivers;Westmoreland;Jamaica +Cheese, Feta, blue or gorgonzola tub;Dairy;1.69;Trondheim;Sor-Trondelag;Norway +Beef/bean burrito;Frozen;0.29;Douglas City;California;United States +Single serve fruit/gel bowls;Canned;1.39;Meadowlands;Minnesota;United States +Broccoli stir fry mixture;Frozen;0.89;Hamburg;Hamburg;Germany +Snack crackers (ritz);Snack;1.29;Sarajevo;Federation of Bosnia and Herzegovina;Bosnia and Herzegovina +Cookies, chocolate sandwich (Oreo);Snack;0.99;Plymouth;Tobago;Trinidad and Tobago +Bananas;Produce;0.33;Gafsa;Qafsah;Tunisia +Peppers, tricolor pack;Produce;1.99;North Grafton;Massachusetts;United States +Cucumber (large);Produce;0.49;Roxborough;Tobago;Trinidad and Tobago +Tissues;Nonfoods;0.89;Kyoto;Kyoto;Japan +Butter;Dairy;1.99;Malone;New York;United States +Saltines;Snack;0.69;Thousandsticks;Kentucky;United States +Sausage, brown/serve;Frozen;0.99;Scarborough;Tobago;Trinidad and Tobago +Texas cheese toast;Frozen;1.49;Helsinki;Etela-Suomen Laani;Finland +Snack crackers (ritz);Snack;1.29;West Long Branch;New Jersey;United States +Saltines;Snack;0.69;Amsterdam;Ohio;United States +Spoon size shredded wheat;Cereal;1.69;Beijing;Beijing;China +Sweetener packets;Baking;1.49;Jose Leon Suarez;Buenos Aires;Argentina +Rye bread, seeded;Baked goods;0.99;Chicago;Illinois;United States +Texas cheese toast;Frozen;1.49;Beijing;Beijing;China +Bananas;Produce;0.33;Plymouth;Tobago;Trinidad and Tobago +Waffles;Frozen;0.99;Graysville;Tennessee;United States +Butter;Dairy;1.99;La Rochelle;Poitou-Charentes;France +Cheese, Deli style slices, Swiss, Provolone or Muenster;Dairy;1.69;Sarajevo;Federation of Bosnia and Herzegovina;Bosnia and Herzegovina +L'Oven Fresh white bread;Baked goods;0.59;Wallops Island;Virginia;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Chicago;Illinois;United States +Beef/bean burrito;Frozen;0.29;New York;New York;United States +Cucumber (large);Produce;0.49;Cogswell;North Dakota;United States +Broccoli stir fry mixture;Frozen;0.89;Saratoga;North Carolina;United States +Applesauce cups (reg/cinnamon);Canned;0.89;West Long Branch;New Jersey;United States +Bananas;Produce;0.33;Beaverton;Michigan;United States +Cheese, Deli style slices, Swiss, Provolone or Muenster;Dairy;1.69;Beaverton;Michigan;United States +Orange juice, not from concentrate;Dairy;1.99;Ormond Beach;Florida;United States +Vegetarian vegetable condensed soup;Canned;0.43;Sarajevo;Federation of Bosnia and Herzegovina;Bosnia and Herzegovina +Baking soda;Baking;0.39;Wellington;Wellington;New Zealand +Mushrooms;Produce;0.99;Elizabeth;New Jersey;United States +Baking soda;Baking;0.39;Lone Pine;California;United States +Sweetener packets;Baking;1.49;Saratoga;North Carolina;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Cushing;Texas;United States +Baking soda;Baking;0.39;Amsterdam;Ohio;United States +L'Oven Fresh white bread;Baked goods;0.59;Roxborough;Tobago;Trinidad and Tobago +Rye bread, seeded;Baked goods;0.99;Cairo;Illinois;United States +Deluxe topping pizza;Frozen;1.99;Venlo;Limburg;Netherlands +Peppers, tricolor pack;Produce;1.99;Seven Rivers;Westmoreland;Jamaica +Tyson roasted chicken;Meat;3.99;Jose Leon Suarez;Buenos Aires;Argentina +Single serve fruit/gel bowls;Canned;1.39;Douglas City;California;United States +Saltines;Snack;0.69;Saratoga;North Carolina;United States +Cheese, Colby brick;Dairy;1.49;Sliema;Malta;Malta +Single serve peach cups;Canned;1.39;Seven Rivers;Westmoreland;Jamaica +Sausage, brown/serve;Frozen;0.99;Cairo;Illinois;United States +Waffles;Frozen;0.99;Los Angeles;California;United States +Butter;Dairy;1.99;Davos;Graubunden;Switzerland +Deluxe topping pizza;Frozen;1.99;Finlayson;Minnesota;United States +Belmont chocolate chip cookies;Snack;1.49;London;Ontario;Canada +L'Oven Fresh white bread;Baked goods;0.59;Montpellier;Languedoc-Roussillon;France +Sausage, brown/serve;Frozen;0.99;Las Vegas;Nevada;United States +Sausage, brown/serve;Frozen;0.99;Port Elizabeth;New Jersey;United States +Peppers, tricolor pack;Produce;1.99;Glendale;Arizona;United States +Single serve peach cups;Canned;1.39;Crooks;South Dakota;United States +Butter;Dairy;1.99;Sarajevo;Federation of Bosnia and Herzegovina;Bosnia and Herzegovina +Applesauce cups (reg/cinnamon);Canned;0.89;San Francisco;California;United States +Applesauce cups (reg/cinnamon);Canned;0.89;Victoria Falls;Matabeleland North;Zimbabwe +Vegetarian vegetable condensed soup;Canned;0.43;Seven Rivers;Westmoreland;Jamaica +Pudding mix, choc/vanilla;Baking;0.29;Cushing;Texas;United States +Beef/bean burrito;Frozen;0.29;Elizabeth;New Jersey;United States +Vegetarian vegetable condensed soup;Canned;0.43;Graysville;Tennessee;United States +Beef/bean burrito;Frozen;0.29;Cattaraugus;New York;United States +Sausage, brown/serve;Frozen;0.99;Cairo;Illinois;United States +Peppers, green only;Produce;1.39;Kyoto;Kyoto;Japan +Waffles;Frozen;0.99;Stirling;Scotland;United Kingdom +Milk, 2%;Dairy;2.69;Wallops Island;Virginia;United States +Sweetener packets;Baking;1.49;Wallops Island;Virginia;United States +Texas cheese toast;Frozen;1.49;Shanghai;Shanghai;China +Peppers, green only;Produce;1.39;Franklin Springs;New York;United States +Cookies, chocolate sandwich (Oreo);Snack;0.99;West Long Branch;New Jersey;United States +Celery;Produce;0.99;Port Elizabeth;New Jersey;United States +Celery;Produce;0.99;Eau Galle;Wisconsin;United States +Rye bread, seeded;Baked goods;0.99;North Grafton;Massachusetts;United States +Cheese, Feta, blue or gorgonzola tub;Dairy;1.69;Las Vegas;Nevada;United States +Potatoes, Russett;Produce;0.89;Beijing;Beijing;China +Eggs, large;Dairy;0.89;Beijing;Beijing;China +Potatoes, Russett;Produce;0.89;Sliema;Malta;Malta +Single serve peach cups;Canned;1.39;Thelma;Kentucky;United States +Belmont chocolate chip cookies;Snack;1.49;Franklin Springs;New York;United States +Single serve peach cups;Canned;1.39;Montpellier;Languedoc-Roussillon;France +Belmont chocolate chip cookies;Snack;1.49;Beijing;Beijing;China +Butter;Dairy;1.99;Barcelona;CataluÒa;Spain +Lettuce, iceberg;Produce;0.89;Victoria Falls;Matabeleland North;Zimbabwe +Bananas;Produce;0.33;Eau Galle;Wisconsin;United States +Pudding mix, choc/vanilla;Baking;0.29;Victoria Falls;Matabeleland North;Zimbabwe +Butter;Dairy;1.99;Desmet;Idaho;United States +Orange juice, not from concentrate;Dairy;1.99;Bluff City;Kansas;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Fengjie;Sichuan;China +Sweetener packets;Baking;1.49;North Grafton;Massachusetts;United States +Single serve fruit/gel bowls;Canned;1.39;Sofia;Sofiya;Bulgaria +Milk, 2%;Dairy;2.69;London;Ontario;Canada +Cucumber (large);Produce;0.49;Elizabeth;New Jersey;United States +Vegetarian vegetable condensed soup;Canned;0.43;St Andrews;Scotland;United Kingdom +Eggs, large;Dairy;0.89;Malone;New York;United States +Larado paper plates;Nonfoods;0.89;Glendale;Arizona;United States +Cucumber (large);Produce;0.49;Thelma;Kentucky;United States +Baking soda;Baking;0.39;Byron;New York;United States +Vegetarian vegetable condensed soup;Canned;0.43;Beaverton;Michigan;United States +Rye bread, seeded;Baked goods;0.99;Montpellier;Languedoc-Roussillon;France +Sweetener packets;Baking;1.49;Glendale;Arizona;United States +Cinnamon Grahams;Snack;0.99;Sliema;Malta;Malta +Potatoes, Russett;Produce;0.89;Holguin;Holguin;Cuba +Eggs, large;Dairy;0.89;Cogswell;North Dakota;United States +Potatoes, Russett;Produce;0.89;Haslev;Vestsjalland;Denmark +Pudding mix, choc/vanilla;Baking;0.29;Glendale;Arizona;United States +Butter;Dairy;1.99;Santiago;Santiago;Dominican Republic +Applesauce cups (reg/cinnamon);Canned;0.89;Athens;Attiki;Greece +Peppers, green only;Produce;1.39;Blountsville;Alabama;United States +Broccoli stir fry mixture;Frozen;0.89;Campeche;Campeche;Mexico +Cookies, chocolate sandwich (Oreo);Snack;0.99;Chicago;Illinois;United States +Beef/bean burrito;Frozen;0.29;Port Elizabeth;New Jersey;United States +Pudding mix, choc/vanilla;Baking;0.29;London;Ontario;Canada +Baking soda;Baking;0.39;Cushing;Texas;United States +Butter;Dairy;1.99;Milano;Lombardia;Italy +Waffles;Frozen;0.99;Port Elizabeth;New Jersey;United States +Eggs, large;Dairy;0.89;Fengjie;Sichuan;China +Broccoli stir fry mixture;Frozen;0.89;Santa Fe;Tennessee;United States +L'Oven Fresh white bread;Baked goods;0.59;Thousandsticks;Kentucky;United States +Lettuce, iceberg;Produce;0.89;Mount Hope;Ohio;United States +Belmont chocolate chip cookies;Snack;1.49;Douglas City;California;United States +Deluxe topping pizza;Frozen;1.99;San Francisco;California;United States +Peppers, green only;Produce;1.39;Crooks;South Dakota;United States +Eggs, large;Dairy;0.89;Amsterdam;Ohio;United States +Cheese, Feta, blue or gorgonzola tub;Dairy;1.69;Thelma;Kentucky;United States +Cheese, Colby brick;Dairy;1.49;Prudence Island;Rhode Island;United States +Eggs, large;Dairy;0.89;Chicago;Illinois;United States +Vegetarian vegetable condensed soup;Canned;0.43;Fengjie;Sichuan;China +Beef/bean burrito;Frozen;0.29;Thelma;Kentucky;United States +Lettuce, iceberg;Produce;0.89;North Grafton;Massachusetts;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Helsinki;Etela-Suomen Laani;Finland +Baking soda;Baking;0.39;Prudence Island;Rhode Island;United States +Lettuce, iceberg;Produce;0.89;Roma;Texas;United States +Cookies, chocolate sandwich (Oreo);Snack;0.99;Mount Hope;Ohio;United States +Beef/bean burrito;Frozen;0.29;Roma;Texas;United States +L'Oven Fresh white bread;Baked goods;0.59;Franklin Springs;New York;United States +Celery;Produce;0.99;Warsaw;Mazowieckie;Poland +Orange juice, not from concentrate;Dairy;1.99;Fengjie;Sichuan;China +Saltines;Snack;0.69;Athens;Attiki;Greece +Saltines;Snack;0.69;Barcelona;CataluÒa;Spain +Pudding mix, choc/vanilla;Baking;0.29;Gafsa;Qafsah;Tunisia +Snack crackers (ritz);Snack;1.29;Kyoto;Kyoto;Japan +Cucumber (large);Produce;0.49;Kent City;Michigan;United States +Eggs, large;Dairy;0.89;Hechi;Guangxi;China +Potatoes, Russett;Produce;0.89;Sofia;Sofiya;Bulgaria +Single serve fruit/gel bowls;Canned;1.39;Port Harcourt;Rivers;Nigeria +Cheese, Deli style slices, Swiss, Provolone or Muenster;Dairy;1.69;Kent City;Michigan;United States +Applesauce cups (reg/cinnamon);Canned;0.89;Stirling;Scotland;United Kingdom +Peppers, tricolor pack;Produce;1.99;Eau Galle;Wisconsin;United States +Snack crackers (ritz);Snack;1.29;Thelma;Kentucky;United States +Potatoes, Russett;Produce;0.89;Kyoto;Kyoto;Japan +Single serve peach cups;Canned;1.39;New York;New York;United States +Sausage, brown/serve;Frozen;0.99;Ormond Beach;Florida;United States +Larado paper plates;Nonfoods;0.89;Warsaw;Mazowieckie;Poland +Potatoes, Russett;Produce;0.89;Bangkok;Krung Thep Mahanakhon;Thailand +Butter;Dairy;1.99;Elizabeth;New Jersey;United States +Cheese, Colby brick;Dairy;1.49;Roxborough;Tobago;Trinidad and Tobago +Beef/bean burrito;Frozen;0.29;Milano;Lombardia;Italy +Eggs, large;Dairy;0.89;Rogersville;Alabama;United States +Cookies, chocolate sandwich (Oreo);Snack;0.99;Port Elizabeth;New Jersey;United States +Single serve peach cups;Canned;1.39;Venlo;Limburg;Netherlands +Wheat crackers (triscuit);Snack;0.99;Greymouth;West Coast;New Zealand +Eggs, large;Dairy;0.89;Port Elizabeth;New Jersey;United States +Larado paper plates;Nonfoods;0.89;Helsinki;Etela-Suomen Laani;Finland +Sweetener packets;Baking;1.49;Mount Hope;Ohio;United States +Cheese, Feta, blue or gorgonzola tub;Dairy;1.69;Helsinki;Etela-Suomen Laani;Finland +Cat litter, scoopable;Nonfoods;2.99;Sofia;Sofiya;Bulgaria +L'Oven Fresh white bread;Baked goods;0.59;West Long Branch;New Jersey;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Malone;New York;United States +Saltines;Snack;0.69;Helsinki;Etela-Suomen Laani;Finland +Spoon size shredded wheat;Cereal;1.69;Kent City;Michigan;United States +Potatoes, Russett;Produce;0.89;Kent City;Michigan;United States +Saltines;Snack;0.69;Molodesjnaja;Enderby Land;Antarctica +Vegetarian vegetable condensed soup;Canned;0.43;Gafsa;Qafsah;Tunisia +Tissues;Nonfoods;0.89;Hamburg;Illinois;United States +Beef/bean burrito;Frozen;0.29;Victoria Falls;Matabeleland North;Zimbabwe +Applesauce cups (reg/cinnamon);Canned;0.89;Sofia;Sofiya;Bulgaria +Snack crackers (ritz);Snack;1.29;Jose Leon Suarez;Buenos Aires;Argentina +Cheese, Colby brick;Dairy;1.49;Byron;New York;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Scarborough;Tobago;Trinidad and Tobago +Applesauce cups (reg/cinnamon);Canned;0.89;Paris;Ile-De-France;France +Eggs, large;Dairy;0.89;Marthaville;Louisiana;United States +Eggs, large;Dairy;0.89;Venlo;Limburg;Netherlands +L'Oven Fresh white bread;Baked goods;0.59;Cairo;Illinois;United States +Sausage, brown/serve;Frozen;0.99;Jacksonville;Alabama;United States +Bananas;Produce;0.33;Prudence Island;Rhode Island;United States +Beef/bean burrito;Frozen;0.29;Barcelona;CataluÒa;Spain +Peppers, green only;Produce;1.39;Cairo;Illinois;United States +Cucumber (large);Produce;0.49;Trondheim;Sor-Trondelag;Norway +Applesauce cups (reg/cinnamon);Canned;0.89;Milano;Lombardia;Italy +Cheese, Deli style slices, Swiss, Provolone or Muenster;Dairy;1.69;Rogersville;Alabama;United States +Potatoes, Russett;Produce;0.89;Campeche;Campeche;Mexico +Single serve peach cups;Canned;1.39;Moscow;Moskva;Russia +Orange juice, not from concentrate;Dairy;1.99;Wellington;Wellington;New Zealand +Baking soda;Baking;0.39;London;Ontario;Canada +Vegetarian vegetable condensed soup;Canned;0.43;Cogswell;North Dakota;United States +Peppers, tricolor pack;Produce;1.99;Hamburg;Illinois;United States +Baking soda;Baking;0.39;Sarajevo;Federation of Bosnia and Herzegovina;Bosnia and Herzegovina +Cucumber (large);Produce;0.49;San Francisco;California;United States +Beef/bean burrito;Frozen;0.29;Thousandsticks;Kentucky;United States +Lite drink mix (Crystal Lite);Beverages;1.89;Cushing;Texas;United States +Saltines;Snack;0.69;Stirling;Scotland;United Kingdom +Rye bread, seeded;Baked goods;0.99;Jacksonville;Alabama;United States +Single serve fruit/gel bowls;Canned;1.39;Graysville;Tennessee;United States _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list