MonetDB: default - merge with Jun2010 branch

2010-08-20 Thread Stefan Manegold
Changeset: fa4a6f5a4666 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fa4a6f5a4666
Modified Files:

Branch: default
Log Message:

merge with Jun2010 branch


diffs (10 lines):

diff -r 81c33e1c5e34 -r fa4a6f5a4666 
sql/src/test/BugTracker-2008/Tests/insert-null-byte.SF-2233581.SQL.py
--- a/sql/src/test/BugTracker-2008/Tests/insert-null-byte.SF-2233581.SQL.py 
Thu Aug 19 22:13:03 2010 +0200
+++ b/sql/src/test/BugTracker-2008/Tests/insert-null-byte.SF-2233581.SQL.py 
Fri Aug 20 08:46:58 2010 +0200
@@ -6,3 +6,6 @@
  os.path.pardir,
  'insert-null-byte.sql')))
 c.communicate()
+
+c = process.client('sql', stdin = process.PIPE)
+c.communicate('drop table strings2233581;')
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2010 - Added some belated changelog messages.

2010-08-20 Thread Sjoerd Mullender
Changeset: 6164382f9bb0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6164382f9bb0
Modified Files:
MonetDB/ChangeLog.Jun2010
MonetDB5/ChangeLog.Jun2010
sql/ChangeLog.Jun2010
Branch: Jun2010
Log Message:

Added some belated changelog messages.


diffs (51 lines):

diff -r d0b2650890d7 -r 6164382f9bb0 MonetDB/ChangeLog.Jun2010
--- a/MonetDB/ChangeLog.Jun2010 Fri Aug 20 08:45:58 2010 +0200
+++ b/MonetDB/ChangeLog.Jun2010 Fri Aug 20 12:49:19 2010 +0200
@@ -1,3 +1,8 @@
 # ChangeLog file for MonetDB
 # This file is updated with Maddlog
 
+* Fri Aug 20 2010 Sjoerd Mullender sjo...@acm.org
+- Fixed a bug where some internal reference counting was done incorrectly,
+  causing an infinite loop when exiting the server due to it being killed.
+  This bug probably only manifested itself in MonetDB/XQuery.  Bug 2658.
+
diff -r d0b2650890d7 -r 6164382f9bb0 MonetDB5/ChangeLog.Jun2010
--- a/MonetDB5/ChangeLog.Jun2010Fri Aug 20 08:45:58 2010 +0200
+++ b/MonetDB5/ChangeLog.Jun2010Fri Aug 20 12:49:19 2010 +0200
@@ -1,6 +1,11 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Fri Aug 20 2010 Sjoerd Mullender sjo...@acm.org
+- A bug was fixed where on 32 bit systems (or 64 bit systems using 32 bit
+  OIDs), values where sometimes written as 32 bits but read as 64 bits.
+  This fixes bugs 2644 and 2654.
+
 * Thu Aug 19 2010 Sjoerd Mullender sjo...@acm.org
 - If extensions such as SQL and GEOM are properly installed, they are
   loaded automatically when mserver5 starts.  This fixes bug 2522.
diff -r d0b2650890d7 -r 6164382f9bb0 sql/ChangeLog.Jun2010
--- a/sql/ChangeLog.Jun2010 Fri Aug 20 08:45:58 2010 +0200
+++ b/sql/ChangeLog.Jun2010 Fri Aug 20 12:49:19 2010 +0200
@@ -1,6 +1,20 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Fri Aug 20 2010 Sjoerd Mullender sjo...@acm.org
+- Fixed a case where the optimizer incorrectly removed an expression.
+  This fixes bu 2602.
+- Fix a crash in prepared statements when a parameter is on the left-hand
+  side of a binary operator.  This fixes bug 2599.
+- Fixed reporting of a violated foreign key constraint.  This fixes
+  bug 2598.
+- Certain schema altering queries didn't report success, even though
+  they did succeed.  This fixes bug 2589.
+- Fixed a crash when a non-existing table was used in an IN clause.
+  Fixes bug 2604.
+- Fixed bug 2633.  Adding a LIMIT clause could, in certain conditions,
+  cause a crash.
+
 * Thu Aug 19 2010 Sjoerd Mullender sjo...@acm.org
 - A bug was fixed where updates were missing in large transaction.
   This fixes bug 2543.
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge: Added some belated changelog messages.

