|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
Java heap spaceHello,
A problem I submitted shortly ago, which I though related with the underscore, keeps reappearing in a different fashion. It is somewhat related with LIKE statements and the use of underscore. To reproduce the problem: 1)Create a test table create table TEST ( TESTKEY CHAR(32), TESTCODE INT, TESTSTRING VARCHAR(50), TESTSTRING2 VARCHAR(50), TESTSTRING3 VARCHAR(50) ) 2) perform the following query, which works. select TESTKEY from TEST T where TESTSTRING like '%E\\_%' order by TESTCODE 3) now replace '%E\\_%' with 'E\\_%' (without the initial percent sign). This new query, which is supposed to be less demanding, fails. It can't be executed from Java, nor from my AquaStudio editor. Here's the stack trace Exception in thread "Timer-3" org.springframework.jdbc.UncategorizedSQLException: executing PreparedStatementCallback: encountered SQLException [Java heap space]; nested exception is com.mckoi.database.jdbc.MSQLException: Java heap space com.mckoi.database.jdbc.MSQLException: Java heap space at com.mckoi.database.jdbc.RemoteDatabaseInterface.execQuery(RemoteDatabaseInterface.java:280) at com.mckoi.database.jdbc.MConnection.executeQuery(MConnection.java:442) at com.mckoi.database.jdbc.MConnection.executeQueries(MConnection.java:425) at com.mckoi.database.jdbc.MStatement.executeQueries(MStatement.java:190) at com.mckoi.database.jdbc.MStatement.executeQuery(MStatement.java:164) at com.mckoi.database.jdbc.MPreparedStatement.executeQuery(MPreparedStatement.java:221) Any idea how can I circumvent this? Thanks in advance. Gonzalo __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceOn Thu, 14 Sep 2006 11:28:39 -0700 (PDT)
Gonzalo "Díaz" <kalos_listas@...> wrote: > It can't be executed from Java, nor from my AquaStudio > editor. Here's the stack trace > > Exception in thread "Timer-3" > org.springframework.jdbc.UncategorizedSQLException: > executing PreparedStatementCallback: encountered > SQLException [Java heap space]; nested exception is OK, I can reproduce this. I'd have to look in the source code to see what causes the out of memory error. -- Stefaan -- As complexity rises, precise statements lose meaning, and meaningful statements lose precision. -- Lotfi Zadeh --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceOn Thu, 14 Sep 2006 21:07:48 +0200
Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > OK, I can reproduce this. I'd have to look in the source code to see > what causes the out of memory error. I've found (and fixed) the problem. Two messages with attachments have failed to materialize on the list, which might be caused by the attachments. Hence this message, with the patch as a text attachment. Here's the text from the previous messages: > It's a bug in the code - the 'E\\_%' pattern causes an endless > loop in PatternSearch.search. I have a fix for this that -after > cursory testing- seems to work. > > I attach a patch with the fix as well as a fix for the compilation > with Java 5 (McKoi used "enum" as a variable name, in Java 5 it's a > reserved word). > > Mckoi with the attached patch and compiled with Java 1.5.008 is > running quite nicely. -- Stefaan -- As complexity rises, precise statements lose meaning, and meaningful statements lose precision. -- Lotfi Zadeh diff -urw mckoi1.0.3/src/com/mckoi/database/FunctionTable.java mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java --- mckoi1.0.3/src/com/mckoi/database/FunctionTable.java Tue Apr 8 01:55:02 2003 +++ mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java Thu Sep 14 22:58:37 2006 @@ -239,12 +239,12 @@ // Set up 'whole_table_group' to the list of all rows in the reference // table. - RowEnumeration enum = getReferenceTable().rowEnumeration(); - whole_table_is_simple_enum = enum instanceof SimpleRowEnumeration; + RowEnumeration theEnum = getReferenceTable().rowEnumeration(); + whole_table_is_simple_enum = theEnum instanceof SimpleRowEnumeration; if (!whole_table_is_simple_enum) { whole_table_group = new IntegerVector(getReferenceTable().getRowCount()); - while (enum.hasMoreRows()) { - whole_table_group.addInt(enum.nextRowIndex()); + while (theEnum.hasMoreRows()) { + whole_table_group.addInt(theEnum.nextRowIndex()); } } @@ -425,9 +425,9 @@ // This means there is no grouping, so merge with entire table, int r_count = table.getRowCount(); row_list = new IntegerVector(r_count); - RowEnumeration enum = table.rowEnumeration(); - while (enum.hasMoreRows()) { - row_list.addInt(enum.nextRowIndex()); + RowEnumeration theEnum = table.rowEnumeration(); + while (theEnum.hasMoreRows()) { + row_list.addInt(theEnum.nextRowIndex()); } } diff -urw mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java --- mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java Sat Sep 21 21:37:06 2002 +++ mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java Thu Sep 14 22:58:50 2006 @@ -86,9 +86,9 @@ */ private static IntegerVector createLookupRowList(Table t) { IntegerVector ivec = new IntegerVector(); - RowEnumeration enum = t.rowEnumeration(); - while (enum.hasMoreRows()) { - int row_index = enum.nextRowIndex(); + RowEnumeration theEnum = t.rowEnumeration(); + while (theEnum.hasMoreRows()) { + int row_index = theEnum.nextRowIndex(); ivec.addInt(row_index); } return ivec; diff -urw mckoi1.0.3/src/com/mckoi/database/PatternSearch.java mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java --- mckoi1.0.3/src/com/mckoi/database/PatternSearch.java Mon Feb 3 13:42:58 2003 +++ mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java Fri Sep 15 10:17:34 2006 @@ -204,7 +204,6 @@ // Look at first character in pattern, if it's a ONE_CHAR wildcard then // check expression and pattern match until next wild card. - if (pattern.charAt(0) == ONE_CHAR) { // Else step through each character in pattern and see if it matches up @@ -382,6 +381,7 @@ StringBuffer pre_pattern = new StringBuffer(); int i = 0; + int j = 0; boolean finished = i >= pattern.length(); boolean last_is_escape = false; @@ -388,14 +388,24 @@ while (!finished) { char c = pattern.charAt(i); if (last_is_escape) { - last_is_escape = true; + last_is_escape = false; pre_pattern.append(c); + j++; + ++i; + if (i >= pattern.length()) { + finished = true; } + } else if (c == escape_char) { last_is_escape = true; + ++i; + if (i >= pattern.length()) { + finished = true; } + } else if (!isWildCard(c)) { pre_pattern.append(c); + j++; ++i; if (i >= pattern.length()) { @@ -446,8 +456,8 @@ // 'Geoff\33' String lower_bounds = new String(pre_pattern); - int next_char = pre_pattern.charAt(i - 1) + 1; - pre_pattern.setCharAt(i - 1, (char) next_char); + int next_char = pre_pattern.charAt(j - 1) + 1; + pre_pattern.setCharAt(j - 1, (char) next_char); String upper_bounds = new String(pre_pattern); post_pattern = pattern.substring(i); diff -urw mckoi1.0.3/src/com/mckoi/database/Table.java mckoi1.0.3.sae//src/com/mckoi/database/Table.java --- mckoi1.0.3/src/com/mckoi/database/Table.java Tue Mar 4 16:11:40 2003 +++ mckoi1.0.3.sae//src/com/mckoi/database/Table.java Fri Sep 15 01:29:08 2006 @@ -1597,9 +1597,9 @@ */ public final IntegerVector selectAll() { IntegerVector list = new IntegerVector(getRowCount()); - RowEnumeration enum = rowEnumeration(); - while (enum.hasMoreRows()) { - list.addInt(enum.nextRowIndex()); + RowEnumeration theEnum = rowEnumeration(); + while (theEnum.hasMoreRows()) { + list.addInt(theEnum.nextRowIndex()); } return list; } @@ -1751,9 +1751,9 @@ public Map toMap() { if (getColumnCount() == 2) { HashMap map = new HashMap(); - RowEnumeration enum = rowEnumeration(); - while (enum.hasMoreRows()) { - int row_index = enum.nextRowIndex(); + RowEnumeration theEnum = rowEnumeration(); + while (theEnum.hasMoreRows()) { + int row_index = theEnum.nextRowIndex(); TObject key = getCellContents(0, row_index); TObject value = getCellContents(1, row_index); map.put(key.getObject().toString(), value.getObject()); diff -urw mckoi1.0.3/src/com/mckoi/database/control/DefaultDBConfig.java mckoi1.0.3.sae//src/com/mckoi/database/control/DefaultDBConfig.java --- mckoi1.0.3/src/com/mckoi/database/control/DefaultDBConfig.java Tue Jul 23 00:31:36 2002 +++ mckoi1.0.3.sae//src/com/mckoi/database/control/DefaultDBConfig.java Thu Sep 14 22:55:47 2006 @@ -93,10 +93,10 @@ Properties config = new Properties(); config.load(new BufferedInputStream(input)); // For each property in the file - Enumeration enum = config.propertyNames(); - while (enum.hasMoreElements()) { + Enumeration theEnum = config.propertyNames(); + while (theEnum.hasMoreElements()) { // Set the property value in this configuration. - String property_key = (String) enum.nextElement(); + String property_key = (String) theEnum.nextElement(); setValue(property_key, config.getProperty(property_key)); } } diff -urw mckoi1.0.3/src/com/mckoi/database/interpret/Insert.java mckoi1.0.3.sae//src/com/mckoi/database/interpret/Insert.java --- mckoi1.0.3/src/com/mckoi/database/interpret/Insert.java Tue Jul 22 01:54:32 2003 +++ mckoi1.0.3.sae//src/com/mckoi/database/interpret/Insert.java Thu Sep 14 22:55:41 2006 @@ -274,9 +274,9 @@ // Copy row list into an intermediate IntegerVector list. // (A RowEnumeration for a table being modified is undefined). IntegerVector row_list = new IntegerVector(); - RowEnumeration enum = result.rowEnumeration(); - while (enum.hasMoreRows()) { - row_list.addInt(enum.nextRowIndex()); + RowEnumeration theEnum = result.rowEnumeration(); + while (theEnum.hasMoreRows()) { + row_list.addInt(theEnum.nextRowIndex()); } // For each row of the select table. diff -urw mckoi1.0.3/src/com/mckoi/database/jdbcserver/AbstractJDBCDatabaseInterface.java mckoi1.0.3.sae//src/com/mckoi/database/jdbcserver/AbstractJDBCDatabaseInterface.java --- mckoi1.0.3/src/com/mckoi/database/jdbcserver/AbstractJDBCDatabaseInterface.java Tue Apr 8 02:36:06 2003 +++ mckoi1.0.3.sae//src/com/mckoi/database/jdbcserver/AbstractJDBCDatabaseInterface.java Fri Sep 15 10:16:07 2006 @@ -770,9 +770,9 @@ // Build 'row_index_map' if not a simple enum if (!result_is_simple_enum) { row_index_map = new IntegerVector(table.getRowCount()); - RowEnumeration enum = table.rowEnumeration(); - while (enum.hasMoreRows()) { - row_index_map.addInt(enum.nextRowIndex()); + RowEnumeration theEnum = table.rowEnumeration(); + while (theEnum.hasMoreRows()) { + row_index_map.addInt(theEnum.nextRowIndex()); } } diff -urw mckoi1.0.3/src/com/mckoi/database/sql/SQL.java mckoi1.0.3.sae//src/com/mckoi/database/sql/SQL.java --- mckoi1.0.3/src/com/mckoi/database/sql/SQL.java Tue Jul 6 17:14:22 2004 +++ mckoi1.0.3.sae//src/com/mckoi/database/sql/SQL.java Thu Sep 14 22:59:36 2006 @@ -5998,8 +5998,8 @@ jj_expentry[i] = jj_lasttokens[i]; } boolean exists = false; - for (java.util.Enumeration enum = jj_expentries.elements(); enum.hasMoreElements();) { - int[] oldentry = (int[])(enum.nextElement()); + for (java.util.Enumeration theEnum = jj_expentries.elements(); theEnum.hasMoreElements();) { + int[] oldentry = (int[])(theEnum.nextElement()); if (oldentry.length == jj_expentry.length) { exists = true; for (int i = 0; i < jj_expentry.length; i++) { --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceThank you.
Has this patch been applied to the nighty build? Sorry for asking this, I don't know how your build process works. I got the nighty build but the error persists. Are users supposed to chec out from CVS and apply the patch isolatedly instead? Gonzalo PS: While I am at it, I would like to volunteer for replacing all the "enum" variable names by something else, to see if i can be compiled in 1.5. --- Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > On Thu, 14 Sep 2006 21:07:48 +0200 > Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > > > OK, I can reproduce this. I'd have to look in the > source code to see > > what causes the out of memory error. > > I've found (and fixed) the problem. Two messages > with attachments have > failed to materialize on the list, which might be > caused by the > attachments. Hence this message, with the patch as a > text attachment. > > Here's the text from the previous messages: > > > It's a bug in the code - the 'E\\_%' pattern > causes an endless > > loop in PatternSearch.search. I have a fix for > this that -after > > cursory testing- seems to work. > > > > I attach a patch with the fix as well as a fix for > the compilation > > with Java 5 (McKoi used "enum" as a variable name, > in Java 5 it's a > > reserved word). > > > > Mckoi with the attached patch and compiled with > Java 1.5.008 is > > running quite nicely. > > > -- > Stefaan > -- > As complexity rises, precise statements lose > meaning, > and meaningful statements lose precision. -- Lotfi > Zadeh > > diff -urw > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java > > --- > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java > Tue Apr 8 01:55:02 2003 > +++ > mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java > Thu Sep 14 22:58:37 2006 > @@ -239,12 +239,12 @@ > > // Set up 'whole_table_group' to the list of > all rows in the reference > // table. > - RowEnumeration enum = > getReferenceTable().rowEnumeration(); > - whole_table_is_simple_enum = enum instanceof > SimpleRowEnumeration; > + RowEnumeration theEnum = > getReferenceTable().rowEnumeration(); > + whole_table_is_simple_enum = theEnum instanceof > SimpleRowEnumeration; > if (!whole_table_is_simple_enum) { > whole_table_group = new > IntegerVector(getReferenceTable().getRowCount()); > - while (enum.hasMoreRows()) { > - > whole_table_group.addInt(enum.nextRowIndex()); > + while (theEnum.hasMoreRows()) { > + > whole_table_group.addInt(theEnum.nextRowIndex()); > } > } > > @@ -425,9 +425,9 @@ > // This means there is no grouping, so merge > with entire table, > int r_count = table.getRowCount(); > row_list = new IntegerVector(r_count); > - RowEnumeration enum = table.rowEnumeration(); > - while (enum.hasMoreRows()) { > - row_list.addInt(enum.nextRowIndex()); > + RowEnumeration theEnum = > table.rowEnumeration(); > + while (theEnum.hasMoreRows()) { > + row_list.addInt(theEnum.nextRowIndex()); > } > } > > diff -urw > > mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java > --- > mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java > Sat Sep 21 21:37:06 2002 > +++ > mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java > Thu Sep 14 22:58:50 2006 > @@ -86,9 +86,9 @@ > */ > private static IntegerVector > createLookupRowList(Table t) { > IntegerVector ivec = new IntegerVector(); > - RowEnumeration enum = t.rowEnumeration(); > - while (enum.hasMoreRows()) { > - int row_index = enum.nextRowIndex(); > + RowEnumeration theEnum = t.rowEnumeration(); > + while (theEnum.hasMoreRows()) { > + int row_index = theEnum.nextRowIndex(); > ivec.addInt(row_index); > } > return ivec; > diff -urw > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java > > --- > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java > Mon Feb 3 13:42:58 2003 > +++ > mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java > Fri Sep 15 10:17:34 2006 > @@ -204,7 +204,6 @@ > > // Look at first character in pattern, if it's > a ONE_CHAR wildcard then > // check expression and pattern match until > next wild card. > - > if (pattern.charAt(0) == ONE_CHAR) { > > // Else step through each character in > pattern and see if it matches up > @@ -382,6 +381,7 @@ > > StringBuffer pre_pattern = new StringBuffer(); > int i = 0; > + int j = 0; > boolean finished = i >= pattern.length(); > boolean last_is_escape = false; > > @@ -388,14 +388,24 @@ > while (!finished) { > char c = pattern.charAt(i); > if (last_is_escape) { > - last_is_escape = true; > + last_is_escape = false; > pre_pattern.append(c); > + j++; > + ++i; > + if (i >= pattern.length()) { > + finished = true; > } > + } > else if (c == escape_char) { > last_is_escape = true; > + ++i; > + if (i >= pattern.length()) { > + finished = true; > } > + } > else if (!isWildCard(c)) { > pre_pattern.append(c); > + j++; > > ++i; > if (i >= pattern.length()) { > @@ -446,8 +456,8 @@ > // 'Geoff\33' > > String lower_bounds = new > String(pre_pattern); > - int next_char = pre_pattern.charAt(i - 1) + > 1; > - pre_pattern.setCharAt(i - 1, (char) > next_char); > + int next_char = pre_pattern.charAt(j - 1) + > 1; > + pre_pattern.setCharAt(j - 1, (char) > next_char); > String upper_bounds = new > String(pre_pattern); > > post_pattern = pattern.substring(i); > diff -urw > mckoi1.0.3/src/com/mckoi/database/Table.java > mckoi1.0.3.sae//src/com/mckoi/database/Table.java > --- mckoi1.0.3/src/com/mckoi/database/Table.java Tue > Mar 4 16:11:40 2003 > +++ > mckoi1.0.3.sae//src/com/mckoi/database/Table.java > Fri Sep 15 01:29:08 2006 > @@ -1597,9 +1597,9 @@ > */ > public final IntegerVector selectAll() { > IntegerVector list = new > IntegerVector(getRowCount()); > - RowEnumeration enum = rowEnumeration(); > - while (enum.hasMoreRows()) { > - list.addInt(enum.nextRowIndex()); > + RowEnumeration theEnum = rowEnumeration(); > + while (theEnum.hasMoreRows()) { > + list.addInt(theEnum.nextRowIndex()); > } > return list; > } > @@ -1751,9 +1751,9 @@ > public Map toMap() { > if (getColumnCount() == 2) { > HashMap map = new HashMap(); > - RowEnumeration enum = rowEnumeration(); > - while (enum.hasMoreRows()) { > - int row_index = enum.nextRowIndex(); > + RowEnumeration theEnum = rowEnumeration(); > + while (theEnum.hasMoreRows()) { > + int row_index = theEnum.nextRowIndex(); > TObject key = getCellContents(0, > row_index); > TObject value = getCellContents(1, > row_index); > map.put(key.getObject().toString(), > value.getObject()); > diff -urw > > mckoi1.0.3.sae//src/com/mckoi/database/control/DefaultDBConfig.java > --- > mckoi1.0.3/src/com/mckoi/database/control/DefaultDBConfig.java > Tue Jul 23 00:31:36 2002 > +++ > mckoi1.0.3.sae//src/com/mckoi/database/control/DefaultDBConfig.java > Thu Sep 14 22:55:47 2006 > @@ -93,10 +93,10 @@ > Properties config = new Properties(); > config.load(new BufferedInputStream(input)); > // For each property in the file > - Enumeration enum = config.propertyNames(); > - while (enum.hasMoreElements()) { > + Enumeration theEnum = config.propertyNames(); > + while (theEnum.hasMoreElements()) { > // Set the property value in this > configuration. > - String property_key = (String) > enum.nextElement(); > > --------------------------------------------------------------- > Mckoi SQL Database mailing list > http://www.mckoi.com/database/ > To unsubscribe, send a message to mckoidb-unsubscribe@... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceOn Fri, 15 Sep 2006 09:31:57 -0700 (PDT)
Gonzalo "Díaz" <kalos_listas@...> wrote: > Has this patch been applied to the nighty build? No, I don't have access to the CVS repository. I'm in no way involved with the development of McKoi - I'm just a very happy user. > Sorry for asking this, I don't know how your build > process works. I got the nighty build but the error > persists. Here's the build script I use: #!/bin/ksh [ ! -d lib ] && mkdir lib javac -classpath src:lib:gnu-regexp-1.1.4.jar -d lib/ \ src/com/mckoi/runtime/McKoiDBMain.java \ src/com/mckoi/JDBCDriver.java \ src/com/mckoi/database/jdbcserver/DefaultLocalBootable.java \ src/com/mckoi/database/interpret/*.java \ src/com/mckoi/database/control/*.java \ src/com/mckoi/tools/*.java \ src/com/mckoi/database/regexbridge/*.java [ $? -eq 0 ] && ( cd lib rm -f mckoidb.jar jar cvf mckoidb.jar com ) > Are users supposed to chec out from CVS and apply the > patch isolatedly instead? I patched against the 1.0.3 version. It should be possible to apply the patch to the CVS version but I haven't tried. I'll do it later tonight if the dinner with my in-laws doesn't leave me too inebriated :). > > PS: While I am at it, I would like to volunteer for > replacing all the "enum" variable names by something > else, to see if i can be compiled in 1.5. The patch I included does that. -- Stefaan -- As complexity rises, precise statements lose meaning, and meaningful statements lose precision. -- Lotfi Zadeh --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceOoops, looking at the patch code, I realize that
replacing the enums is what you just did, sorry. Then I'll simply wait until they are refelcted on the nightly build. Thanks Gonzalo --- Gonzalo Díaz <kalos_listas@...> wrote: > Thank you. > Has this patch been applied to the nighty build? > Sorry for asking this, I don't know how your build > process works. I got the nighty build but the error > persists. > Are users supposed to chec out from CVS and apply > the > patch isolatedly instead? > > Gonzalo > > PS: While I am at it, I would like to volunteer for > replacing all the "enum" variable names by something > else, to see if i can be compiled in 1.5. > > > > --- Stefaan A Eeckels <Stefaan.Eeckels@...> > wrote: > > > On Thu, 14 Sep 2006 21:07:48 +0200 > > Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > > > > > OK, I can reproduce this. I'd have to look in > the > > source code to see > > > what causes the out of memory error. > > > > I've found (and fixed) the problem. Two messages > > with attachments have > > failed to materialize on the list, which might be > > caused by the > > attachments. Hence this message, with the patch as > a > > text attachment. > > > > Here's the text from the previous messages: > > > > > It's a bug in the code - the 'E\\_%' pattern > > causes an endless > > > loop in PatternSearch.search. I have a fix for > > this that -after > > > cursory testing- seems to work. > > > > > > I attach a patch with the fix as well as a fix > for > > the compilation > > > with Java 5 (McKoi used "enum" as a variable > name, > > in Java 5 it's a > > > reserved word). > > > > > > Mckoi with the attached patch and compiled with > > Java 1.5.008 is > > > running quite nicely. > > > > > > -- > > Stefaan > > -- > > As complexity rises, precise statements lose > > meaning, > > and meaningful statements lose precision. -- Lotfi > > Zadeh > > > diff -urw > > > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java > > > > > --- > > > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java > > Tue Apr 8 01:55:02 2003 > > +++ > > > mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java > > Thu Sep 14 22:58:37 2006 > > @@ -239,12 +239,12 @@ > > > > // Set up 'whole_table_group' to the list of > > all rows in the reference > > // table. > > - RowEnumeration enum = > > getReferenceTable().rowEnumeration(); > > - whole_table_is_simple_enum = enum instanceof > > SimpleRowEnumeration; > > + RowEnumeration theEnum = > > getReferenceTable().rowEnumeration(); > > + whole_table_is_simple_enum = theEnum > instanceof > > SimpleRowEnumeration; > > if (!whole_table_is_simple_enum) { > > whole_table_group = new > > IntegerVector(getReferenceTable().getRowCount()); > > - while (enum.hasMoreRows()) { > > - > > whole_table_group.addInt(enum.nextRowIndex()); > > + while (theEnum.hasMoreRows()) { > > + > > whole_table_group.addInt(theEnum.nextRowIndex()); > > } > > } > > > > @@ -425,9 +425,9 @@ > > // This means there is no grouping, so > merge > > with entire table, > > int r_count = table.getRowCount(); > > row_list = new IntegerVector(r_count); > > - RowEnumeration enum = > table.rowEnumeration(); > > - while (enum.hasMoreRows()) { > > - row_list.addInt(enum.nextRowIndex()); > > + RowEnumeration theEnum = > > table.rowEnumeration(); > > + while (theEnum.hasMoreRows()) { > > + row_list.addInt(theEnum.nextRowIndex()); > > } > > } > > > > diff -urw > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java > > --- > > > mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java > > Sat Sep 21 21:37:06 2002 > > +++ > > > mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java > > Thu Sep 14 22:58:50 2006 > > @@ -86,9 +86,9 @@ > > */ > > private static IntegerVector > > createLookupRowList(Table t) { > > IntegerVector ivec = new IntegerVector(); > > - RowEnumeration enum = t.rowEnumeration(); > > - while (enum.hasMoreRows()) { > > - int row_index = enum.nextRowIndex(); > > + RowEnumeration theEnum = t.rowEnumeration(); > > + while (theEnum.hasMoreRows()) { > > + int row_index = theEnum.nextRowIndex(); > > ivec.addInt(row_index); > > } > > return ivec; > > diff -urw > > > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java > > > > > --- > > > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java > > Mon Feb 3 13:42:58 2003 > > +++ > > > mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java > > Fri Sep 15 10:17:34 2006 > > @@ -204,7 +204,6 @@ > > > > // Look at first character in pattern, if > it's > > a ONE_CHAR wildcard then > > // check expression and pattern match until > > next wild card. > > - > > if (pattern.charAt(0) == ONE_CHAR) { > > > > // Else step through each character in > > pattern and see if it matches up > > @@ -382,6 +381,7 @@ > > > > StringBuffer pre_pattern = new > StringBuffer(); > > int i = 0; > > + int j = 0; > > boolean finished = i >= pattern.length(); > > boolean last_is_escape = false; > > > > @@ -388,14 +388,24 @@ > > while (!finished) { > > char c = pattern.charAt(i); > > if (last_is_escape) { > > - last_is_escape = true; > > + last_is_escape = false; > > pre_pattern.append(c); > > + j++; > > + ++i; > > + if (i >= pattern.length()) { > > + finished = true; > > } > > + } > > else if (c == escape_char) { > > last_is_escape = true; > > + ++i; > > + if (i >= pattern.length()) { > > + finished = true; > > } > > + } > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceUnderstood.
Hey, if you can access the CVS repository, let me know. I can ping but not login (connection refused). Maybe it's just a firawall problem, Ill try again from home. Regards Gonzalo --- Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > On Fri, 15 Sep 2006 09:31:57 -0700 (PDT) > Gonzalo "Díaz" <kalos_listas@...> wrote: > > > Has this patch been applied to the nighty build? > > No, I don't have access to the CVS repository. I'm > in no way involved > with the development of McKoi - I'm just a very > happy user. > > > Sorry for asking this, I don't know how your build > > process works. I got the nighty build but the > error > > persists. > > Here's the build script I use: > > #!/bin/ksh > [ ! -d lib ] && mkdir lib > javac -classpath src:lib:gnu-regexp-1.1.4.jar -d > lib/ \ > src/com/mckoi/runtime/McKoiDBMain.java \ > src/com/mckoi/JDBCDriver.java \ > > > \ > src/com/mckoi/database/interpret/*.java \ > src/com/mckoi/database/control/*.java \ > src/com/mckoi/tools/*.java \ > src/com/mckoi/database/regexbridge/*.java > > [ $? -eq 0 ] && ( > cd lib > rm -f mckoidb.jar > jar cvf mckoidb.jar com > ) > > > Are users supposed to chec out from CVS and apply > the > > patch isolatedly instead? > > I patched against the 1.0.3 version. It should be > possible to apply the > patch to the CVS version but I haven't tried. I'll > do it later tonight > if the dinner with my in-laws doesn't leave me too > inebriated :). > > > > > PS: While I am at it, I would like to volunteer > for > > replacing all the "enum" variable names by > something > > else, to see if i can be compiled in 1.5. > > The patch I included does that. > > -- > Stefaan > -- > As complexity rises, precise statements lose > meaning, > and meaningful statements lose precision. -- Lotfi > Zadeh > > > > Mckoi SQL Database mailing list > http://www.mckoi.com/database/ > To unsubscribe, send a message to > mckoidb-unsubscribe@... > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceUnfortunately, the project is dead, that means these valuable
modifications can only be shared between users but they won't never arrive to be applied to official project repository. ... On 9/15/06, Gonzalo Díaz <kalos_listas@...> wrote: > Ooops, looking at the patch code, I realize that > replacing the enums is what you just did, sorry. > Then I'll simply wait until they are refelcted on the > nightly build. > Thanks > > Gonzalo > > --- Gonzalo Díaz <kalos_listas@...> wrote: > > > Thank you. > > Has this patch been applied to the nighty build? > > Sorry for asking this, I don't know how your build > > process works. I got the nighty build but the error > > persists. > > Are users supposed to chec out from CVS and apply > > the > > patch isolatedly instead? > > > > Gonzalo > > > > PS: While I am at it, I would like to volunteer for > > replacing all the "enum" variable names by something > > else, to see if i can be compiled in 1.5. > > > > > > > > --- Stefaan A Eeckels <Stefaan.Eeckels@...> > > wrote: > > > > > On Thu, 14 Sep 2006 21:07:48 +0200 > > > Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > > > > > > > OK, I can reproduce this. I'd have to look in > > the > > > source code to see > > > > what causes the out of memory error. > > > > > > I've found (and fixed) the problem. Two messages > > > with attachments have > > > failed to materialize on the list, which might be > > > caused by the > > > attachments. Hence this message, with the patch as > > a > > > text attachment. > > > > > > Here's the text from the previous messages: > > > > > > > It's a bug in the code - the 'E\\_%' pattern > > > causes an endless > > > > loop in PatternSearch.search. I have a fix for > > > this that -after > > > > cursory testing- seems to work. > > > > > > > > I attach a patch with the fix as well as a fix > > for > > > the compilation > > > > with Java 5 (McKoi used "enum" as a variable > > name, > > > in Java 5 it's a > > > > reserved word). > > > > > > > > Mckoi with the attached patch and compiled with > > > Java 1.5.008 is > > > > running quite nicely. > > > > > > > > > -- > > > Stefaan > > > -- > > > As complexity rises, precise statements lose > > > meaning, > > > and meaningful statements lose precision. -- Lotfi > > > Zadeh > > > > diff -urw > > > > > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java > > > --- > > > > > mckoi1.0.3/src/com/mckoi/database/FunctionTable.java > > > Tue Apr 8 01:55:02 2003 > > > +++ > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/FunctionTable.java > > > Thu Sep 14 22:58:37 2006 > > > @@ -239,12 +239,12 @@ > > > > > > // Set up 'whole_table_group' to the list of > > > all rows in the reference > > > // table. > > > - RowEnumeration enum = > > > getReferenceTable().rowEnumeration(); > > > - whole_table_is_simple_enum = enum instanceof > > > SimpleRowEnumeration; > > > + RowEnumeration theEnum = > > > getReferenceTable().rowEnumeration(); > > > + whole_table_is_simple_enum = theEnum > > instanceof > > > SimpleRowEnumeration; > > > if (!whole_table_is_simple_enum) { > > > whole_table_group = new > > > IntegerVector(getReferenceTable().getRowCount()); > > > - while (enum.hasMoreRows()) { > > > - > > > whole_table_group.addInt(enum.nextRowIndex()); > > > + while (theEnum.hasMoreRows()) { > > > + > > > whole_table_group.addInt(theEnum.nextRowIndex()); > > > } > > > } > > > > > > @@ -425,9 +425,9 @@ > > > // This means there is no grouping, so > > merge > > > with entire table, > > > int r_count = table.getRowCount(); > > > row_list = new IntegerVector(r_count); > > > - RowEnumeration enum = > > table.rowEnumeration(); > > > - while (enum.hasMoreRows()) { > > > - row_list.addInt(enum.nextRowIndex()); > > > + RowEnumeration theEnum = > > > table.rowEnumeration(); > > > + while (theEnum.hasMoreRows()) { > > > + row_list.addInt(theEnum.nextRowIndex()); > > > } > > > } > > > > > > diff -urw > > > > > > mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java > > > --- > > > > > > mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java > > > Sat Sep 21 21:37:06 2002 > > > +++ > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/NaturallyJoinedTable.java > > > Thu Sep 14 22:58:50 2006 > > > @@ -86,9 +86,9 @@ > > > */ > > > private static IntegerVector > > > createLookupRowList(Table t) { > > > IntegerVector ivec = new IntegerVector(); > > > - RowEnumeration enum = t.rowEnumeration(); > > > - while (enum.hasMoreRows()) { > > > - int row_index = enum.nextRowIndex(); > > > + RowEnumeration theEnum = t.rowEnumeration(); > > > + while (theEnum.hasMoreRows()) { > > > + int row_index = theEnum.nextRowIndex(); > > > ivec.addInt(row_index); > > > } > > > return ivec; > > > diff -urw > > > > > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java > > > --- > > > > > mckoi1.0.3/src/com/mckoi/database/PatternSearch.java > > > Mon Feb 3 13:42:58 2003 > > > +++ > > > > > > mckoi1.0.3.sae//src/com/mckoi/database/PatternSearch.java > > > Fri Sep 15 10:17:34 2006 > > > @@ -204,7 +204,6 @@ > > > > > > // Look at first character in pattern, if > > it's > > > a ONE_CHAR wildcard then > > > // check expression and pattern match until > > > next wild card. > > > - > > > if (pattern.charAt(0) == ONE_CHAR) { > > > > > > // Else step through each character in > > > pattern and see if it matches up > > > @@ -382,6 +381,7 @@ > > > > > > StringBuffer pre_pattern = new > > StringBuffer(); > > > int i = 0; > > > + int j = 0; > > > boolean finished = i >= pattern.length(); > > > boolean last_is_escape = false; > > > > > > @@ -388,14 +388,24 @@ > > > while (!finished) { > > > char c = pattern.charAt(i); > > > if (last_is_escape) { > > > - last_is_escape = true; > > > + last_is_escape = false; > > > pre_pattern.append(c); > > > + j++; > > > + ++i; > > > + if (i >= pattern.length()) { > > > + finished = true; > > > } > > > + } > > > else if (c == escape_char) { > > > last_is_escape = true; > > > + ++i; > > > + if (i >= pattern.length()) { > > > + finished = true; > > > } > > > + } > > > === message truncated === > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > --------------------------------------------------------------- > Mckoi SQL Database mailing list http://www.mckoi.com/database/ > To unsubscribe, send a message to mckoidb-unsubscribe@... > > --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceUnfortunately, the project is dead, that means these valuable
modifications can only be shared between users but they won't never arrive to be applied to official project repository. On 9/15/06, Gonzalo Díaz <kalos_listas@...> wrote: > Understood. > Hey, if you can access the CVS repository, let me > know. I can ping but not login (connection refused). > Maybe it's just a firawall problem, Ill try again from > home. > Regards > > Gonzalo > > --- Stefaan A Eeckels <Stefaan.Eeckels@...> wrote: > > > On Fri, 15 Sep 2006 09:31:57 -0700 (PDT) > > Gonzalo "Díaz" <kalos_listas@...> wrote: > > > > > Has this patch been applied to the nighty build? > > > > No, I don't have access to the CVS repository. I'm > > in no way involved > > with the development of McKoi - I'm just a very > > happy user. > > > > > Sorry for asking this, I don't know how your build > > > process works. I got the nighty build but the > > error > > > persists. > > > > Here's the build script I use: > > > > #!/bin/ksh > > [ ! -d lib ] && mkdir lib > > javac -classpath src:lib:gnu-regexp-1.1.4.jar -d > > lib/ \ > > src/com/mckoi/runtime/McKoiDBMain.java \ > > src/com/mckoi/JDBCDriver.java \ > > > > > src/com/mckoi/database/jdbcserver/DefaultLocalBootable.java > > \ > > src/com/mckoi/database/interpret/*.java \ > > src/com/mckoi/database/control/*.java \ > > src/com/mckoi/tools/*.java \ > > src/com/mckoi/database/regexbridge/*.java > > > > [ $? -eq 0 ] && ( > > cd lib > > rm -f mckoidb.jar > > jar cvf mckoidb.jar com > > ) > > > > > Are users supposed to chec out from CVS and apply > > the > > > patch isolatedly instead? > > > > I patched against the 1.0.3 version. It should be > > possible to apply the > > patch to the CVS version but I haven't tried. I'll > > do it later tonight > > if the dinner with my in-laws doesn't leave me too > > inebriated :). > > > > > > > > PS: While I am at it, I would like to volunteer > > for > > > replacing all the "enum" variable names by > > something > > > else, to see if i can be compiled in 1.5. > > > > The patch I included does that. > > > > -- > > Stefaan > > -- > > As complexity rises, precise statements lose > > meaning, > > and meaningful statements lose precision. -- Lotfi > > Zadeh > > > > > > > --------------------------------------------------------------- > > Mckoi SQL Database mailing list > > http://www.mckoi.com/database/ > > To unsubscribe, send a message to > > mckoidb-unsubscribe@... > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > > --------------------------------------------------------------- > Mckoi SQL Database mailing list http://www.mckoi.com/database/ > To unsubscribe, send a message to mckoidb-unsubscribe@... > > --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceStefaan,
Thank you for finding this bug. I need to check through this code myself and I'll be applying this fix to my development version today. The 1.5 syntax changes and many other code changes will be rolled out in the next version of Mckoi. Toby. Stefaan A Eeckels wrote: > On Fri, 15 Sep 2006 09:31:57 -0700 (PDT) > Gonzalo "Díaz" <kalos_listas@...> wrote: > >>Has this patch been applied to the nighty build? > > No, I don't have access to the CVS repository. I'm in no way involved > with the development of McKoi - I'm just a very happy user. > >>Sorry for asking this, I don't know how your build >>process works. I got the nighty build but the error >>persists. > > Here's the build script I use: > > #!/bin/ksh > [ ! -d lib ] && mkdir lib > javac -classpath src:lib:gnu-regexp-1.1.4.jar -d lib/ \ > src/com/mckoi/runtime/McKoiDBMain.java \ > src/com/mckoi/JDBCDriver.java \ > src/com/mckoi/database/jdbcserver/DefaultLocalBootable.java \ > src/com/mckoi/database/interpret/*.java \ > src/com/mckoi/database/control/*.java \ > src/com/mckoi/tools/*.java \ > src/com/mckoi/database/regexbridge/*.java > > [ $? -eq 0 ] && ( > cd lib > rm -f mckoidb.jar > jar cvf mckoidb.jar com > ) > >>Are users supposed to chec out from CVS and apply the >>patch isolatedly instead? > > I patched against the 1.0.3 version. It should be possible to apply the > patch to the CVS version but I haven't tried. I'll do it later tonight > if the dinner with my in-laws doesn't leave me too inebriated :). > >>PS: While I am at it, I would like to volunteer for >>replacing all the "enum" variable names by something >>else, to see if i can be compiled in 1.5. > > The patch I included does that. --------------------------------------------------------------- Mckoi SQL Database mailing list http://www.mckoi.com/database/ To unsubscribe, send a message to mckoidb-unsubscribe@... |
|
|
Re: Java heap spaceThis fix and many other changes will be rolled out in the next version
of Mckoi. The upcoming version is a large rewrite of most of the core parts of Mckoi related to indexes, data management and query evaluation. While new development on Mckoi has slowed from what it used to be, there has been a very s |