On Thu, 5 Oct 2006 23:19:02 +0200
Stefaan A Eeckels <Stefaan.Eeckels ecc.lu> wrote:
> When using McKoi with a Turkish locale, the internal
queries that
> create the views don't work, and the database doesn't
start.
I've researched this a bit better, and I've now a better
analysis plus
a patch to fix this.
The problem with Turkish is that there are two types of
"I", with and
without dot. The two lowercase letters are u0069
"i" and u0131
(dotless lowercase "i") and they are totally
unrelated. Their uppercase
versions are u0130 (dotted capital "I") and
u0049, the dotless
uppercase "I". When using towLowerCase(), the
dotless "I" becomes a
dotless "i", which is not the same as in English;
as a result,
uppercase keywords - and anything that gets lowercased for
to get rid
of case sensitivity - becomes unrecognisable.
Unfortunately, using upper case doesn't solve the problem,
because the
lowercase dotted "i" becomes the uppercase dotted
"I", which again
causes comparisons to fail.
The fix I applied to Mckoi is to make sure that the
conversions to
lower case (with the exception of the one instance used to
implement
the "LOWER()" function are called with the
java.util.Locale.ENGLISH
parameter. All conversions to upper case with the exception
of the one
instance used to implement the "UPPER()" function
should also be
changed to use the java.util.Locale.ENGLISH parameter.
Obviously, if you want your application to run properly in
the Turkish
locale, you could use the same approach for
"utility" case conversions.
A patch against 1.0.3 is attached. Please note that it also
includes my
previous patches to compile in Java 5 and SQL wildcard heap
overflow
(see my article in the "Java heap space" thread).
I don't think it is necessary to apply this fix to the GNU
regular
expression library included with Mckoi. Please let me know
if I'm
mistaken.
Take care,
--
Stefaan
--
As complexity rises, precise statements lose meaning,
and meaningful statements lose precision. -- Lotfi Zadeh
diff -r -u
mckoi1.0.3/src/com/mckoi/database/DatabaseConnection.java
mckoi1.0.3.sae/src/com/mckoi/database/DatabaseConnection.jav
a
---
mckoi1.0.3/src/com/mckoi/database/DatabaseConnection.java We
d Jul 14 20:04:18 2004
+++
mckoi1.0.3.sae/src/com/mckoi/database/DatabaseConnection.jav
a Wed Oct 11 00:47:37 2006
 -458,10
+458,10 
* case insensitive for identifiers resolved by the
grammar.
*/
public void setVar(String name, Expression exp) {
- if
(name.toUpperCase().equals("ERROR_ON_DIRTY_SELECT"
)) {
+ if
(name.toUpperCase(java.util.Locale.ENGLISH).equals("ERR
OR_ON_DIRTY_SELECT")) {
error_on_dirty_select = toBooleanValue(exp);
}
- else if
(name.toUpperCase().equals("CASE_INSENSITIVE_IDENTIFIER
S")) {
+ else if
(name.toUpperCase(java.util.Locale.ENGLISH).equals("CAS
E_INSENSITIVE_IDENTIFIERS")) {
case_insensitive_identifiers = toBooleanValue(exp);
}
}
diff -r -u
mckoi1.0.3/src/com/mckoi/database/FunctionFactory.java
mckoi1.0.3.sae/src/com/mckoi/database/FunctionFactory.java
---
mckoi1.0.3/src/com/mckoi/database/FunctionFactory.java Sun
Aug 25 17:50:08 2002
+++
mckoi1.0.3.sae/src/com/mckoi/database/FunctionFactory.java W
ed Oct 11 00:23:07 2006
 -95,7
+95,7 
*/
protected void addFunction(String fun_name, Class
fun_class, int fun_type) {
try {
- String lf_name = fun_name.toLowerCase();
+ String lf_name =
fun_name.toLowerCase(java.util.Locale.ENGLISH);
if (fun_class_mapping.get(lf_name) == null) {
FF_FunctionInfo ff_info = new
FF_FunctionInfo(fun_name, fun_type,
fun_class.getConstructor(construct_proto));
 -122,9
+122,9 
* Removes a static function from this factory.
*/
protected void removeFunction(String fun_name) {
- String lf_name = fun_name.toLowerCase();
+ String lf_name =
fun_name.toLowerCase(java.util.Locale.ENGLISH);
if (fun_class_mapping.get(lf_name) != null) {
- fun_class_mapping.remove(fun_name.toLowerCase());
+
fun_class_mapping.remove(fun_name.toLowerCase(java.util.Loca
le.ENGLISH));
}
else {
throw new Error("Function '" + lf_name +
 -136,7
+136,7 
* Returns true if the function name is defined in this
factory.
*/
protected boolean functionDefined(String fun_name) {
- String lf_name = fun_name.toLowerCase();
+ String lf_name =
fun_name.toLowerCase(java.util.Locale.ENGLISH);
return fun_class_mapping.get(lf_name) != null;
}
 -162,7
+162,7 
// function class was registered, instantiates and
returns it.
FF_FunctionInfo ff_info = (FF_FunctionInfo)
-
fun_class_mapping.get(func_name.toLowerCase());
+
fun_class_mapping.get(func_name.toLowerCase(java.util.Locale
.ENGLISH));
if (ff_info == null) {
// Function not handled by this factory so return
null.
return null;
 -204,7
+204,7 
*/
public FunctionInfo getFunctionInfo(String fun_name) {
FF_FunctionInfo ff_info = (FF_FunctionInfo)
-
fun_class_mapping.get(fun_name.toLowerCase());
+
fun_class_mapping.get(fun_name.toLowerCase(java.util.Locale.
ENGLISH));
return ff_info;
}
diff -r -u
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 Tue
Oct 10 23:24:17 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 -r -u
mckoi1.0.3/src/com/mckoi/database/InternalFunctionFactory.ja
va
mckoi1.0.3.sae/src/com/mckoi/database/InternalFunctionFactor
y.java
---
mckoi1.0.3/src/com/mckoi/database/InternalFunctionFactory.ja
va Fri May 16 16:07:38 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/InternalFunctionFactor
y.java Wed Oct 11 00:23:43 2006
 -2135,7
+2135,7 
if (parameterCount() != 2) {
throw new RuntimeException(
- "i_sql_type function must
have two arguments.");
+ "i_view_data function
must have two arguments.");
}
}
diff -r -u
mckoi1.0.3/src/com/mckoi/database/NaturallyJoinedTable.java
mckoi1.0.3.sae/src/com/mckoi/database/NaturallyJoinedTable.j
ava
---
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.j
ava Tue Oct 10 23:24:17 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 -r -u mckoi1.0.3/src/com/mckoi/database/Operator.java
mckoi1.0.3.sae/src/com/mckoi/database/Operator.java
--- mckoi1.0.3/src/com/mckoi/database/Operator.java Tue Jul
6 20:24:26 2004
+++ mckoi1.0.3.sae/src/com/mckoi/database/Operator.java Wed
Oct 11 00:49:21 2006
 -273,7
+273,7 
* Same as above only it handles the type as a string.
*/
public Operator getSubQueryForm(String type_str) {
- String s = type_str.toUpperCase();
+ String s =
type_str.toUpperCase(java.util.Locale.ENGLISH);
if (s.equals("SINGLE") ||
s.equals("ANY") || s.equals("SOME")) {
return getSubQueryForm(ANY);
}
 -346,7
+346,7 
else if (op.equals(")")) { return par2_op; }
// Operators that are words, convert to lower case...
- op = op.toLowerCase();
+ op = op.toLowerCase(java.util.Locale.ENGLISH);
if (op.equals("is")) { return is_op; }
else if (op.equals("is not")) { return
isn_op; }
else if (op.equals("like")) { return like_op;
}
diff -r -u
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 Tue
Oct 10 23:24:17 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 
// 'Geoff33'
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 -r -u 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 Tue Oct
10 23:24:17 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 -r -u
mckoi1.0.3/src/com/mckoi/database/control/DefaultDBConfig.ja
va
mckoi1.0.3.sae/src/com/mckoi/database/control/DefaultDBConfi
g.java
---
mckoi1.0.3/src/com/mckoi/database/control/DefaultDBConfig.ja
va Tue Jul 23 00:31:36 2002
+++
mckoi1.0.3.sae/src/com/mckoi/database/control/DefaultDBConfi
g.java Tue Oct 10 23:24:17 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 -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/CreateTable.java
mckoi1.0.3.sae/src/com/mckoi/database/interpret/CreateTable.
java
---
mckoi1.0.3/src/com/mckoi/database/interpret/CreateTable.java
Tue Jul 22 01:53:06 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/CreateTable.
java Wed Oct 11 00:48:16 2006
 -137,8
+137,8 
// Currently we forbid referencing a table in another
schema
TableName ref_table =
TableName.resolve(constraint.reference_table_name);
- String update_rule =
constraint.getUpdateRule().toUpperCase();
- String delete_rule =
constraint.getDeleteRule().toUpperCase();
+ String update_rule =
constraint.getUpdateRule().toUpperCase(java.util.Locale.ENGL
ISH);
+ String delete_rule =
constraint.getDeleteRule().toUpperCase(java.util.Locale.ENGL
ISH);
if (table.getSchema().equals(ref_table.getSchema()))
{
manager.addForeignKeyConstraint(
table, constraint.getColumnList(),
diff -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/CreateTrigger.ja
va
mckoi1.0.3.sae/src/com/mckoi/database/interpret/CreateTrigge
r.java
---
mckoi1.0.3/src/com/mckoi/database/interpret/CreateTrigger.ja
va Tue Apr 8 02:31:06 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/CreateTrigge
r.java Wed Oct 11 00:48:27 2006
 -62,7
+62,7 
"Multiple triggered types not allowed
for callback triggers.");
}
- String trig_type = ((String)
types.get(0)).toUpperCase();
+ String trig_type = ((String)
types.get(0)).toUpperCase(java.util.Locale.ENGLISH);
int int_type;
if (trig_type.equals("INSERT")) {
int_type = TriggerEvent.INSERT;
diff -r -u
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
Tue Oct 10 23:24:17 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 -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/PrivManager.java
mckoi1.0.3.sae/src/com/mckoi/database/interpret/PrivManager.
java
---
mckoi1.0.3/src/com/mckoi/database/interpret/PrivManager.java
Tue Apr 8 02:26:20 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/PrivManager.
java Wed Oct 11 00:48:42 2006
 -102,7
+102,7 
// Is the user permitted to give out these privs?
Privileges grant_privs = Privileges.EMPTY_PRIVS;
for (int i = 0; i < priv_list.size(); ++i) {
- String priv = ((String)
priv_list.get(i)).toUpperCase();
+ String priv = ((String)
priv_list.get(i)).toUpperCase(java.util.Locale.ENGLISH);
int priv_bit;
if (priv.equals("ALL")) {
if (grant_object == GrantManager.TABLE) {
 -164,7
+164,7 
// Is the user permitted to give out these privs?
Privileges revoke_privs = Privileges.EMPTY_PRIVS;
for (int i = 0; i < priv_list.size(); ++i) {
- String priv = ((String)
priv_list.get(i)).toUpperCase();
+ String priv = ((String)
priv_list.get(i)).toUpperCase(java.util.Locale.ENGLISH);
int priv_bit;
if (priv.equals("ALL")) {
if (grant_object == GrantManager.TABLE) {
diff -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/Schema.java
mckoi1.0.3.sae/src/com/mckoi/database/interpret/Schema.java
---
mckoi1.0.3/src/com/mckoi/database/interpret/Schema.java Tue
Apr 8 02:26:20 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/Schema.java
Wed Oct 11 00:23:58 2006
 -58,7
+58,7 
DatabaseQueryContext context = new
DatabaseQueryContext(database);
- String com = type.toLowerCase();
+ String com =
type.toLowerCase(java.util.Locale.ENGLISH);
if (!database.getDatabase().canUserCreateAndDropSchema(
context,
user, schema_name)) {
diff -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/Set.java
mckoi1.0.3.sae/src/com/mckoi/database/interpret/Set.java
--- mckoi1.0.3/src/com/mckoi/database/interpret/Set.java Tue
Apr 8 02:26:54 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/Set.java Wed
Oct 11 00:24:12 2006
 -74,17
+74,17 
DatabaseQueryContext context = new
DatabaseQueryContext(database);
- String com = type.toLowerCase();
+ String com =
type.toLowerCase(java.util.Locale.ENGLISH);
if (com.equals("varset")) {
database.setVar(var_name, exp);
}
else if (com.equals("isolationset")) {
- value = value.toLowerCase();
+ value = value.toLowerCase(java.util.Locale.ENGLISH);
database.setTransactionIsolation(value);
}
else if (com.equals("autocommit")) {
- value = value.toLowerCase();
+ value = value.toLowerCase(java.util.Locale.ENGLISH);
if (value.equals("on") ||
value.equals("1")) {
database.setAutoCommit(true);
diff -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/Show.java
mckoi1.0.3.sae/src/com/mckoi/database/interpret/Show.java
---
mckoi1.0.3/src/com/mckoi/database/interpret/Show.java Wed
Apr 9 19:16:28 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/Show.java We
d Oct 11 00:24:19 2006
 -96,7
+96,7 
public void prepare() throws DatabaseException {
// Get the show variables from the query model
show_type = (String) cmd.getObject("show");
- show_type = show_type.toLowerCase();
+ show_type =
show_type.toLowerCase(java.util.Locale.ENGLISH);
table_name = (String)
cmd.getObject("table_name");
args = (Expression[]) cmd.getObject("args");
where_clause = (SearchExpression)
cmd.getObject("where_clause");
diff -r -u
mckoi1.0.3/src/com/mckoi/database/interpret/TableSelectExpre
ssion.java
mckoi1.0.3.sae/src/com/mckoi/database/interpret/TableSelectE
xpression.java
---
mckoi1.0.3/src/com/mckoi/database/interpret/TableSelectExpre
ssion.java Tue Aug 6 18:23:24 2002
+++
mckoi1.0.3.sae/src/com/mckoi/database/interpret/TableSelectE
xpression.java Wed Oct 11 00:24:26 2006
 -118,7
+118,7 
public void chainComposite(TableSelectExpression
expression,
String composite, boolean
is_all) {
this.next_composite = expression;
- composite = composite.toLowerCase();
+ composite =
composite.toLowerCase(java.util.Locale.ENGLISH);
if (composite.equals("union")) {
composite_function = CompositeTable.UNION;
}
diff -r -u
mckoi1.0.3/src/com/mckoi/database/jdbc/MDatabaseMetaData.jav
a
mckoi1.0.3.sae/src/com/mckoi/database/jdbc/MDatabaseMetaData
.java
---
mckoi1.0.3/src/com/mckoi/database/jdbc/MDatabaseMetaData.jav
a Fri Apr 25 02:43:06 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/jdbc/MDatabaseMetaData
.java Wed Oct 11 00:24:34 2006
 -153,7
+153,7 
// Depends if we are embedded or not,
// ISSUE: We need to keep an eye on this for future
enhancements to the
// Mckoi URL spec.
- if
(getURL().toLowerCase().startsWith(":jdbc:mckoi:local:/
/")) {
+ if
(getURL().toLowerCase(java.util.Locale.ENGLISH).startsWith(&
quot;:jdbc:mckoi:local://")) {
return true;
}
else {
diff -r -u
mckoi1.0.3/src/com/mckoi/database/jdbc/MDriver.java
mckoi1.0.3.sae/src/com/mckoi/database/jdbc/MDriver.java
--- mckoi1.0.3/src/com/mckoi/database/jdbc/MDriver.java Tue
Apr 8 02:36:40 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/jdbc/MDriver.java Wed
Oct 11 00:26:47 2006
 -155,7
+155,7 
String token = tok.nextToken().trim();
int split_point = token.indexOf("=");
if (split_point > 0) {
- String key = token.substring(0,
split_point).toLowerCase();
+ String key = token.substring(0,
split_point).toLowerCase(java.util.Locale.ENGLISH);
String value = token.substring(split_point + 1);
// Put the key/value pair in the 'info' object.
info.put(key, value);
 -289,7
+289,7 
// 'jdbc:mckoi:local:///my_db/db.conf/TOBY' will start
the database in the
// TOBY schema of the database denoted by the
configuration path
// '/my_db/db.conf'
- int schema_del_i =
config_path.toLowerCase().indexOf(".conf/");
+ int schema_del_i =
config_path.toLowerCase(java.util.Locale.ENGLISH).indexOf(&q
uot;.conf/");
if (schema_del_i > 0 &&
schema_del_i + 6 < config_path.length()) {
schema_name = config_path.substring(schema_del_i +
6);
 -303,7
+303,7 
}
// Is there already a local connection to this
database?
- String session_key = config_path.toLowerCase();
+ String session_key =
config_path.toLowerCase(java.util.Locale.ENGLISH);
LocalBootable local_bootable =
(LocalBootable)
local_session_map.get(session_key);
// No so create one and put it in the connection
mapping
diff -r -u
mckoi1.0.3/src/com/mckoi/database/jdbc/MResultSet.java
mckoi1.0.3.sae/src/com/mckoi/database/jdbc/MResultSet.java
---
mckoi1.0.3/src/com/mckoi/database/jdbc/MResultSet.java Tue
Jul 6 12:45:02 2004
+++
mckoi1.0.3.sae/src/com/mckoi/database/jdbc/MResultSet.java W
ed Oct 11 00:49:01 2006
 -515,7
+515,7 
boolean case_insensitive =
connection.isCaseInsensitiveIdentifiers();
if (case_insensitive) {
- name = name.toUpperCase();
+ name = name.toUpperCase(java.util.Locale.ENGLISH);
}
Integer index = (Integer) column_hash.get(name);
 -533,7
+533,7 
col_name = col_name.substring(2);
}
if (case_insensitive) {
- col_name = col_name.toUpperCase();
+ col_name =
col_name.toUpperCase(java.util.Locale.ENGLISH);
}
cols[i] = col_name;
}
diff -r -u
mckoi1.0.3/src/com/mckoi/database/jdbcserver/AbstractJDBCDat
abaseInterface.java
mckoi1.0.3.sae/src/com/mckoi/database/jdbcserver/AbstractJDB
CDatabaseInterface.java
---
mckoi1.0.3/src/com/mckoi/database/jdbcserver/AbstractJDBCDat
abaseInterface.java Tue Apr 8 02:36:06 2003
+++
mckoi1.0.3.sae/src/com/mckoi/database/jdbcserver/AbstractJDB
CDatabaseInterface.java Tue Oct 10 23:24:17 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 -r -u 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 Wed
Oct 11 00:22:25 2006
 -3920,7
+3920,7 
exp1 = DoExpression();
jj_consume_token(209);
exp_list = new Expression[3];
- String ttype = t2 == null ?
"both" : t2.image.toLowerCase();
+ String ttype = t2 == null ?
"both" :
t2.image.toLowerCase(java.util.Locale.ENGLISH);
Object str_char = t3 == null ?
TObject.stringVal(" ") :
Util.toParamObject(t3, case_insensitive_identifiers);
exp_list[0] = new
Expression(TObject.stringVal(ttype));
 -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++) {
diff -r -u mckoi1.0.3/src/com/mckoi/database/sql/Util.java
mckoi1.0.3.sae/src/com/mckoi/database/sql/Util.java
--- mckoi1.0.3/src/com/mckoi/database/sql/Util.java Mon May
5 03:18:14 2003
+++ mckoi1.0.3.sae/src/com/mckoi/database/sql/Util.java Wed
Oct 11 00:47:14 2006
 -114,7
+114,7 
// name = token.image;
// }
if (upper_identifiers) {
- name = name.toUpperCase();
+ name = name.toUpperCase(java.util.Locale.ENGLISH);
}
Variable v;
int div = name.lastIndexOf(".");
 -138,7
+138,7 
// as a variable.
String name = token.image;
if (upper_identifiers) {
- name = name.toUpperCase();
+ name = name.toUpperCase(java.util.Locale.ENGLISH);
}
return new Variable(token.image);
}
diff -r -u
mckoi1.0.3/src/com/mckoi/tools/JDBCScriptTool.java
mckoi1.0.3.sae/src/com/mckoi/tools/JDBCScriptTool.java
--- mckoi1.0.3/src/com/mckoi/tools/JDBCScriptTool.java Mon
May 19 21:46:36 2003
+++
mckoi1.0.3.sae/src/com/mckoi/tools/JDBCScriptTool.java Wed
Oct 11 00:24:59 2006
 -119,7
+119,7 
try {
// Check it's not an internal command.
String command =
- query.substring(0, query.length() -
1).trim().toLowerCase();
+ query.substring(0, query.length() -
1).trim().toLowerCase(java.util.Locale.ENGLISH);
if (command.startsWith("switch to connection
")) {
String connection_name = command.substring(21);
Connection c = (Connection)
connections.get(connection_name);
diff -r -u mckoi1.0.3/src/com/mckoi/util/GeneralParser.java
mckoi1.0.3.sae/src/com/mckoi/util/GeneralParser.java
--- mckoi1.0.3/src/com/mckoi/util/GeneralParser.java Tue Jul
23 00:31:36 2002
+++ mckoi1.0.3.sae/src/com/mckoi/util/GeneralParser.java Wed
Oct 11 00:25:07 2006
 -191,7
+191,7 
word_buffer.setLength(0);
parseWordString(i, word_buffer);
- String str = new String(word_buffer).toLowerCase();
+ String str = new
String(word_buffer).toLowerCase(java.util.Locale.ENGLISH);
if ((str.startsWith("week") ||
str.equals("w")) &&
!time_parsed[0]) {
------------------------------------------------------------
---
Mckoi SQL Database mailing list http://www.mckoi.com/d
atabase/
To unsubscribe, send a message to mckoidb-unsubscribe mckoi.com |