View | Details | Raw Unified | Return to issue 121754
Collapse All | Expand All

(-)misc/hsqldb/build/build.xml (-6 / +8 lines)
Lines 1-6 Link Here
1
<?xml version="1.0"?>
1
<?xml version="1.0"?>
2
<!-- author fredt@users.sourceforge.net 2001 - 2008 -->
2
<!-- author fredt@users.sourceforge.net 2001 - 2009 -->
3
<!-- additional targets by unsaved@users.sourceforge.net 2004 - 2008 -->
3
<!-- additional targets by unsaved@users.sourceforge.net 2004 - 2009 -->
4
<project name="hsqldb" default="help" basedir="../">
4
<project name="hsqldb" default="help" basedir="../">
5
   <!-- This loads properties in the same exact way as if you ran
5
   <!-- This loads properties in the same exact way as if you ran
Lines 14-23 Link Here
14
        Do not address questions about property file(s) to the
14
        Do not address questions about property file(s) to the
15
        hsqldb community. -->
15
        hsqldb community. -->
16
   <property file='build/build.properties'/>
16
   <property file='build/build.properties'/>
17
   <property name="hsqldb.version" value="1.8.0.10"/>
17
   <property name="hsqldb.version" value="1.8.0.11"/>
18
   <tstamp>
18
   <tstamp>
19
       <format property="_tmpstamp" pattern="yyyy/MM/dd-hh:mm:ss"
19
       <format property="_tmpstamp" pattern="yyyy/MM/dd-HH:mm:ss"
20
               locale="en"/>
20
               locale="en"/>
21
   </tstamp>
21
   </tstamp>
Lines 26-32 Link Here
26
   <property name="hsqldb.title" value="HSQLDB"/>
26
   <property name="hsqldb.title" value="HSQLDB"/>
27
   <property name="hsqldb.vendor" value="The HSQLDB Development Group"/>
27
   <property name="hsqldb.vendor" value="The HSQLDB Development Group"/>
28
   <property name="src" value="${basedir}/src"/>
28
   <property name="src" value="${basedir}/src"/>
29
   <property name="build.debug" value="off"/>
29
   <property name="build.debug" value="false"/>
30
   <target name="init">
30
   <target name="init">
31
   </target>
31
   </target>
Lines 213-222 Link Here
213
       </java>
213
       </java>
214
    </target>
214
    </target>
215
    <target name="switchtojdk14" depends="switches"
215
    <target name="switchtojdk14" depends="switchtojdk13"
216
            description="self explanatory" if="ant.java.iscjava14">
216
            description="self explanatory" if="ant.java.iscjava14">
217
      <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
217
      <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
218
        <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
218
        <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
219
        <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
219
        <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
220
        <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
220
        <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
221
        <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
221
        <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
222
        <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
Lines 251-256 Link Here
251
    <target name="switchtojdk16" depends="switchtojdk14"
252
    <target name="switchtojdk16" depends="switchtojdk14"
252
            description="self explanatory" if="ant.java.iscjava16">
253
            description="self explanatory" if="ant.java.iscjava16">
253
      <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
254
      <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
255
        <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
254
        <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
256
        <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
255
        <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
257
        <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
256
        <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
258
        <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
(-)misc/hsqldb/src/org/hsqldb/Expression.java (-1 / +19 lines)
Lines 807-812 Link Here
807
807
808
            case COUNT :
808
            case COUNT :
809
                buf.append(' ').append(Token.T_COUNT).append('(');
809
                buf.append(' ').append(Token.T_COUNT).append('(');
810
811
                if ("(*)".equals(left)) {
812
                    buf.append('*');
813
                } else {
814
                    buf.append(left);
815
                }
816
817
                buf.append(')');
810
                break;
818
                break;
811
819
812
            case SUM :
820
            case SUM :
Lines 858-868 Link Here
858
                buf.append(' ').append(Token.T_VAR_SAMP).append('(');
866
                buf.append(' ').append(Token.T_VAR_SAMP).append('(');
859
                buf.append(left).append(')');
867
                buf.append(left).append(')');
860
                break;
868
                break;
861
        }
862
869
870
            default :
863
        throw Trace.error(Trace.EXPRESSION_NOT_SUPPORTED);
871
        throw Trace.error(Trace.EXPRESSION_NOT_SUPPORTED);
864
    }
872
    }
865
873
874
        // changes used in OpenOffice 3.4 have been incorporated
875
        return buf.toString();
876
    }
877
866
    private String describe(Session session, int blanks) {
878
    private String describe(Session session, int blanks) {
867
879
868
        int          lIType;
880
        int          lIType;
Lines 1523-1528 Link Here
1523
            return columnName;
1535
            return columnName;
1524
        }
1536
        }
