db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r785073 [2/2] - in /db/derby/code/branches/10.4/java: engine/org/apache/derby/iapi/sql/compile/ engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/te...
Date Tue, 16 Jun 2009 04:31:09 GMT
Copied: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java (from r767584, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java)
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java?p2=db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java&p1=db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java&r1=767584&r2=785073&rev=785073&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java (original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java Tue Jun 16 04:31:08 2009
@@ -49,6 +49,13 @@
         getConnection().setAutoCommit(false);
         Statement st = createStatement();
 
+        st.executeUpdate("create table a(col1 int, col2 int)");
+        st.executeUpdate("insert into a values(1,1),(1,1)");
+        st.executeUpdate("create table b(col1 int, col2 int)");
+        st.executeUpdate("insert into b values(2,2),(2,2)");
+        st.executeUpdate("create table c(col1 int, col2 int)");
+        st.executeUpdate("insert into c values(3,3),(3,3)");
+
         st.executeUpdate(
                 "create TABLE table1 (id BIGINT NOT NULL, PRIMARY KEY(id))");
 
@@ -146,7 +153,7 @@
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483649, 'location', "+
-        		"'Boulevard du Souverain, 23')");
+        		"'Bla bla bla bla bla bla 99')");
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483649, 'SortPlan', "
@@ -191,15 +198,15 @@
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483649, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier001-0001___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier001-0001___________Bla bla bla bla "
+                + "bla bla 99____')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483649, 'GroupedWith', '')");
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483649, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483649, "+
@@ -310,7 +317,7 @@
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483650, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483650, 'SortPlan', 'B-W3-S2')");
@@ -354,14 +361,14 @@
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483650, "+
         		"'EnvelopSortingValue', 'BE1180___testOlivier001-0001"+
-        		"___________Boulevard du Souverain, 23____')");
+        		"___________Bla bla bla bla bla bla 99____')");
             
         st.executeUpdate(
         "INSERT INTO table2 VALUES (2147483650, 'GroupedWith', '')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483650, 'AddressG2', "+
-        		"'Boulevard du Souverain, 23')");
+        		"'Bla bla bla bla bla bla 99')");
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483650, "
@@ -472,7 +479,7 @@
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483651, 'location', "+
-        		"'Boulevard du Souverain, 23')");
+        		"'Bla bla bla bla bla bla 99')");
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483651, 'SortPlan', "
@@ -515,15 +522,15 @@
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483651, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier001-0002___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier001-0002___________Bla bla bla bla "
+                + "bla bla 99____')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483651, 'GroupedWith', '')");
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483651, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483651, 'DiversionReason', '')");
@@ -627,7 +634,7 @@
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483652, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
         
         st.executeUpdate(
         		"INSERT INTO table2 VALUES (2147483652, 'SortPlan', 'B-W3-S2')");
@@ -668,13 +675,15 @@
         "INSERT INTO table2 VALUES (2147483652, 'header', 'true')");
         
         st.executeUpdate(
-        		"INSERT INTO table2 VALUES (2147483652, 'EnvelopSortingValue', 'BE1180___testOlivier001-0002___________Boulevard du Souverain, 23____')");
+        		"INSERT INTO table2 VALUES (2147483652, 'EnvelopSortingValue',"
+        		+ "'BE1180___testOlivier001-0002___________Bla bla bla bla bl,"
+        		+ "a bla 99____')");
             
         st.executeUpdate(
         "INSERT INTO table2 VALUES (2147483652, 'GroupedWith', '')");
         
         st.executeUpdate(
-        		"INSERT INTO table2 VALUES (2147483652, 'AddressG2', 'Boulevard du Souverain, 23')");
+        		"INSERT INTO table2 VALUES (2147483652, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
         st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483652, "
