Loop from 1 to
There will, from time-to-time be NILs in the arrays so we better make sure that we can handle them and they don't interfere with the count
Testing threading is always a bit suspect but we can test a little bit of it to make sure we have the general idea correct.
This is the reverse of test-thread-1 in as much as we have a long running query and our main thread waits until the long running query is completed. We use a closure to set a flag to indicate success.
The killer thread test. Start 100 threads to run in the next 1-3 seconds that will insert the numbers from 1 to 100 into a table. Join the threads and then run a query to verify that all was well. This should demonstrate whether we have a problem with locking or not.
Test out the self-service result set stuff. It works but it's a bit tricky to build a working result set/row processing loop ...
We should be able to use two result sets simultaneously.