db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r419926 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/store/raw/data/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/store/
Date Fri, 07 Jul 2006 17:08:33 GMT
Author: mikem
Date: Fri Jul  7 10:08:33 2006
New Revision: 419926

URL: http://svn.apache.org/viewvc?rev=419926&view=rev
Log:
Adding a test to help debug DERBY-1248.  OnlineBackupTest5.sql is just 
a slight variation of OnlineBackupTest4.sql.  It does the same work but
restores the backup to a new place in extinout, rather than on top of
the original case.  Hopefully if this test reproduces DERBY-1248 the info
in the old db will help understand what is going on.  Also changed the 
assert to dump the full page.


Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/OnlineBackupTest5.out
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5.sql
  (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5_app.properties
  (with props)
Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BasePage.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BasePage.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BasePage.java?rev=419926&r1=419925&r2=419926&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BasePage.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/store/raw/data/BasePage.java Fri
Jul  7 10:08:33 2006
@@ -2251,7 +2251,8 @@
             {
 				SanityManager.THROWASSERT(
                     "shiftUp failed, low must be between 0 and recordCount." + 
-                    "  low = " + low + ", recordCount = " + recordCount);
+                    "  low = " + low + ", recordCount = " + recordCount +
+                    "\n page = " + this);
             }
 		}
 

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/OnlineBackupTest5.out
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/OnlineBackupTest5.out?rev=419926&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/OnlineBackupTest5.out
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/OnlineBackupTest5.out
Fri Jul  7 10:08:33 2006
@@ -0,0 +1,80 @@
+ij> -- This script tests online backup functionality and restore. 
+connect 'wombat' as c1 ;
+ij(C1)> connect 'wombat' as c2;
+ij(C2)> set connection c1;
+ij(C1)> autocommit off;
+ij(C1)> -- check backup/restore work with in place compress operation. 
+create table ctest(id int primary key, name char(200)) ;
+0 rows inserted/updated/deleted
+ij(C1)> insert into ctest values(1, 'derby backup/compress test') ;
+1 row inserted/updated/deleted
+ij(C1)> insert into ctest values(2, 'derby backup/compress test') ;
+1 row inserted/updated/deleted
+ij(C1)> insert into ctest select id+2, name from ctest;
+2 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+4, name from ctest;
+4 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+8, name from ctest;
+8 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+16, name from ctest;
+16 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+32, name from ctest;
+32 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+64, name from ctest;
+64 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+128, name from ctest;
+128 rows inserted/updated/deleted
+ij(C1)> insert into ctest select id+256, name from ctest;
+256 rows inserted/updated/deleted
+ij(C1)> commit ;
+ij(C1)> delete from ctest where id > 2 and id < 509 and id != 300;
+505 rows inserted/updated/deleted
+ij(C1)> select * from ctest;
+ID         |NAME                                                                        
                                                   
+--------------------------------------------------------------------------------------------------------------------------------------------
+1          |derby backup/compress test                                                  
                                                  &
+2          |derby backup/compress test                                                  
                                                  &
+300        |derby backup/compress test                                                  
                                                  &
+509        |derby backup/compress test                                                  
                                                  &
+510        |derby backup/compress test                                                  
                                                  &
+511        |derby backup/compress test                                                  
                                                  &
+512        |derby backup/compress test                                                  
                                                  &
+ij(C1)> commit;
+ij(C1)> --start backup in a seperare thread.
+set connection c2;
+ij(C2)> async bthread 
+   'call SYSCS_UTIL.SYSCS_BACKUP_DATABASE(''extinout/mybackup'')';
+ij(C2)> -- start compress in seperate thread. 
+set connection c1;
+ij(C1)> async cthread 
+ 'call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE(''APP'' , 
+                                         ''CTEST'' , 1, 1, 1)';
+ij(C1)> set connection c2;
+ij(C2)> -- wait for backup thread to finish the work.
+wait for bthread;
+0 rows inserted/updated/deleted
+ij(C2)> commit;
+ij(C2)> disconnect;
+ij> set connection c1;
+ij(C1)> -- wait for compress thread to finish the work.
+wait for cthread;
+0 rows inserted/updated/deleted
+ij(C1)> commit;
+ij(C1)> disconnect;
+ij> --shutdown the database
+connect 'wombat;shutdown=true';
+ERROR 08006: Database 'wombat' shutdown.
+ij> connect 'extinout/wombat;restoreFrom=extinout/mybackup/wombat';
+ij(CONNECTION1)> select * from ctest;
+ID         |NAME                                                                        
                                                   