2010-08-20 Thread Sjoerd Mullender
Changeset: 78725207a0c8 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=78725207a0c8
Modified Files:
sql/ChangeLog.Jun2010
Branch: default
Log Message:

Merge: Added some belated changelog messages.


diffs (51 lines):

diff -r fa4a6f5a4666 -r 78725207a0c8 MonetDB/ChangeLog.Jun2010
--- a/MonetDB/ChangeLog.Jun2010 Fri Aug 20 08:46:58 2010 +0200
+++ b/MonetDB/ChangeLog.Jun2010 Fri Aug 20 12:49:36 2010 +0200
@@ -1,3 +1,8 @@
 # ChangeLog file for MonetDB
 # This file is updated with Maddlog
 
+* Fri Aug 20 2010 Sjoerd Mullender sjo...@acm.org
+- Fixed a bug where some internal reference counting was done incorrectly,
+  causing an infinite loop when exiting the server due to it being killed.
+  This bug probably only manifested itself in MonetDB/XQuery.  Bug 2658.
+
diff -r fa4a6f5a4666 -r 78725207a0c8 MonetDB5/ChangeLog.Jun2010
--- a/MonetDB5/ChangeLog.Jun2010Fri Aug 20 08:46:58 2010 +0200
+++ b/MonetDB5/ChangeLog.Jun2010Fri Aug 20 12:49:36 2010 +0200
@@ -1,6 +1,11 @@
 # ChangeLog file for MonetDB5
 # This file is updated with Maddlog
 
+* Fri Aug 20 2010 Sjoerd Mullender sjo...@acm.org
+- A bug was fixed where on 32 bit systems (or 64 bit systems using 32 bit
+  OIDs), values where sometimes written as 32 bits but read as 64 bits.
+  This fixes bugs 2644 and 2654.
+
 * Thu Aug 19 2010 Sjoerd Mullender sjo...@acm.org
 - If extensions such as SQL and GEOM are properly installed, they are
   loaded automatically when mserver5 starts.  This fixes bug 2522.
diff -r fa4a6f5a4666 -r 78725207a0c8 sql/ChangeLog.Jun2010
--- a/sql/ChangeLog.Jun2010 Fri Aug 20 08:46:58 2010 +0200
+++ b/sql/ChangeLog.Jun2010 Fri Aug 20 12:49:36 2010 +0200
@@ -1,6 +1,20 @@
 # ChangeLog file for sql
 # This file is updated with Maddlog
 
+* Fri Aug 20 2010 Sjoerd Mullender sjo...@acm.org
+- Fixed a case where the optimizer incorrectly removed an expression.
+  This fixes bu 2602.
+- Fix a crash in prepared statements when a parameter is on the left-hand
+  side of a binary operator.  This fixes bug 2599.
+- Fixed reporting of a violated foreign key constraint.  This fixes
+  bug 2598.
+- Certain schema altering queries didn't report success, even though
+  they did succeed.  This fixes bug 2589.
+- Fixed a crash when a non-existing table was used in an IN clause.
+  Fixes bug 2604.
+- Fixed bug 2633.  Adding a LIMIT clause could, in certain conditions,
+  cause a crash.
+
 * Thu Aug 19 2010 Sjoerd Mullender sjo...@acm.org
 - A bug was fixed where updates were missing in large transaction.
   This fixes bug 2543.
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: Jun2010 - Changed error output to more closely match th...

2010-08-20 Thread Sjoerd Mullender
Changeset: 7c07e1c16195 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7c07e1c16195
Modified Files:

sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
Branch: Jun2010
Log Message:

Changed error output to more closely match the intention of the bug report.
This shows that the bug (bug 2358) is still there.


diffs (12 lines):

diff -r 6164382f9bb0 -r 7c07e1c16195 
sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
--- 
a/sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
  Fri Aug 20 12:49:19 2010 +0200
+++ 
b/sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
  Fri Aug 20 13:16:10 2010 +0200
@@ -75,7 +75,7 @@
 QUERY = COPY 1 RECORDS INTO t FROM STDIN USING DELIMITERS '|','
 ','' NULL AS '';abcd
 
-ERROR = !SQLException:importTable:value 'abcd' from line 1 field 1 not 
inserted, expecting type str
+ERROR = !SQLException:importTable:value 'abcd' from line 1 field 1 not 
inserted, value too long for type (var)char(3)
 !failed to import table
 
 # 15:34:26   
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Jun2010 branch.

