Using this shsql command: shsql -echo -n 
*************************************************************
0. drop old tables that may be lying around.. and set up a fresh sequences table
drop table auctionitems

drop table _sequences

select * into _sequences table from originals/_sequences

shsql  155: warning: destination table doesn't exist.. creating it (_sequences)
*************************************************************
1. create sequence on auctionitems and set sequence number to an initial value of 39000
create sequence on auctionitems



update _sequences set value = 39000 where tablename = 'auctionitems' 

*************************************************************
2. populate the auctionitems table by selecting into from an original copy..
select * into auctionitems table from originals/auctionitems

shsql  155: warning: destination table doesn't exist.. creating it (auctionitems)
*************************************************************
3. use alter to add _lockowner and _locktime fields..
alter table auctionitems add _lockowner (nomaintain)

  404: Note: starting ALTER TABLE auctionitems add _lockowner 
  405: Note: ALTER TABLE finished, follow-up maintenance not elected (auctionitems)
alter table auctionitems add _locktime (nomaintain)

  404: Note: starting ALTER TABLE auctionitems add _locktime 
  405: Note: ALTER TABLE finished, follow-up maintenance not elected (auctionitems)
*************************************************************
4. create index..
tabmaint  400: Note: table maintance starting. (auctionitems)
..building index on auctionitems id ..  standardindex:1  standardindex:2  
tabmaint  401: Note: table maintenance finished. (auctionitems)
*************************************************************
5. record count
select count(*) from auctionitems

__rowcount 
---------- 
150        
**************************************************************
6. now start the concurrency test..
**************************************************************
7. sleep 5 to give plenty of time for the above to finish.. 
**************************************************************
8. concurrency test done.. 
Now list the result rows.. ids and lockowners will vary across tests
but status column should read 'MODIFIED' and all records should be well-formed..
select * from auctionitems where id > 39000

id                                           item_title                                         current_price nbids high_bidder seller  status  _lockowner _locktime 
----- ----------------------------------------------------------------------------------------- ------------- ----- ----------- ------ -------- ---------- --------- 
39001 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by fred     40.00     null     null      s19   MODIFIED    fred      null    
39002 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by ron      40.00     null     null      s19   MODIFIED    ron       null    
39005 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by jon      40.00     null     null      s19   MODIFIED    jon       null    
39003 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by ken      40.00     null     null      s19   MODIFIED    ken       null    
39007 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by tim      40.00     null     null      s19   MODIFIED    tim       null    
39004 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by liz      40.00     null     null      s19   MODIFIED    liz       null    
39006 New entry showing an item on consignment from HB Bros. Auctions, offered for sale by kim      40.00     null     null      s19   MODIFIED    kim       null    
**************************************************************
9. list the record that everyone tried to lock.. lockowner will 
vary across tests but record should be well-formed..
select * from auctionitems where id = 37012

id              item_title            current_price nbids high_bidder seller status _lockowner _locktime 
----- ------------------------------- ------------- ----- ----------- ------ ------ ---------- --------- 
37012 MASTERPIECES of FIGURE PAINTING     16.00     null     null      s01    null     fred      2b57C   