+--------------------------------------------------------------------------------------------------------------------------------------------
+1          |derby backup/compress test                                                  
                                                  &
+2          |derby backup/compress test                                                  
                                                  &
+300        |derby backup/compress test                                                  
                                                  &
+509        |derby backup/compress test                                                  
                                                  &
+510        |derby backup/compress test                                                  
                                                  &
+511        |derby backup/compress test                                                  
                                                  &
+512        |derby backup/compress test                                                  
                                                  &
+ij(CONNECTION1)> insert into ctest values(2000, 'restore was successfil') ;
+1 row inserted/updated/deleted
+ij(CONNECTION1)> 

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

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5.sql
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5.sql?rev=419926&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5.sql
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5.sql
Fri Jul  7 10:08:33 2006
@@ -0,0 +1,54 @@
+-- This script tests online backup functionality and restore. 
+connect 'wombat' as c1 ;
+connect 'wombat' as c2;
+
+set connection c1;
+autocommit off;
+-- check backup/restore work with in place compress operation. 
+create table ctest(id int primary key, name char(200)) ;
+insert into ctest values(1, 'derby backup/compress test') ;
+insert into ctest values(2, 'derby backup/compress test') ;
+insert into ctest select id+2, name from ctest;
+insert into ctest select id+4, name from ctest;
+insert into ctest select id+8, name from ctest;
+insert into ctest select id+16, name from ctest;
+insert into ctest select id+32, name from ctest;
+insert into ctest select id+64, name from ctest;
+insert into ctest select id+128, name from ctest;
+insert into ctest select id+256, name from ctest;
+
+commit ;
+delete from ctest where id > 2 and id < 509 and id != 300;
+select * from ctest;
+commit;
+
+--start backup in a seperare thread.
+set connection c2;
+async bthread 
+   'call SYSCS_UTIL.SYSCS_BACKUP_DATABASE(''extinout/mybackup'')';
+
+-- start compress in seperate thread. 
+set connection c1;
+async cthread 
+ 'call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE(''APP'' , 
+                                         ''CTEST'' , 1, 1, 1)';
+set connection c2;
+-- wait for backup thread to finish the work.
+wait for bthread;
+commit;
+disconnect;
+
+set connection c1;
+-- wait for compress thread to finish the work.
+wait for cthread;
+commit;
+disconnect;
+
+--shutdown the database
+connect 'wombat;shutdown=true';
+
+connect 'extinout/wombat;restoreFrom=extinout/mybackup/wombat';
+select * from ctest;
+insert into ctest values(2000, 'restore was successfil') ;
+
+

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

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5_app.properties
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5_app.properties?rev=419926&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5_app.properties
(added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OnlineBackupTest5_app.properties
Fri Jul  7 10:08:33 2006
@@ -0,0 +1,2 @@
+usedefaults=true
+useextdirs=true

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant?rev=419926&r1=419925&r2=419926&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/copyfiles.ant
Fri Jul  7 10:08:33 2006
@@ -145,12 +145,14 @@
 MaxLogNumber_derby.properties
 MaxLogNumberRecovery_app.properties
 MaxLogNumberRecovery_derby.properties
+obtest_customer.jar
 OnlineBackupTest1_app.properties
 onlineBackupTest2.sql
 onlineBackupTest2_app.properties
 OnlineBackupTest3_app.properties
-obtest_customer.jar
 onlineBackupTest4.sql
 onlineBackupTest4_app.properties
+OnlineBackupTest5.sql
+OnlineBackupTest5_app.properties
 BackupPathTests_app.properties
 LogDeviceTest_app.properties



Mime
View raw message