db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r543858 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/ suites/ tests/tools/
Date Sun, 03 Jun 2007 07:35:13 GMT
Author: myrnavl
Date: Sun Jun  3 00:35:12 2007
New Revision: 543858

URL: http://svn.apache.org/viewvc?view=rev&rev=543858
Log:
DERBY-2609 - add testing for show indexes in schemaname with client; add ToolScripts suite
for testing ij syntax through sql scripts.
Patch contributed by Jorgen Loland (sorry about the missing / through the O)

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_client.out
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_embed.out
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ToolScripts.java
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_client.sql
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_embed.sql
  (with props)
Removed:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7_app.properties
Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out?view=diff&rev=543858&r1=543857&r2=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/ij7.out
Sun Jun  3 00:35:12 2007
@@ -14,10 +14,11 @@
 --   See the License for the specific language governing permissions and
 --   limitations under the License.
 --
+
 -- This test will cover SHOW TABLES, SHOW SCHEMAS, etc.
 -- and the DESCRIBE command.
-connect 'jdbc:derby:wombat;create=true';
-ij> -- first, set schema to sys and demonstrate that we can see the system tables.
+
+-- first, set schema to sys and demonstrate that we can see the system tables.
 SET SCHEMA SYS;
 0 rows inserted/updated/deleted
 ij> SHOW TABLES;
@@ -42,7 +43,6 @@
 SYS                 |SYSTRIGGERS                   |                    
 SYS                 |SYSVIEWS                      |                    
 SYSIBM              |SYSDUMMY1                     |                    
-19 rows selected
 ij> SET SCHEMA APP;
 0 rows inserted/updated/deleted
 ij> CREATE TABLE t1 (i int generated always as identity, d DECIMAL(5,2), test VARCHAR(20));
@@ -88,12 +88,10 @@
 SYSIBM              |SYSDUMMY1                     |                    
 APP                 |T1                            |                    
 USER1               |T2                            |                    
-21 rows selected
 ij> SHOW TABLES IN APP;
 TABLE_SCHEM         |TABLE_NAME                    |REMARKS             
 ------------------------------------------------------------------------
 APP                 |T1                            |                    
-1 row selected
 ij> -- 'describe t1' will give error, as not in current schema
 DESCRIBE t1;
 IJ ERROR: No table exists with the name T1
@@ -103,14 +101,12 @@
 I                   |INTEGER  |0   |10  |10    |AUTOINCRE&|NULL      |NO      
 D                   |DECIMAL  |2   |10  |5     |NULL      |NULL      |YES     
 TEST                |VARCHAR  |NULL|NULL|20    |NULL      |40        |YES     
-3 rows selected
 ij> DESCRIBE v1;
 COLUMN_NAME         |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
 ------------------------------------------------------------------------------
 I                   |INTEGER  |0   |10  |10    |NULL      |NULL      |NO      
 D                   |DECIMAL  |2   |10  |5     |NULL      |NULL      |YES     
 TEST                |VARCHAR  |NULL|NULL|20    |NULL      |40        |YES     
-3 rows selected
 ij> SHOW SCHEMAS;
 TABLE_SCHEM                   
 ------------------------------
@@ -126,32 +122,18 @@
 SYSPROC                       
 SYSSTAT                       
 USER1                         
-12 rows selected
 ij> SHOW VIEWS IN USER1;
 TABLE_SCHEM         |TABLE_NAME                    |REMARKS             
 ------------------------------------------------------------------------
 USER1               |V1                            |                    
-1 row selected
 ij> SHOW PROCEDURES IN APP;
 PROCEDURE_SCHEM     |PROCEDURE_NAME                |REMARKS             
 ------------------------------------------------------------------------
 APP                 |PROCTEST                      |a.b.c.d.e           
-1 row selected
 ij> SHOW SYNONYMS IN USER1;
 TABLE_SCHEM         |TABLE_NAME                    |REMARKS             
 ------------------------------------------------------------------------
 USER1               |T3                            |                    
