java.lang.Object
org.apache.derbyTesting.functionTests.tests.lang.streams
- public class streams
- extends java.lang.Object
This tests streams, and when we should not materialize it. Beetle entry 4896, 4955.
Some of the code comes from conn/largeStreams.java. But this program figures out whether
a stream is materialized or not in a different way. Part of the reason is that this test
should be run nightly to catch regressions and shouldn't require too much disk space. It
figures out whether a stream is materialized or not by comparing the stack levels of different
cases. The stack level is when reading the last byte of the stream. According to the current
code, the stack is about 10 levels deeper when reading the stream from store per page (not
materialized before hand), comparing to the case when materializing from sql language layer.
We don't expect this to change dramatically for some time. And this can always be adjusted
when needed.
For bug 5592 - match db's limits for long varchar which is 32700. In order to enforce that limit
we now materialize the stream to make sure we are not trying to overstuff data in long varchar.
Because of this, I had to make some changes into the stack level checking for long varchars.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pkCount
private static int pkCount
conn
private static java.sql.Connection conn
streams
public streams()
main
public static void main(java.lang.String[] args)
setup
static void setup()
throws java.sql.SQLException
teardown
static void teardown()
throws java.sql.SQLException
verifyCount
static void verifyCount(int count,
int expect)
throws java.sql.SQLException
doWork
private static void doWork()
throws java.lang.Exception
insertLongString
private static int insertLongString(java.sql.PreparedStatement ps,
int kchars,
boolean isInsert)
throws java.sql.SQLException
insertLongBinary
private static int insertLongBinary(java.sql.PreparedStatement ps,
int kbytes)
throws java.sql.SQLException