Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hsqldb.test
Class TestCascade  view TestCascade download TestCascade.java

java.lang.Object
  extended byorg.hsqldb.test.TestCascade

public class TestCascade
extends java.lang.Object

Test case to demonstrate catastrophic bug in cascade delete code.

Version:
1.0

Constructor Summary
TestCascade()
           
 
Method Summary
private static void createDatabase()
           
private static void deleteXBRecord(java.sql.Connection con)
          This method demonstrates the bug in cascading deletes.
private static void insertData(java.sql.Connection con)
           
static void main(java.lang.String[] args)
           
private static void printNumberOfCARecords(java.sql.Connection con)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestCascade

public TestCascade()
Method Detail

main

public static void main(java.lang.String[] args)

createDatabase

private static void createDatabase()
                            throws java.sql.SQLException

deleteXBRecord

private static void deleteXBRecord(java.sql.Connection con)
                            throws java.sql.SQLException
This method demonstrates the bug in cascading deletes. Before this method, the CA table has 12 records. After, it should have 9, but instead it has 0.


insertData

private static void insertData(java.sql.Connection con)
                        throws java.sql.SQLException

printNumberOfCARecords

private static void printNumberOfCARecords(java.sql.Connection con)
                                    throws java.sql.SQLException