-1 row selected
-ij> SHOW INDEXES IN APP;
-TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
-----------------------------------------------------------------------------
-T1                  |TEST                |true  |3   |A   |NULL    |NULL    
-1 row selected
-ij> SHOW INDEXES FROM APP.t1;
-TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
-----------------------------------------------------------------------------
-T1                  |TEST                |true  |3   |A   |NULL    |NULL    
-1 row selected
 ij> -- DERBY-2019: ensure that tables with mixed-case names can be described:
 SET SCHEMA APP;
 0 rows inserted/updated/deleted
@@ -168,7 +150,6 @@
 ------------------------------------------------------------------------------
 C1                  |INTEGER  |0   |10  |10    |NULL      |NULL      |YES     
 C2                  |VARCHAR  |NULL|NULL|20    |NULL      |40        |YES     
-2 rows selected
 ij> -- should fail, as case is wrong:
 describe 'CAMELCaseTable';
 IJ ERROR: No table exists with the name CAMELCaseTable
@@ -178,7 +159,6 @@
 ------------------------------------------------------------------------------
 C1                  |INTEGER  |0   |10  |10    |NULL      |NULL      |YES     
 C2                  |VARCHAR  |NULL|NULL|20    |NULL      |40        |YES     
-2 rows selected
 ij> set SCHEMA USER1;
 0 rows inserted/updated/deleted
 ij> -- should work, even after changing default schema, so long as schema is right
@@ -187,7 +167,6 @@
 ------------------------------------------------------------------------------
 C1                  |INTEGER  |0   |10  |10    |NULL      |NULL      |YES     
 C2                  |VARCHAR  |NULL|NULL|20    |NULL      |40        |YES     
-2 rows selected
 ij> -- should fail, since table is in the other schema
 describe 'CamelCaseTable';
 IJ ERROR: No table exists with the name CamelCaseTable
@@ -199,7 +178,6 @@
 USER1               |V1                  |I                   |INTEGER  |0   |10  |10   
|NULL      |NULL      |NO      
 USER1               |V1                  |D                   |DECIMAL  |2   |10  |5    
|NULL      |NULL      |YES     
 USER1               |V1                  |TEST                |VARCHAR  |NULL|NULL|20   
|NULL      |40        |YES     
-4 rows selected
 ij> describe 'APP.*';
 TABLE_SCHEM         |TABLE_NAME          |COLUMN_NAME         |TYPE_NAME|DEC&|NUM&|COLUM&|COLUMN_DEF|CHAR_OCTE&|IS_NULL&
 ------------------------------------------------------------------------------------------------------------------------
@@ -208,7 +186,6 @@
 APP                 |T1                  |I                   |INTEGER  |0   |10  |10   
|AUTOINCRE&|NULL      |NO      
 APP                 |T1                  |D                   |DECIMAL  |2   |10  |5    
|NULL      |NULL      |YES     
 APP                 |T1                  |TEST                |VARCHAR  |NULL|NULL|20   