@@ -733,7 +742,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483653, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483653, 'Plex', 'S')");
@@ -785,7 +794,7 @@
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483653, 'location', "+
-            		"'Boulevard du Souverain, 23')");
+            		"'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483653, 'SortPlan', '')");
@@ -829,15 +838,15 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483653, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier002-0003___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier002-0003___________Bla bla bla bla "
+                + "bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483653, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483653, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483653, "+
@@ -896,7 +905,7 @@
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483654, "+
-            		"'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont été faits pour quelque chose.')");
+            		"'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483654, 'Plex', 'S')");
@@ -947,7 +956,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483654, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483654, 'SortPlan', '')");
@@ -990,14 +999,14 @@
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483654, "+
             		"'EnvelopSortingValue', "+
-            		"'BE1180___testOlivier002-0003___________Boulevard du Souverain, 23____')");
+            		"'BE1180___testOlivier002-0003___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483654, 'GroupedWith', '')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483654, 'AddressG2', "+
-            		"'Boulevard du Souverain, 23')");
+            		"'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483654, "
@@ -1056,7 +1065,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483655, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483655, 'Plex', 'S')");
@@ -1108,7 +1117,7 @@
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483655, 'location', "+
-            		"'Boulevard du Souverain, 23')");
+            		"'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483655, 'SortPlan', '')");
@@ -1151,15 +1160,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483655, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier002-0004___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier002-0004___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483655, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483655, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483655, 'DiversionReason', '001')");
@@ -1217,7 +1225,7 @@
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483656, 'BatchTypeIn"+
             		"structions', 'Ne pas jeter ces documents.  Ils ont "+
-            		"été faits pour quelque chose.')");
+            		"\u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483656, 'Plex', 'S')");
@@ -1270,7 +1278,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483656, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483656, 'SortPlan', '')");
@@ -2045,7 +2053,7 @@
                 + "'BatchTypeId', 'Paper')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483661, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483661, 'location', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483661, 'SortPlan', "
@@ -2088,15 +2096,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483661, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier004-0007___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier004-0007___________Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483661, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483661, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483661, 'DiversionReason', '')");
@@ -2197,7 +2204,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483662, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483662, 'SortPlan', 'B-W3-S2')");
@@ -2246,7 +2253,7 @@
                 "INSERT INTO table2 VALUES (2147483662, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483662, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483662, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483662, "
@@ -2353,7 +2360,7 @@
                 + "'BatchTypeId', 'Paper')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483663, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483663, 'location', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483663, 'SortPlan', "
@@ -2396,15 +2403,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483663, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier004-0008___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier004-0008___________Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483663, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483663, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483663, 'DiversionReason', '')");
@@ -2506,7 +2512,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483664, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483664, 'SortPlan', 'B-W3-S2')");
@@ -2547,13 +2553,13 @@
                 "INSERT INTO table2 VALUES (2147483664, 'header', 'true')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483664, 'EnvelopSortingValue', 'BE1180___testOlivier004-0008___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (2147483664, 'EnvelopSortingValue', 'BE1180___testOlivier004-0008___________Bla bla bla bla bla bla 99____')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483664, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483664, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483664, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483664, "
@@ -2612,7 +2618,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483665, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483665, 'Plex', 'S')");
@@ -2662,7 +2668,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483665, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483665, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483665, 'SortPlan', '')");
@@ -2704,15 +2710,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483665, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier005-0009___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier005-0009___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483665, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483665, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483665, 'DiversionReason', '001')");
@@ -2768,7 +2773,7 @@
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483666, 'BatchTypeInstr"+
-            		"uctions', 'Ne pas jeter ces documents.  Ils ont été fait"+
+            		"uctions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 fait"+
             		"s pour quelque chose.')");
 
             st.executeUpdate(
@@ -2817,7 +2822,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483666, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483666, 'SortPlan', '')");
@@ -2866,7 +2871,7 @@
                 "INSERT INTO table2 VALUES (2147483666, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483666, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483666, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483666, "