2010-08-20 Thread Sjoerd Mullender
Changeset: dbdb607487e1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=dbdb607487e1
Modified Files:

Branch: default
Log Message:

Merge with Jun2010 branch.


diffs (12 lines):

diff -r 78725207a0c8 -r dbdb607487e1 
sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
--- 
a/sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
  Fri Aug 20 12:49:36 2010 +0200
+++ 
b/sql/src/test/BugTracker-2010/Tests/copy-into-too-long-string.Bug-2358.stable.err
  Fri Aug 20 13:16:30 2010 +0200
@@ -75,7 +75,7 @@
 QUERY = COPY 1 RECORDS INTO t FROM STDIN USING DELIMITERS '|','
 ','' NULL AS '';abcd
 
-ERROR = !SQLException:importTable:value 'abcd' from line 1 field 1 not 
inserted, expecting type str
+ERROR = !SQLException:importTable:value 'abcd' from line 1 field 1 not 
inserted, value too long for type (var)char(3)
 !failed to import table
 
 # 15:34:26   
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Add licence

2010-08-20 Thread Fabian Groffen
Changeset: 986c08e406c3 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=986c08e406c3
Modified Files:
sql/src/sql/math.sql
Branch: default
Log Message:

Add licence


diffs (22 lines):

diff -r dbdb607487e1 -r 986c08e406c3 sql/src/sql/math.sql
--- a/sql/src/sql/math.sql  Fri Aug 20 13:16:30 2010 +0200
+++ b/sql/src/sql/math.sql  Fri Aug 20 14:27:59 2010 +0200
@@ -1,3 +1,18 @@
+-- The contents of this file are subject to the MonetDB Public License
+-- Version 1.1 (the License); you may not use this file except in
+-- compliance with the License. You may obtain a copy of the License at
+-- http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
+--
+-- Software distributed under the License is distributed on an AS IS
+-- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+-- License for the specific language governing rights and limitations
+-- under the License.
+--
+-- The Original Code is the MonetDB Database System.
+--
+-- The Initial Developer of the Original Code is CWI.
+-- Copyright August 2008-2010 MonetDB B.V.
+-- All Rights Reserved.
 
 CREATE FUNCTION degrees(r double) 
 RETURNS double
___
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list


MonetDB: default - Merge with Jun2010 branch.

2010-08-20 Thread Sjoerd Mullender
Changeset: 7ce79e5e8afe for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7ce79e5e8afe
Modified Files:
java/ChangeLog.Aug2009
java/ChangeLog.Feb2010
java/ChangeLog.Nov2009
sql/src/backends/monet5/merovingian/ChangeLog.Aug2009
sql/src/backends/monet5/merovingian/ChangeLog.Feb2010
sql/src/backends/monet5/merovingian/ChangeLog.Nov2009
Branch: default
Log Message:

Merge with Jun2010 branch.


diffs (truncated from 1483 to 300 lines):