|NULL      |40        |YES     
-5 rows selected
 ij> -- Observe behavior with empty string:
 describe '';
 IJ ERROR: No table exists with the name (missing)

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_client.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_client.out?view=auto&rev=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_client.out
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_client.out
Sun Jun  3 00:35:12 2007
@@ -0,0 +1,45 @@
+ij> --
+--   Licensed to the Apache Software Foundation (ASF) under one or more
+--   contributor license agreements.  See the NOTICE file distributed with
+--   this work for additional information regarding copyright ownership.
+--   The ASF licenses this file to You under the Apache License, Version 2.0
+--   (the "License"); you may not use this file except in compliance with
+--   the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--   Unless required by applicable law or agreed to in writing, software
+--   distributed under the License is distributed on an "AS IS" BASIS,
+--   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--   See the License for the specific language governing permissions and
+--   limitations under the License.
+--
+-- This test will cover SHOW INDEXES. The test is duplicated in 
+-- showindex_embed because client driver currently (10.3) does not support 
+-- boolean. 
+--
+-- NOTE: If this test is modified, showindex_embed.sql should probably also 
+-- be modified.
+
+-- create some tables and indexes
+CREATE TABLE t1 (i int, d DECIMAL(5,2), test VARCHAR(20));
+0 rows inserted/updated/deleted
+ij> CREATE TABLE t2 (pk int primary key, v VARCHAR(20));
+0 rows inserted/updated/deleted
+ij> CREATE INDEX idx1 ON APP.t1 (test ASC);
+0 rows inserted/updated/deleted
+ij> CREATE INDEX idx2 ON APP.t2 (v);
+0 rows inserted/updated/deleted
+ij> -- show all the indexes in the schema 
+SHOW INDEXES IN APP;
+TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
+----------------------------------------------------------------------------
+T1                  |TEST                |1     |3   |A   |NULL    |NULL    
+T2                  |PK                  |0     |3   |A   |NULL    |NULL    
+T2                  |V                   |1     |3   |A   |NULL    |NULL    
+ij> -- show only indexes in table t1
+SHOW INDEXES FROM APP.t1;
+TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
+----------------------------------------------------------------------------
+T1                  |TEST                |1     |3   |A   |NULL    |NULL    
+ij> 
\ No newline at end of file

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_client.out
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_embed.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_embed.out?view=auto&rev=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_embed.out
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_embed.out
Sun Jun  3 00:35:12 2007
@@ -0,0 +1,45 @@
+ij> --
+--   Licensed to the Apache Software Foundation (ASF) under one or more
+--   contributor license agreements.  See the NOTICE file distributed with
+--   this work for additional information regarding copyright ownership.
+--   The ASF licenses this file to You under the Apache License, Version 2.0
+--   (the "License"); you may not use this file except in compliance with
+--   the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--   Unless required by applicable law or agreed to in writing, software
+--   distributed under the License is distributed on an "AS IS" BASIS,
+--   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--   See the License for the specific language governing permissions and
+--   limitations under the License.
+--
+-- This test will cover SHOW INDEXES. The test is duplicated in 
+-- showindex_client because client driver currently (Derby 10.2) does not 
+-- support boolean. 
+--
+-- NOTE: If this test is modified, showindex_client.sql should probably also 
+-- be modified.
+
+-- create some tables and indexes
+CREATE TABLE t1 (i int, d DECIMAL(5,2), test VARCHAR(20));
+0 rows inserted/updated/deleted
+ij> CREATE TABLE t2 (pk int primary key, v VARCHAR(20));
+0 rows inserted/updated/deleted
+ij> CREATE INDEX idx1 ON APP.t1 (test ASC);
+0 rows inserted/updated/deleted
+ij> CREATE INDEX idx2 ON APP.t2 (v);
+0 rows inserted/updated/deleted
+ij> -- show all the indexes in the schema 
+SHOW INDEXES IN APP;
+TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
+----------------------------------------------------------------------------
+T1                  |TEST                |true  |3   |A   |NULL    |NULL    
+T2                  |PK                  |false |3   |A   |NULL    |NULL    
+T2                  |V                   |true  |3   |A   |NULL    |NULL    
+ij> -- show only indexes in table t1
+SHOW INDEXES FROM APP.t1;
+TABLE_NAME          |COLUMN_NAME         |NON_U&|TYPE|ASC&|CARDINA&|PAGES   
+----------------------------------------------------------------------------
+T1                  |TEST                |true  |3   |A   |NULL    |NULL    
+ij> 
\ No newline at end of file

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/showindex_embed.out
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall?view=diff&rev=543858&r1=543857&r2=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/suites/derbytools.runall
Sun Jun  3 00:35:12 2007
@@ -7,6 +7,5 @@
 tools/ij4.sql
 tools/ij5.sql
 tools/ij6.sql