1525
1537
1538
        if (isAggregate(exprType)) {
1539
            try {
1540
                return getDDL();
1541
            } catch (Exception e) {}
1542
        }
1543
1526
        return "";
1544
        return "";
1527
    }
1545
    }
1528
1546
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcCallableStatement.java (-1 / +20 lines)
Lines 3376-3382 Link Here
3376
    {
3376
    {
3377
        throw new UnsupportedOperationException("Not supported yet.");
3377
        throw new UnsupportedOperationException("Not supported yet.");
3378
    }
3378
    }
3379
*/
3380
3379
3380
    public <T>T getObject(int parameterIndex,
3381
                          Class<T> type) throws SQLException {
3382
        return (T) this.getObject(parameterIndex);
3383
    }
3384
3385
    public <T>T getObject(String parameterName,
3386
                          Class<T> type) throws SQLException {
3387
        return getObject(this.findParameterIndex(parameterName), type);
3388
    }
3389
3390
    public void closeOnCompletion() throws SQLException {
3391
        throw new UnsupportedOperationException("Not supported yet.");
3392
    }
3393
    
3394
    public boolean isCloseOnCompletion() throws SQLException {
3395
        throw new UnsupportedOperationException("Not supported yet.");
3396
    }
3397
    
3398
*/
3381
//#endif JAVA6
3399
//#endif JAVA6
3400
3382
}
3401
}
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java (+30 lines)
Lines 2794-2799 Link Here
2794
    {
2794
    {
2795
        throw new UnsupportedOperationException("Not supported yet.");
2795
        throw new UnsupportedOperationException("Not supported yet.");
2796
    }
2796
    }
2797
2798
    public int getNetworkTimeout() throws SQLException {
2799
        return 0;
2800
    }
2801
2802
    public void setNetworkTimeout(java.util.concurrent.Executor executor,
2803
                                  int milliseconds) throws SQLException {
2804
2805
        checkClosed();
2806
2807
        throw Util.notSupported();
2808
    }
2809
2810
    public void setSchema(String schema) throws SQLException {
2811
        checkClosed();
2812
2813
        throw Util.notSupported();
2814
    }
2815
2816
    public String getSchema() throws SQLException {
2817
        checkClosed();
2818
2819
        throw Util.notSupported();
2820
    }
2821
    public void abort(
2822
            java.util.concurrent.Executor executor) throws SQLException {
2823
        checkClosed();
2824
2825
        throw Util.notSupported();
2826
    }
2797
*/
2827
*/
2798
2828
2799
//#endif JAVA6
2829
//#endif JAVA6
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java (-1 / +11 lines)
Lines 5694-5700 Link Here
5694
    {
5694
    {
5695
        throw new UnsupportedOperationException("Not supported yet.");
5695
        throw new UnsupportedOperationException("Not supported yet.");
5696
    }
5696
    }
5697
*/
5698
5697
5698
    public ResultSet getPseudoColumns(
5699
            String catalog, String schemaPattern, String tableNamePattern,
5700
            String columnNamePattern) throws SQLException {
5701
        throw Util.notSupported();
5702
    }
5703
5704
    public boolean generatedKeyAlwaysReturned() throws SQLException {
5705
        return true;
5706
    }
5707
5708
*/
5699
//#endif JAVA6
5709
//#endif JAVA6
5700
}
5710
}
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java (+5 lines)
Lines 322-327 Link Here
322
    {
322
    {
323
        throw new UnsupportedOperationException("Not supported yet.");
323
        throw new UnsupportedOperationException("Not supported yet.");
324
    }
324
    }
325
    
326
    public java.util.logging.Logger getParentLogger()
327
    throws java.sql.SQLFeatureNotSupportedException {
328
        throw (java.sql.SQLFeatureNotSupportedException) Util.notSupported();
329
    }
325
*/
330
*/
326
331
327
//#endif JAVA6
332
//#endif JAVA6
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcPreparedStatement.java (+9 lines)
Lines 2403-2408 Link Here
2403
    {
2403
    {
2404
        throw new UnsupportedOperationException("Not supported yet.");
2404
        throw new UnsupportedOperationException("Not supported yet.");
2405
    }
2405
    }
2406
2407
    public void closeOnCompletion() throws SQLException {
2408
        checkClosed();
2409
    }
2410
2411
    public boolean isCloseOnCompletion() throws SQLException {
2412
        checkClosed();
2413
        return false;
2414
    }