diff -r e782d77127be -r 7ce79e5e8afe MonetDB/ChangeLog-Archive
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/MonetDB/ChangeLog-Archive Fri Aug 20 15:12:21 2010 +0200
@@ -0,0 +1,78 @@
+# DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
+# This file contains past ChangeLog entries
+
+* Mon May 31 2010 Sjoerd Mullender sjo...@acm.org - 1.38.1-20100618
+- Updated Vendor information.
+
+* Tue Apr 20 2010 Stefan Manegold maneg...@cwi.nl - 1.38.1-20100618
+- Made compilation of testing (and java) independent of MonetDB.
+  This is mainly for Windows, but also on other systems, testing can
+  now be built independently of (and hence before) MonetDB.  Files
+  that mimic configure functionality on Windows were moved from
+  MonetDB to buildtools; hence, this affects all packages on
+  Windows, requiring a complete rebuild from scratch on Windows.
+  getopt() support in testing has changed; hence, (most probably)
+  requiring a rebuild from scratch of testing on other systems.
+
+* Tue Apr 20 2010 Stefan Manegold maneg...@cwi.nl - 1.38.1-20100618
+- Implemented build directory support for Windows, i.e., like on
+  Unix/Linux also on Windows we can now build in a separate build
+  directory as alternative to ...\package\NT, and thus keep the latter
+  clean from files generated during the build.  On Windows, the build
+  directory must be a sibling of ...\package\NT .
+
+* Thu Apr 15 2010 Sjoerd Mullender sjo...@acm.org - 1.36.5-20100420
+- Fixed a bug that could cause a crash when string BATs are combined.
+  (SF bug 2947763.)
+
+* Sun Apr 11 2010 Niels Nes ni...@cwi.nl - 1.36.5-20100420
+- Fixed a potential file leak: under certain conditions, files in the
+  database might not get deleted when they should (they would be
+  deleted when the server restarts).
+
+* Mon Mar 29 2010 Fabian Groffen fab...@cwi.nl - 1.36.5-20100420
+- Fix regression introduced in Feb2010-SP1 causing UDP connections to
+  malfunction, in particular affecting the stethoscope tool.
+
+* Mon Mar 01 2010 Fabian Groffen fab...@cwi.nl - 1.36.3-20100322
+- Fixed bug in UDP stream creation causing UDP connections to already
+  bound ports to be reported as successful.
+
+* Mon Feb 22 2010 Sjoerd Mullender sjo...@acm.org - 1.36.1-20100223
+- Various concurrency bugs were fixed.
+- Various changes were made to run better on systems that don't have
+  enough memory to keep everything in core that was touched during
+  query processing.  This is done by having the higher layers giving
+  hints to the database kernel about future use, and the database
+  kernel giving hings to the operating system kernel about how
+  (virtual) memory is going to be used.
+
+* Thu Feb 18 2010 Stefan Manegold stefan.maneg...@cwi.nl - 1.36.1-20100223
+- Fixed bug in mergejoin implementation.  This fixes bug #2952191.
+
+* Tue Feb  2 2010 Sjoerd Mullender sjo...@acm.org - 1.36.1-20100223
+- Added support for compiling on Windows using the Cygwin-provided
+  version of flex.
+
+* Thu Jan 21 2010 Sjoerd Mullender sjo...@acm.org - 1.36.1-20100223
+- Fix compilation issue when configured with --with-curl.  This fixes
+  bug #2924999.
+
+* Thu Jan 21 2010 Fabian Groffen fab...@cwi.nl - 1.36.1-20100223
+- Added implementation of MT_getrss() for Solaris.  This yields in the
+  kernel knowing about its (approximate) memory usage to try and help
+  the operating system to free that memory that is best to free,
+  instead of a random page, e.g. the work of the vmtrim thread.
+
+* Wed Jan 20 2010 Sjoerd Mullender sjo...@cwi.nl - 1.36.1-20100223
+- Implemented a fast string BAT append: Under certain conditions,
+  instead of inserting values one-by-one, we now concatenate the
+  string heap wholesale and just manipulate the offsets.  This works
+  both for BATins and BATappend.
+
+* Wed Jan  6 2010 Sjoerd Mullender sjo...@cwi.nl - 1.36.1-20100223
+- Changed the string heap implementation to also contain the hashes of
+  strings.
+- Changed the implementation of the string offset columns to be
+  dynamically sized.
+
diff -r e782d77127be -r 7ce79e5e8afe MonetDB4/ChangeLog-Archive
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/MonetDB4/ChangeLog-ArchiveFri Aug 20 15:12:21 2010 +0200
@@ -0,0 +1,23 @@
+# DO NOT EDIT THIS FILE -- MAINTAINED AUTOMATICALLY
+# This file contains past ChangeLog entries
+
+* Mon May 31 2010 Sjoerd Mullender sjo...@acm.org - 4.38.1-20100618
+- Updated Vendor information.
+
+* Tue Apr 20 2010 Stefan Manegold maneg...@cwi.nl - 4.38.1-20100618
+- 

MonetDB: Jun2010 - Test for bug 2647.

2010-08-20 Thread Sjoerd Mullender
Changeset: b633bd288199 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b633bd288199
Modified Files:
sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.sql

sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.stable.err

sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.stable.out
Branch: Jun2010
Log Message:

Test for bug 2647.
Output needs to be provided once the bug is fixed.


diffs (truncated from 506 to 300 lines):