-tools/ij7.sql
 tools/ijConnName.sql
 tools/URLCheck.sql

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ToolScripts.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ToolScripts.java?view=auto&rev=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ToolScripts.java
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ToolScripts.java
Sun Jun  3 00:35:12 2007
@@ -0,0 +1,134 @@
+/*
+ *
+ * Derby - Class org.apache.derbyTesting.functionTests.tests.tools.ToolScripts
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, 
+ * software distributed under the License is distributed on an 
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 
+ * either express or implied. See the License for the specific 
+ * language governing permissions and limitations under the License.
+ */
+package org.apache.derbyTesting.functionTests.tests.tools;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.apache.derbyTesting.functionTests.util.ScriptTestCase;
+import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.TestConfiguration;
+
+/**
+ * ToolScripts runs ij tool scripts (.sql files) in the tool package
+ * and compares the output to a canon file in the
+ * standard master package.
+ * <BR>
+ * Its suite() method returns a set of tests where each test is an instance of
+ * this class for an individual script wrapped in a clean database decorator.
+ * <BR>
+ * It can also be used as a command line program to run one or more
+ * tool based ij scripts as tests.
+ *
+ */
+public final class ToolScripts extends ScriptTestCase {
+
+    /**
+     * Tool scripts (.sql files) that run under Derby's client
+     * and emebedded configurations. Tool tests are put in this category
+     * if they are likely to have some testing of the protocol,
+     * typically tests related to data types.
+     *
+     */
+    private static final String[] CLIENT_AND_EMBEDDED_TESTS = {
+        "ij7",
+    };
+
+    /**
+     * Tool scripts (.sql files) that only run in embedded.
+     */
+    private static final String[] EMBEDDED_TESTS = {
+        "showindex_embed",
+    };
+
+    /**
+     * Tool scripts (.sql files) that only run in client.
+     */
+    private static final String[] CLIENT_TESTS = {
+        "showindex_client",
+    };
+
+    /**
+     * Tests that run in embedded and require JDBC3_TESTS
+     * (ie. can not run on JSR169).
+     */
+    private static final String[] JDBC3_TESTS = {
+    };
+
+    /**
+     * Run a set of tool scripts (.sql files) passed in on the
+     * command line. Note the .sql suffix must not be provided as
+     * part of the script name.
+     * <code>
+     * example
+     * java org.apache.derbyTesting.functionTests.tests.tool.ToolScripts case union
+     * </code>
+     */
+    public static void main(String[] args)
+        {
+            junit.textui.TestRunner.run(getSuite(args));
+        }
+
+    /**
+     * Return the suite that runs all the tool scripts.
+     */
+    public static Test suite() {
+
+        TestSuite suite = new TestSuite("ToolScripts");
+        suite.addTest(getSuite(CLIENT_AND_EMBEDDED_TESTS));
+        suite.addTest(getSuite(EMBEDDED_TESTS));
+        if (JDBC.vmSupportsJDBC3())
+            suite.addTest(getSuite(JDBC3_TESTS));
+
+        // Set up the scripts run with the network client
+        TestSuite clientTests = new TestSuite("ToolScripts:client");
+        clientTests.addTest(getSuite(CLIENT_AND_EMBEDDED_TESTS));
+        clientTests.addTest(getSuite(CLIENT_TESTS));
+        Test client = TestConfiguration.clientServerDecorator(clientTests);
+
+        // add those client tests into the top-level suite.
+        suite.addTest(client);
+
+        return suite;
+    }
+
+    /*
+     * A single JUnit test that runs a single tool script.
+     */
+    private ToolScripts(String toolTest){
+        super(toolTest);
+    }
+
+    /**
+     * Return a suite of tool tests from the list of
+     * script names. Each test is surrounded in a decorator
+     * that cleans the database.
+     */
+    private static Test getSuite(String[] list) {
+        TestSuite suite = new TestSuite("Tool scripts");
+        for (int i = 0; i < list.length; i++)
+            suite.addTest(
+                new CleanDatabaseTestSetup(
+                    new ToolScripts(list[i])));
+
+        return getIJConfig(suite);
+    }
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ToolScripts.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java?view=diff&rev=543858&r1=543857&r2=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/_Suite.java
Sun Jun  3 00:35:12 2007
@@ -50,6 +50,7 @@
         suite.addTest(ImportExportBinaryDataTest.suite());
         suite.addTest(ImportExportLobTest.suite());
         suite.addTest(ImportExportProcedureTest.suite());
+        suite.addTest(ToolScripts.suite());
 
         // SysinfoAPITest currently fails when run against jars, so is
         // disabled. Only the first jar file on the classpath properly

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql?view=diff&rev=543858&r1=543857&r2=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ij7.sql
Sun Jun  3 00:35:12 2007
@@ -18,8 +18,6 @@
 -- This test will cover SHOW TABLES, SHOW SCHEMAS, etc.
 -- and the DESCRIBE command.
 
-connect 'jdbc:derby:wombat;create=true';
-
 -- first, set schema to sys and demonstrate that we can see the system tables.
 SET SCHEMA SYS;
 SHOW TABLES;
@@ -51,8 +49,6 @@
 SHOW VIEWS IN USER1;
 SHOW PROCEDURES IN APP;
 SHOW SYNONYMS IN USER1;
-SHOW INDEXES IN APP;
-SHOW INDEXES FROM APP.t1;
 
 -- DERBY-2019: ensure that tables with mixed-case names can be described:
 SET SCHEMA APP;

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_client.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_client.sql?view=auto&rev=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_client.sql
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_client.sql
Sun Jun  3 00:35:12 2007
@@ -0,0 +1,33 @@
+--
+--   Licensed to the Apache Software Foundation (ASF) under one or more
+--   contributor license agreements.  See the NOTICE file distributed with
+--   this work for additional information regarding copyright ownership.
+--   The ASF licenses this file to You under the Apache License, Version 2.0
+--   (the "License"); you may not use this file except in compliance with
+--   the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--   Unless required by applicable law or agreed to in writing, software
+--   distributed under the License is distributed on an "AS IS" BASIS,
+--   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--   See the License for the specific language governing permissions and
+--   limitations under the License.
+--
+-- This test will cover SHOW INDEXES. The test is duplicated in 
+-- showindex_embed because client driver currently (10.3) does not support 
+-- boolean. 
+--
+-- NOTE: If this test is modified, showindex_embed.sql should probably also 
+-- be modified.
+
+-- create some tables and indexes
+CREATE TABLE t1 (i int, d DECIMAL(5,2), test VARCHAR(20));
+CREATE TABLE t2 (pk int primary key, v VARCHAR(20));
+CREATE INDEX idx1 ON APP.t1 (test ASC);
+CREATE INDEX idx2 ON APP.t2 (v);
+
+-- show all the indexes in the schema 
+SHOW INDEXES IN APP;
+-- show only indexes in table t1
+SHOW INDEXES FROM APP.t1;

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_client.sql
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_embed.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_embed.sql?view=auto&rev=543858
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_embed.sql
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_embed.sql
Sun Jun  3 00:35:12 2007
@@ -0,0 +1,33 @@
+--
+--   Licensed to the Apache Software Foundation (ASF) under one or more
+--   contributor license agreements.  See the NOTICE file distributed with
+--   this work for additional information regarding copyright ownership.
+--   The ASF licenses this file to You under the Apache License, Version 2.0
+--   (the "License"); you may not use this file except in compliance with
+--   the License.  You may obtain a copy of the License at
+--
+--      http://www.apache.org/licenses/LICENSE-2.0
+--
+--   Unless required by applicable law or agreed to in writing, software
+--   distributed under the License is distributed on an "AS IS" BASIS,
+--   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+--   See the License for the specific language governing permissions and
+--   limitations under the License.
+--
+-- This test will cover SHOW INDEXES. The test is duplicated in 
+-- showindex_client because client driver currently (Derby 10.2) does not 
+-- support boolean. 
+--
+-- NOTE: If this test is modified, showindex_client.sql should probably also 
+-- be modified.
+
+-- create some tables and indexes
+CREATE TABLE t1 (i int, d DECIMAL(5,2), test VARCHAR(20));
+CREATE TABLE t2 (pk int primary key, v VARCHAR(20));
+CREATE INDEX idx1 ON APP.t1 (test ASC);
+CREATE INDEX idx2 ON APP.t2 (v);
+
+-- show all the indexes in the schema 
+SHOW INDEXES IN APP;
+-- show only indexes in table t1
+SHOW INDEXES FROM APP.t1;

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/showindex_embed.sql
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message