2406
*/
2415
*/
2407
2416
2408
//#endif JAVA6
2417
//#endif JAVA6
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java (-1 / +10 lines)
Lines 5325-5331 Link Here
5325
    {
5325
    {
5326
        throw new UnsupportedOperationException("Not supported yet.");
5326
        throw new UnsupportedOperationException("Not supported yet.");
5327
    }
5327
    }
5328
*/
5329
5328
5329
    public <T>T getObject(int columnIndex, Class<T> type) throws SQLException {
5330
        return (T) getObject(columnIndex);
5331
    }
5332
5333
    public <T>T getObject(String columnLabel,
5334
                          Class<T> type) throws SQLException {
5335
        return getObject(findColumn(columnLabel), type);
5336
    }
5337
    
5338
*/
5330
//#endif JAVA6
5339
//#endif JAVA6
5331
}
5340
}
(-)misc/hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java (+10 lines)
Lines 1608-1613 Link Here
1608
    {
1608
    {
1609
        throw new UnsupportedOperationException("Not supported yet.");
1609
        throw new UnsupportedOperationException("Not supported yet.");
1610
    }
1610
    }
1611
    
1612
    public void closeOnCompletion() throws SQLException {
1613
        checkClosed();
1614
    }
1615
1616
    public boolean isCloseOnCompletion() throws SQLException {
1617
        checkClosed();
1618
        return false;
1619
    }
1620
    
1611
*/
1621
*/
1612
//#endif JAVA6
1622
//#endif JAVA6
1613
}
1623
}
(-)misc/hsqldb/src/org/hsqldb/jdbcDriver.java (+12 lines)
Lines 321-324 Link Here
321
            DriverManager.registerDriver(new jdbcDriver());
321
            DriverManager.registerDriver(new jdbcDriver());
322
        } catch (Exception e) {}
322
        } catch (Exception e) {}
323
    }
323
    }
324
325
//#ifdef JAVA6
326
/*
327
    public java.util.logging
328
            .Logger getParentLogger() throws java.sql
329
                .SQLFeatureNotSupportedException {
330
        throw new UnsupportedOperationException("Not supported yet.");
331
    }
332
*/
333
334
//#endif
335
324
}
336
}
(-)misc/hsqldb/src/org/hsqldb/lib/StringComparator.java (+53 lines)
Line 0 Link Here
1
/* Copyright (c) 2001-2008, The HSQL Development Group
2
 * All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are met:
6
 *
7
 * Redistributions of source code must retain the above copyright notice, this
8
 * list of conditions and the following disclaimer.
9
 *
10
 * Redistributions in binary form must reproduce the above copyright notice,
11
 * this list of conditions and the following disclaimer in the documentation
12
 * and/or other materials provided with the distribution.
13
 *
14
 * Neither the name of the HSQL Development Group nor the names of its
15
 * contributors may be used to endorse or promote products derived from this
16
 * software without specific prior written permission.
17
 *
18
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
 * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
22
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
26
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
 */
30
31
32
package org.hsqldb.lib;
33
34
public class StringComparator implements ObjectComparator {
35
36
    public int compare(Object a, Object b) {
37
38
        // handle nulls
39
        if (a == b) {
40
            return 0;
41
        }
42
43
        if (a == null) {
44
            return -1;
45
        }
46
47
        if (b == null) {
48
            return 1;
49
        }
50
51
        return ((String) a).compareTo((String) b);
52
    }
53
}
(-)misc/hsqldb/src/org/hsqldb/Library.java (-1 / +1 lines)
Lines 1957-1963 Link Here
1957
        functionMap.put("bitand", bitand);
1957
        functionMap.put("bitand", bitand);
1958
        functionMap.put("bitlength", bitLength);
1958
        functionMap.put("bitlength", bitLength);
1959
        functionMap.put("bitor", bitor);
1959
        functionMap.put("bitor", bitor);
1960
        functionMap.put("bitxor", bitor);
1960
        functionMap.put("bitxor", bitxor);
1961
        functionMap.put("character", character);
1961
        functionMap.put("character", character);
1962
        functionMap.put("concat", concat);
1962
        functionMap.put("concat", concat);
1963
        functionMap.put("cot", cot);
1963
        functionMap.put("cot", cot);
(-)misc/hsqldb/src/org/hsqldb/persist/HsqlDatabaseProperties.java (+1 lines)
Lines 429-434 Link Here
429
            setProperty(hsqldb_log_size, 10);
429
            setProperty(hsqldb_log_size, 10);
430
            setProperty(sql_enforce_strict_size, true);
430
            setProperty(sql_enforce_strict_size, true);
431
            setProperty(hsqldb_nio_data_file, false);
431
            setProperty(hsqldb_nio_data_file, false);
432
            setProperty(hsqldb_lock_file, true);
432
        }
433
        }
433
434
434
        // OOo end