@@ -2925,7 +2930,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483667, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483667, 'Plex', 'S')");
@@ -2975,7 +2980,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483667, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483667, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483667, 'SortPlan', '')");
@@ -3017,15 +3022,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483667, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier005-0010___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier005-0010___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483667, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483667, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483667, 'DiversionReason', '001')");
@@ -3080,7 +3084,7 @@
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483668, 'BatchTypeInstr"+
-            		"uctions', 'Ne pas jeter ces documents.  Ils ont été fa"+
+            		"uctions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 fa"+
             		"its pour quelque chose.')");
 
             st.executeUpdate(
@@ -3130,7 +3134,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483668, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483668, 'SortPlan', '')");
@@ -3903,7 +3907,7 @@
                 + "'BatchTypeId', 'Paper')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483673, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483673, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483673, 'SortPlan', "
@@ -3946,15 +3950,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483673, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier007-0013___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier007-0013___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483673, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483673, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483673, 'DiversionReason', '')");
@@ -4055,7 +4058,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483674, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483674, 'SortPlan', 'B-W3-S2')");
@@ -4104,7 +4107,7 @@
                 "INSERT INTO table2 VALUES (2147483674, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483674, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483674, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483674, "
@@ -4211,7 +4214,7 @@
                 + "'BatchTypeId', 'Paper')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483675, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483675, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483675, 'SortPlan', "
@@ -4254,15 +4257,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483675, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier007-0014___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier007-0014___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483675, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483675, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483675, 'DiversionReason', '')");
@@ -4363,7 +4365,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483676, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483676, 'SortPlan', 'B-W3-S2')");
@@ -4472,7 +4474,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483677, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483677, 'Plex', 'S')");
@@ -4522,7 +4524,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483677, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483677, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483677, 'SortPlan', '')");
@@ -4564,15 +4566,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483677, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier008-0015___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier008-0015___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483677, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483677, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483677, 'DiversionReason', '001')");
@@ -4625,7 +4626,7 @@
                 "INSERT INTO table2 VALUES (2147483678, 'ItemSeq', '1')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483678, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont été faits pour quelque chose.')");
+            		"INSERT INTO table2 VALUES (2147483678, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483678, 'Plex', 'S')");
@@ -4673,7 +4674,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483678, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483678, 'SortPlan', '')");
@@ -4714,13 +4715,13 @@
                 "INSERT INTO table2 VALUES (2147483678, 'header', 'true')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483678, 'EnvelopSortingValue', 'BE1180___testOlivier008-0015___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (2147483678, 'EnvelopSortingValue', 'BE1180___testOlivier008-0015___________Bla bla bla bla bla bla 99____')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483678, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483678, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483678, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483678, "
@@ -4779,7 +4780,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483679, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483679, 'Plex', 'S')");
@@ -4829,7 +4830,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483679, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483679, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483679, 'SortPlan', '')");
@@ -4871,15 +4872,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483679, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier008-0016___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier008-0016___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483679, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483679, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483679, 'DiversionReason', '001')");
@@ -4933,7 +4933,7 @@
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483680, 'BatchTypeInstr"+
-            		"uctions', 'Ne pas jeter ces documents.  Ils ont été fai"+
+            		"uctions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 fai"+
             		"ts pour quelque chose.')");
 
             st.executeUpdate(
@@ -4982,7 +4982,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483680, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483680, 'SortPlan', '')");
@@ -5031,7 +5031,7 @@
                 "INSERT INTO table2 VALUES (2147483680, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483680, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483680, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483680, "
@@ -5752,7 +5752,7 @@
                 + "'BatchTypeId', 'Paper')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483685, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483685, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483685, 'SortPlan', "
@@ -5795,15 +5795,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483685, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier010-0019___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier010-0019___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483685, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483685, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483685, 'DiversionReason', '')");
@@ -5904,7 +5903,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483686, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483686, 'SortPlan', 'B-W3-S2')");
@@ -5945,13 +5944,13 @@
                 "INSERT INTO table2 VALUES (2147483686, 'header', 'true')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483686, 'EnvelopSortingValue', 'BE1180___testOlivier010-0019___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (2147483686, 'EnvelopSortingValue', 'BE1180___testOlivier010-0019___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483686, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483686, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483686, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483686, "