diff -r 06b9f0d6f39c -r b633bd288199 
sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.sql
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.sql 
Fri Aug 20 17:04:36 2010 +0200
@@ -0,0 +1,492 @@
+--
+-- Table structure for table payments
+--
+
+CREATE TABLE payments (
+  id integer,
+  order_id integer default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  amount decimal(8,2) NOT NULL default '0.00',
+  creditcard_id integer default NULL,
+  paytype varchar(255) default NULL
+);
+
+--
+-- Table structure for table addresses
+--
+
+CREATE TABLE addresses (
+  id integer,
+  firstname varchar(255) default NULL,
+  lastname varchar(255) default NULL,
+  address1 varchar(255) default NULL,
+  address2 varchar(255) default NULL,
+  city varchar(255) default NULL,
+  state_id integer default NULL,
+  zipcode varchar(255) default NULL,
+  country_id integer default NULL,
+  phone varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  state_name varchar(255) default NULL
+);
+
+--
+-- Table structure for table countries
+--
+
+CREATE TABLE countries (
+  id integer,
+  iso_name varchar(255) default NULL,
+  iso varchar(255) default NULL,
+  name varchar(255) default NULL,
+  iso3 varchar(255) default NULL,
+  numcode integer default NULL
+);
+
+--
+-- Table structure for table line_items
+--
+
+CREATE TABLE line_items (
+  id integer,
+  order_id integer default NULL,
+  variant_id integer default NULL,
+  quantity integer NOT NULL,
+  price decimal(8,2) NOT NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL
+);
+
+--
+-- Table structure for table orders
+--
+
+CREATE TABLE orders (
+  id integer default NULL,
+  user_id integer default NULL,
+  number varchar(255) default NULL,
+  ship_amount decimal(8,2) NOT NULL default '0.00',
+  tax_amount decimal(8,2) NOT NULL default '0.00',
+  item_total decimal(8,2) NOT NULL default '0.00',
+  total decimal(8,2) NOT NULL default '0.00',
+  ip_address varchar(255) default NULL,
+  special_instructions text,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  state varchar(255) default NULL,
+  checkout_complete integer default NULL,
+  token varchar(255) default NULL,
+  email varchar(255) default NULL,
+  bill_address_id integer default NULL,
+  ship_address_id integer default NULL
+);
+
+--
+-- Table structure for table products
+--
+
+CREATE TABLE products (
+  id integer default NULL,
+  name varchar(255) NOT NULL default '',
+  description text,
+  master_price decimal(8,2) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  permalink varchar(255) default NULL,
+  available_on timestamp default NULL,
+  tax_category_id integer default NULL,
+  shipping_category integer default NULL,
+  deleted_at timestamp default NULL,
+  meta_description varchar(255) default NULL,
+  meta_keywords varchar(255) default NULL
+);
+
+--
+-- Table structure for table schema_migrations
+--
+
+CREATE TABLE schema_migrations (
+  version varchar(255) NOT NULL
+);
+
+--
+-- Table structure for table shipments
+--
+
+CREATE TABLE shipments (
+  id integer,
+  order_id integer default NULL,
+  shipping_method_id integer default NULL,
+  tracking varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  number varchar(255) default NULL,
+  cost decimal(8,2) default NULL,
+  shipped_at timestamp default NULL,
+  address_id integer default NULL
+);
+
+--
+-- Table structure for table shipping_methods
+--
+
+CREATE TABLE shipping_methods (
+  id integer,
+  zone_id integer default NULL,
+  shipping_calculator varchar(255) default NULL,
+  name varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL
+);
+
+--
+-- Table structure for table states
+--
+
+CREATE TABLE states (
+  id integer,
+  name varchar(255) default NULL,
+  abbr varchar(255) default NULL,
+  country_id integer default NULL
+);
+
+--
+-- Table structure for table tax_categories
+--
+
+CREATE TABLE tax_categories (
+  id integer,
+  name varchar(255) default NULL,
+  description varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL
+);
+
+--
+-- Table structure for table tax_rates
+--
+
+CREATE TABLE tax_rates (

MonetDB: default - Merge with Jun2010 branch.

2010-08-20 Thread Sjoerd Mullender
Changeset: 134cdc4cc0c4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=134cdc4cc0c4
Modified Files:

Branch: default
Log Message:

Merge with Jun2010 branch.


diffs (truncated from 506 to 300 lines):

diff -r 7ce79e5e8afe -r 134cdc4cc0c4 
sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.sql
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/sql/src/test/BugTracker-2010/Tests/crash-with-huge-query.Bug-2647.sql 
Fri Aug 20 17:04:56 2010 +0200
@@ -0,0 +1,492 @@
+--
+-- Table structure for table payments
+--
+
+CREATE TABLE payments (
+  id integer,
+  order_id integer default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  amount decimal(8,2) NOT NULL default '0.00',
+  creditcard_id integer default NULL,
+  paytype varchar(255) default NULL
+);
+
+--
+-- Table structure for table addresses
+--
+
+CREATE TABLE addresses (
+  id integer,
+  firstname varchar(255) default NULL,
+  lastname varchar(255) default NULL,
+  address1 varchar(255) default NULL,
+  address2 varchar(255) default NULL,
+  city varchar(255) default NULL,
+  state_id integer default NULL,
+  zipcode varchar(255) default NULL,
+  country_id integer default NULL,
+  phone varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  state_name varchar(255) default NULL
+);
+
+--
+-- Table structure for table countries
+--
+
+CREATE TABLE countries (
+  id integer,
+  iso_name varchar(255) default NULL,
+  iso varchar(255) default NULL,
+  name varchar(255) default NULL,
+  iso3 varchar(255) default NULL,
+  numcode integer default NULL
+);
+
+--
+-- Table structure for table line_items
+--
+
+CREATE TABLE line_items (
+  id integer,
+  order_id integer default NULL,
+  variant_id integer default NULL,
+  quantity integer NOT NULL,
+  price decimal(8,2) NOT NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL
+);
+
+--
+-- Table structure for table orders
+--
+
+CREATE TABLE orders (
+  id integer default NULL,
+  user_id integer default NULL,
+  number varchar(255) default NULL,
+  ship_amount decimal(8,2) NOT NULL default '0.00',
+  tax_amount decimal(8,2) NOT NULL default '0.00',
+  item_total decimal(8,2) NOT NULL default '0.00',
+  total decimal(8,2) NOT NULL default '0.00',
+  ip_address varchar(255) default NULL,
+  special_instructions text,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  state varchar(255) default NULL,
+  checkout_complete integer default NULL,
+  token varchar(255) default NULL,
+  email varchar(255) default NULL,
+  bill_address_id integer default NULL,
+  ship_address_id integer default NULL
+);
+
+--
+-- Table structure for table products
+--
+
+CREATE TABLE products (
+  id integer default NULL,
+  name varchar(255) NOT NULL default '',
+  description text,
+  master_price decimal(8,2) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  permalink varchar(255) default NULL,
+  available_on timestamp default NULL,
+  tax_category_id integer default NULL,
+  shipping_category integer default NULL,
+  deleted_at timestamp default NULL,
+  meta_description varchar(255) default NULL,
+  meta_keywords varchar(255) default NULL
+);
+
+--
+-- Table structure for table schema_migrations
+--
+
+CREATE TABLE schema_migrations (
+  version varchar(255) NOT NULL
+);
+
+--
+-- Table structure for table shipments
+--
+
+CREATE TABLE shipments (
+  id integer,
+  order_id integer default NULL,
+  shipping_method_id integer default NULL,
+  tracking varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  number varchar(255) default NULL,
+  cost decimal(8,2) default NULL,
+  shipped_at timestamp default NULL,
+  address_id integer default NULL
+);
+
+--
+-- Table structure for table shipping_methods
+--
+
+CREATE TABLE shipping_methods (
+  id integer,
+  zone_id integer default NULL,
+  shipping_calculator varchar(255) default NULL,
+  name varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL
+);
+
+--
+-- Table structure for table states
+--
+
+CREATE TABLE states (
+  id integer,
+  name varchar(255) default NULL,
+  abbr varchar(255) default NULL,
+  country_id integer default NULL
+);
+
+--
+-- Table structure for table tax_categories
+--
+
+CREATE TABLE tax_categories (
+  id integer,
+  name varchar(255) default NULL,
+  description varchar(255) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL
+);
+
+--
+-- Table structure for table tax_rates
+--
+
+CREATE TABLE tax_rates (
+  id integer default NULL,
+  zone_id integer default NULL,
+  amount decimal(8,4) default NULL,
+  created_at timestamp default NULL,
+  updated_at timestamp default NULL,
+  tax_type integer default NULL,
+  tax_category_id integer default NULL
+);
+
+--
+-- Table structure for