435
        // OOo end
(-)misc/hsqldb/src/org/hsqldb/Select.java (-1 / +3 lines)
Lines 33-39 Link Here
33
 *
33
 *
34
 * For work added by the HSQL Development Group:
34
 * For work added by the HSQL Development Group:
35
 *
35
 *
36
 * Copyright (c) 2001-2008, The HSQL Development Group
36
 * Copyright (c) 2001-2005, The HSQL Development Group
37
 * All rights reserved.
37
 * All rights reserved.
38
 *
38
 *
39
 * Redistribution and use in source and binary forms, with or without
39
 * Redistribution and use in source and binary forms, with or without
Lines 1255-1260 Link Here
1255
        for (int i = 0; i < iResultLen; i++) {
1255
        for (int i = 0; i < iResultLen; i++) {
1256
            e                    = exprColumns[i];
1256
            e                    = exprColumns[i];
1257
            rmd.colTypes[i]      = e.getDataType();
1257
            rmd.colTypes[i]      = e.getDataType();
1258
            rmd.classNames[i]    = e.getValueClassName();
1258
            rmd.colSizes[i]      = e.getColumnSize();
1259
            rmd.colSizes[i]      = e.getColumnSize();
1259
            rmd.colScales[i]     = e.getColumnScale();
1260
            rmd.colScales[i]     = e.getColumnScale();
1260
            rmd.colLabels[i]     = e.getAlias();
1261
            rmd.colLabels[i]     = e.getAlias();
Lines 1263-1268 Link Here
1263
            rmd.colNames[i]      = e.getColumnName();
1264
            rmd.colNames[i]      = e.getColumnName();
1264
1265
1265
            if (rmd.isTableColumn(i)) {
1266
            if (rmd.isTableColumn(i)) {
1267
                rmd.schemaNames[i]   = e.getTableSchemaName();
1266
                rmd.colNullable[i] = e.nullability;
1268
                rmd.colNullable[i] = e.nullability;
1267
                rmd.isIdentity[i]  = e.isIdentity;
1269
                rmd.isIdentity[i]  = e.isIdentity;
1268
                rmd.isWritable[i]  = e.isWritable;
1270
                rmd.isWritable[i]  = e.isWritable;
(-)misc/hsqldb/src/org/hsqldb/Table.java (-2 / +2 lines)
Lines 149-158 Link Here
149
    Constraint[]      constraintList;                 // constrainst for the table
149
    Constraint[]      constraintList;                 // constrainst for the table
150
    HsqlArrayList[]   triggerLists;                   // array of trigger lists
150
    HsqlArrayList[]   triggerLists;                   // array of trigger lists
151
    private int[]     colTypes;                       // fredt - types of columns
151
    private int[]     colTypes;                       // fredt - types of columns
152
    private int[]     colSizes;                       // fredt - copy of SIZE values for columns
152
    int[]             colSizes;                       // fredt - copy of SIZE values for columns
153
    private int[]     colScales;                      // fredt - copy of SCALE values for columns
153
    private int[]     colScales;                      // fredt - copy of SCALE values for columns
154
    private boolean[] colNullable;                    // fredt - modified copy of isNullable() values
154
    private boolean[] colNullable;                    // fredt - modified copy of isNullable() values
155
    private Expression[] colDefaults;                 // fredt - expressions of DEFAULT values
155
    Expression[]      colDefaults;                    // fredt - expressions of DEFAULT values
156
    private int[]        defaultColumnMap;            // fred - holding 0,1,2,3,...
156
    private int[]        defaultColumnMap;            // fred - holding 0,1,2,3,...
157
    private boolean      hasDefaultValues;            //fredt - shortcut for above
157
    private boolean      hasDefaultValues;            //fredt - shortcut for above
158
    boolean              sqlEnforceSize;              // inherited from the database -
158
    boolean              sqlEnforceSize;              // inherited from the database -
(-)misc/hsqldb/src/org/hsqldb/TableWorks.java (-1 / +4 lines)
Lines 670-676 Link Here
670
            // default expressions can change
670
            // default expressions can change
671
            oldCol.setType(newCol);
671
            oldCol.setType(newCol);
672
            oldCol.setDefaultExpression(newCol.getDefaultExpression());
672
            oldCol.setDefaultExpression(newCol.getDefaultExpression());
673
            table.setColumnTypeVars(colIndex);
673
674
            table.colSizes[colIndex]    = oldCol.getSize();
675
            table.colDefaults[colIndex] = oldCol.getDefaultExpression();
676
674
            table.resetDefaultsFlag();
677
            table.resetDefaultsFlag();
675
678
676
            return;
679
            return;

Return to issue 121754