@@ -6058,7 +6057,7 @@
                 + "'BatchTypeId', 'Paper')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483687, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483687, 'location', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483687, 'SortPlan', "
@@ -6101,15 +6100,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483687, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier010-0020___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier010-0020___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483687, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483687, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483687, 'DiversionReason', '')");
@@ -6210,7 +6208,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483688, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483688, 'SortPlan', 'B-W3-S2')");
@@ -6251,13 +6249,13 @@
                 "INSERT INTO table2 VALUES (2147483688, 'header', 'true')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483688, 'EnvelopSortingValue', 'BE1180___testOlivier010-0020___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (2147483688, 'EnvelopSortingValue', 'BE1180___testOlivier010-0020___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483688, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483688, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483688, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483688, "
@@ -6316,7 +6314,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483689, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483689, 'Plex', 'S')");
@@ -6366,7 +6364,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483689, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483689, 'location', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483689, 'SortPlan', '')");
@@ -6408,15 +6406,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483689, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier011-0021___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier011-0021___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483689, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483689, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483689, 'DiversionReason', '001')");
@@ -6469,7 +6466,7 @@
                 "INSERT INTO table2 VALUES (2147483690, 'ItemSeq', '1')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483690, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont été faits pour quelque chose.')");
+            		"INSERT INTO table2 VALUES (2147483690, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483690, 'Plex', 'S')");
@@ -6517,7 +6514,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483690, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483690, 'SortPlan', '')");
@@ -6558,13 +6555,13 @@
                 "INSERT INTO table2 VALUES (2147483690, 'header', 'true')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483690, 'EnvelopSortingValue', 'BE1180___testOlivier011-0021___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (2147483690, 'EnvelopSortingValue', 'BE1180___testOlivier011-0021___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483690, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483690, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483690, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483690, "
@@ -6623,7 +6620,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483691, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483691, 'Plex', 'S')");
@@ -6673,7 +6670,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483691, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483691, 'location', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483691, 'SortPlan', '')");
@@ -6715,15 +6712,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483691, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier011-0022___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier011-0022___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483691, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483691, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483691, 'DiversionReason', '001')");
@@ -6776,7 +6772,7 @@
                 "INSERT INTO table2 VALUES (2147483692, 'ItemSeq', '1')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483692, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont été faits pour quelque chose.')");
+            		"INSERT INTO table2 VALUES (2147483692, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483692, 'Plex', 'S')");
@@ -6824,7 +6820,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483692, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (2147483692, 'SortPlan', '')");
@@ -6865,13 +6861,13 @@
                 "INSERT INTO table2 VALUES (2147483692, 'header', 'true')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483692, 'EnvelopSortingValue', 'BE1180___testOlivier011-0022___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (2147483692, 'EnvelopSortingValue', 'BE1180___testOlivier011-0022___________Bla bla bla bla bla bla 99____')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483692, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (2147483692, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (2147483692, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (2147483692, "
@@ -7636,7 +7632,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (4294967297, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (4294967297, 'Plex', 'S')");
@@ -7681,7 +7677,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (4294967297, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (4294967297, 'SortPlan', '')");
@@ -7715,13 +7711,13 @@
                 "INSERT INTO table2 VALUES (4294967297, 'AddressG5', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (4294967297, 'EnvelopSortingValue', 'BE1180___testOlivier002-0003___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (4294967297, 'EnvelopSortingValue', 'BE1180___testOlivier002-0003___________Bla bla bla bla bla bla 99____')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (4294967297, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (4294967297, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (4294967297, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (4294967297, "
@@ -7852,7 +7848,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (6442450945, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (6442450945, 'Plex', 'S')");
@@ -7897,7 +7893,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (6442450945, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (6442450945, 'SortPlan', '')");
@@ -7931,13 +7927,13 @@
                 "INSERT INTO table2 VALUES (6442450945, 'AddressG5', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (6442450945, 'EnvelopSortingValue', 'BE1180___testOlivier002-0004___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (6442450945, 'EnvelopSortingValue', 'BE1180___testOlivier002-0004___________Bla bla bla bla bla bla 99____')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (6442450945, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (6442450945, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (6442450945, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (6442450945, "
@@ -8088,7 +8084,7 @@
                 "INSERT INTO table2 VALUES (8589934593, 'ItemSeq', '0')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (8589934593, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont été faits pour quelque chose.')");
+            		"INSERT INTO table2 VALUES (8589934593, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (8589934593, 'Plex', 'S')");
@@ -8135,7 +8131,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (8589934593, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (8589934593, 'location', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (8589934593, 'SortPlan', '')");
@@ -8171,15 +8167,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (8589934593, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier005-0009___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier005-0009___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (8589934593, 'GroupedWith', '')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (8589934593, 'AddressG2', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (8589934593, 'DiversionReason', '001')");
@@ -8401,7 +8396,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (10737418241, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (10737418241, 'Plex', 'S')");
@@ -8446,7 +8441,7 @@
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (10737418241, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (10737418241, 'SortPlan', '')");
@@ -8480,13 +8475,13 @@
                 "INSERT INTO table2 VALUES (10737418241, 'AddressG5', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (10737418241, 'EnvelopSortingValue', 'BE1180___testOlivier005-0010___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (10737418241, 'EnvelopSortingValue', 'BE1180___testOlivier005-0010___________Bla bla bla bla bla bla 99____')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (10737418241, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (10737418241, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (10737418241, 'AddressG2', 'Bla bla bla bla bla bla 99')");
 
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (10737418241, "
@@ -8739,7 +8734,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (12884901889, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (12884901889, 'Plex', 'S')");
@@ -8784,7 +8779,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (12884901889, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (12884901889, 'SortPlan', '')");
@@ -8818,13 +8813,13 @@
                 "INSERT INTO table2 VALUES (12884901889, 'AddressG5', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (12884901889, 'EnvelopSortingValue', 'BE1180___testOlivier008-0015___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (12884901889, 'EnvelopSortingValue', 'BE1180___testOlivier008-0015___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (12884901889, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (12884901889, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (12884901889, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (12884901889, "
@@ -9022,7 +9017,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (15032385537, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (15032385537, 'Plex', 'S')");
@@ -9067,7 +9062,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (15032385537, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (15032385537, 'SortPlan', '')");
@@ -9101,13 +9096,13 @@
                 "INSERT INTO table2 VALUES (15032385537, 'AddressG5', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (15032385537, 'EnvelopSortingValue', 'BE1180___testOlivier008-0016___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (15032385537, 'EnvelopSortingValue', 'BE1180___testOlivier008-0016___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (15032385537, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (15032385537, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (15032385537, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (15032385537, "
@@ -9314,7 +9309,7 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (17179869185, "
                 + "'BatchTypeInstructions', 'Ne pas jeter ces "
-                + "documents.  Ils ont été faits pour quelque chose.')");
+                + "documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (17179869185, 'Plex', 'S')");
@@ -9359,7 +9354,7 @@
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (17179869185, 'location', "
-                + "'Boulevard du Souverain, 23')");
+                + "'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (17179869185, 'SortPlan', '')");
@@ -9393,13 +9388,13 @@
                 "INSERT INTO table2 VALUES (17179869185, 'AddressG5', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (17179869185, 'EnvelopSortingValue', 'BE1180___testOlivier011-0021___________Boulevard du Souverain, 23____')");
+            		"INSERT INTO table2 VALUES (17179869185, 'EnvelopSortingValue', 'BE1180___testOlivier011-0021___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (17179869185, 'GroupedWith', '')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (17179869185, 'AddressG2', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (17179869185, 'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (17179869185, "
@@ -9617,7 +9612,7 @@
                 "INSERT INTO table2 VALUES (19327352833, 'ItemSeq', '0')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (19327352833, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont été faits pour quelque chose.')");
+            		"INSERT INTO table2 VALUES (19327352833, 'BatchTypeInstructions', 'Ne pas jeter ces documents.  Ils ont \u00e9t\u00e9 faits pour quelque chose.')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (19327352833, 'Plex', 'S')");
@@ -9664,7 +9659,7 @@
                 + "'BatchTypeId', '233-621-001')");
             
             st.executeUpdate(
-            		"INSERT INTO table2 VALUES (19327352833, 'location', 'Boulevard du Souverain, 23')");
+            		"INSERT INTO table2 VALUES (19327352833, 'location', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (19327352833, 'SortPlan', '')");
@@ -9700,15 +9695,14 @@
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (19327352833, "
                 + "'EnvelopSortingValue', "
-                + "'BE1180___testOlivier011-0022___________Boulevard "
-                + "du Souverain, 23____')");
+                + "'BE1180___testOlivier011-0022___________Bla bla bla bla bla bla 99____')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (19327352833, 'GroupedWith', '')");
             
             st.executeUpdate(
                 "INSERT INTO table2 VALUES (19327352833, "
-                + "'AddressG2', 'Boulevard du Souverain, 23')");
+                + "'AddressG2', 'Bla bla bla bla bla bla 99')");
             
             st.executeUpdate(
             		"INSERT INTO table2 VALUES (19327352833, 'DiversionReason', '001')");
@@ -10006,6 +10000,30 @@
                 "UPDATE table2 SET value='true' WHERE id=2147483696 "
                 + "AND name='has_address'");
             
+            //Start of tables creation for DERBY-4240 repro
+            st.executeUpdate(
+            		"CREATE TABLE test1 (id BIGINT NOT NULL, name VARCHAR(255), "+
+            		"PRIMARY KEY (id))");
+            st.executeUpdate(
+            		"CREATE TABLE test2 (entity_id BIGINT, rel_id BIGINT)");
+            st.executeUpdate(
+            		"CREATE INDEX idx_test2 ON test2 (entity_id)");
+            st.executeUpdate(
+            		"INSERT INTO test1 (id, name) VALUES (102, 'Tom')");
+            st.executeUpdate(
+            		"INSERT INTO test1 (id, name) VALUES (1, null)");
+            st.executeUpdate(
+            		"INSERT INTO test1 (id, name) VALUES (103, 'Jerry')");
+            st.executeUpdate(
+            		"INSERT INTO test1 (id, name) VALUES (101, 'Pupy')");
+            st.executeUpdate(
+            		"INSERT INTO test2 (entity_id, rel_id) VALUES (1, 102)");
+            st.executeUpdate(
+            		"INSERT INTO test2 (entity_id, rel_id) VALUES (1, 101)");
+            st.executeUpdate(
+            		"INSERT INTO test2 (entity_id, rel_id) VALUES (1, 103)");
+            //End of tables creation for DERBY-4240 repro
+
             getConnection().commit();
             st.close();
     }
@@ -10015,14 +10033,99 @@
         rollback();
         stmt.executeUpdate("drop table table2");
         stmt.executeUpdate("drop table table1");
+        stmt.executeUpdate("drop table a");
+        stmt.executeUpdate("drop table b");
+        stmt.executeUpdate("drop table c");
+        //drop tables needed for DERBY-4240
+        stmt.executeUpdate("drop table test1");
+        stmt.executeUpdate("drop table test2");
         stmt.close();
         commit();
         super.tearDown();
     }
 
     /**
+     * Add a test case for DERBY-4240 where the rows were not ordered despite
+     * an order by clause. The fix for DERBY-3926 took care of the bug. 
+     */
+    public void testDerby4240OrderByCase() throws SQLException {
+        String sql1 = 
+        	"SELECT t1.id, t1.name FROM test2 t2 INNER JOIN test1 t1 "+
+        	"ON t2.rel_id = t1.id WHERE t2.entity_id = 1 ORDER BY t1.id ASC";
+        Statement s;
+        ResultSet rs;
+        RuntimeStatisticsParser rtsp;
+        String [][] result;
+
+        s = createStatement();
+        s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
+        rs = s.executeQuery(sql1);
+		rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
+		assertTrue(rtsp.whatSortingRequired());
+        rs = s.executeQuery(sql1);
+        result = new String[][] {
+                {"101", "Pupy"},{"102", "Tom"}, {"103", "Jerry"}};
+        JDBC.assertFullResultSet(rs, result);
+    }
+
+    /**
+     * Some more tests for order by and sort avoidance logic
+     */
+    public void testAdditionalOrderByCases() throws SQLException {
+        String sql1;
+        Statement s;
+        ResultSet rs;
+        RuntimeStatisticsParser rtsp;
+        String [][] result;
+
+        s = createStatement();
+        s.execute("call SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)");
+        
+        sql1 = "select a.col1, b.col2, c.col2 from a, b, c where c.col1=3 " +
+        "order by a.col1, c.col1";
+        rs = s.executeQuery(sql1);
+		rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
+		assertTrue(rtsp.whatSortingRequired());
+        rs = s.executeQuery(sql1);
+        result = new String[][] {
+                {"1", "2", "3"},{"1", "2", "3"}, {"1", "2", "3"},   
+                {"1", "2", "3"},{"1", "2", "3"}, {"1", "2", "3"},   
+                {"1", "2", "3"},{"1", "2", "3"}};
+        JDBC.assertFullResultSet(rs, result);
+        
+        sql1 = "select a.col1, b.col2, c.col2 from a, b, c where a.col1=1 "+
+        "and b.col1 = 2 and c.col1=3 order by a.col1, b.col1, c.col1";
+        rs = s.executeQuery(sql1);
+		rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
+		assertFalse(rtsp.whatSortingRequired());
+        rs = s.executeQuery(sql1);
+        JDBC.assertFullResultSet(rs, result);
+
+        sql1 = "select c.col1, b.col1, a.col1 from a, b, c where a.col1=1 "+
+        "and b.col1 = 2 and c.col1=3 order by c.col1, b.col1, a.col1";
+        result = new String[][] {
+                {"3", "2", "1"},{"3", "2", "1"}, {"3", "2", "1"},   
+                {"3", "2", "1"},{"3", "2", "1"}, {"3", "2", "1"},   
+                {"3", "2", "1"},{"3", "2", "1"}};
+        rs = s.executeQuery(sql1);
+		rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
+		assertFalse(rtsp.whatSortingRequired());
+        rs = s.executeQuery(sql1);
+        JDBC.assertFullResultSet(rs, result);
+
+        sql1 = "select c.col1, b.col1, a.col1 from a, b, c where a.col1=1 "+
+        "and b.col1 = 2 and c.col1=3 order by c.col2, b.col2, a.col2";
+        rs = s.executeQuery(sql1);
+		rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
+		assertTrue(rtsp.whatSortingRequired());
+        rs = s.executeQuery(sql1);
+        JDBC.assertFullResultSet(rs, result);
+}
+
+    /**
      * Test for forcing a order of tables in the FROM list user optimizer
      * overrides. This ordering of table is going to require us to do sorting.
+     * This forced sorting returns the correct result order.
      */
     public void testForceSortWithOptimizerOverrides() throws SQLException {
         Statement s = createStatement();
@@ -10065,7 +10168,7 @@
 		RuntimeStatisticsParser rtsp = SQLUtilities.getRuntimeStatisticsParser(s);
 		assertTrue(rtsp.usedSpecificIndexForIndexScan("TABLE2","KEY3"));
 		assertTrue(rtsp.usedTableScan("TABLE1"));
-		assertFalse(rtsp.whatSortingRequired());
+		assertTrue(rtsp.whatSortingRequired());
   
         rs = s.executeQuery(sql1);
         String[][] result = {
@@ -10097,7 +10200,7 @@
 				s);
 		assertTrue(rtsp.usedSpecificIndexForIndexScan("TABLE2","KEY3"));
 		assertTrue(rtsp.usedTableScan("TABLE1"));
-		assertFalse(rtsp.whatSortingRequired());
+		assertTrue(rtsp.whatSortingRequired());
 
 		rs = s.executeQuery(sql1);
         String[][] result = {

Propchange: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/OrderByAndSortAvoidance.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?rev=785073&r1=785072&r2=785073&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java (original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java Tue Jun 16 04:31:08 2009
@@ -142,6 +142,7 @@
         suite.addTest(LangHarnessJavaTest.suite());
         		
         suite.addTest(ResultSetsFromPreparedStatementTest.suite());
+        suite.addTest(OrderByAndSortAvoidance.suite());
 
         // tests that do not run with JSR169
         if (JDBC.vmSupportsJDBC3())  

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisc_setup.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisc_setup.sql?rev=785073&r1=785072&r2=785073&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisc_setup.sql (original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisc_setup.sql Tue Jun 16 04:31:08 2009
@@ -2702,6 +2702,34 @@
 
 commit;
 
+-- force TENKTUP1 as the outermost join table to make sure 
+-- that no sorting is necessary. DERBY-3926
+get cursor c as
+	'select * from --DERBY-PROPERTIES joinOrder=FIXED
+	 TENKTUP1, TENKTUP2
+	 where TENKTUP1.unique1 = TENKTUP2.unique1
+	 and TENKTUP2.unique1 < 2500
+	 order by TENKTUP1.unique1';
+close c;
+
+values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+
+commit;
+
+-- This time, force TENKTUP2 as the outermost join table to make sure 
+-- that still no sorting is necessary. DERBY-3926
+get cursor c as
+	'select * from --DERBY-PROPERTIES joinOrder=FIXED
+	 TENKTUP2, TENKTUP1
+	 where TENKTUP1.unique1 = TENKTUP2.unique1
+	 and TENKTUP2.unique1 < 2500
+	 order by TENKTUP1.unique1';
+close c;
+
+values SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS();
+
+commit;
+
 -- 25% of rows from joining table
 get cursor c as
 	'select * from TENKTUP1, TENKTUP2

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java?rev=785073&r1=785072&r2=785073&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java (original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/junit/RuntimeStatisticsParser.java Tue Jun 16 04:31:08 2009
@@ -178,7 +178,28 @@
     public boolean usedLastKeyIndexScan() {
         return lastKeyIndexScan;
     }
-
+    
+    /**
+     * @param tableName
+     * @return true if a Table Scan ResultSet was used for tableName
+     */    
+    public boolean usedTableScan(String tableName) {
+    	return (statistics.indexOf("Table Scan ResultSet for " +
+    			tableName)!= -1);
+    }
+    
+    /**
+     * @param tableName
+     * @param indexName
+     * @return true if passed indexName was used for Index Scan ResultSet
+     *     for the passed tableName
+     */
+    public boolean usedSpecificIndexForIndexScan(
+               String tableName, String indexName){
+        return (statistics.indexOf("Index Scan ResultSet for " +
+                    tableName + " using index " + indexName)!= -1);
+    }
+    
     /**
      * Return whether or not an index row to base row result set was used in
      * the query.
@@ -230,4 +251,20 @@
         return (statistics.indexOf("Number of rows qualified=" +
             qualRows + "\n") != -1);
     }
+
+    /**
+     * Check if sorting node was added for the query.
+     * @return true if sorting node was required
+     */
+    public boolean whatSortingRequired() {
+        return (statistics.indexOf("Sort information: ") != -1 );
+    }
+
+    public boolean usedExternalSort() {
+        return (statistics.indexOf("Sort type=external") != -1 );
+    }
+
+    public String toString() {
+        return statistics;
+    }
 }



Mime
View raw message