[storm] Oracle back end now passing all tests in tests.store and tests.database

Jason Baker jbaker at zeomega.com
Wed Jul 1 15:37:08 BST 2009


As of rev 339, the Oracle backend we've been working on is passing all
the tests in both tests.store and tests.databases.  I've been working
in lp:~zeomega/storm/zeomega_storm, which is mainly a somewhat heavily
modified branch of lp:~kov-alfaiati/storm/oracle-support with most of
Drew Smather's patches (lp:~djfroofy/storm/oracle-support-patches)
added.  It's definitely far from being in a perfect state (as you can
see from the bugs that are open), but it's getting better.  :-)

That said, here are some issues that may pop up if you're switching
from the current Oracle branch:

 * Binary data is no longer encoded as base64.  Instead, the data will
be hexlified, as Oracle expects binary data.
 * The back end now requires cx_Oracle >= 5.  This is because
cx_Oracle 5 makes type handling much easier by way of input type
handlers and output type handlers.
 * For ORA-08177 (a DatabaseError), the back end will now raise an
OperationalError with the message 'database is locked' as storm
expects.
 * The back end now keeps its own store of reserved words and escapes
them in mostly the same manner as storm itself does.  I did this
because the reserved word list in storm is a bit dated (from SQL 92)
and contains 159 words that aren't reserved in Oracle 10g.  For
reference, Oracle 10g has about 66 reserved words.

Some other things I've added:

 * Support for connecting using a TNS name.
 * "Isolation contexts" - essentially a way to temporarily put the
database in read committed mode temporarily using a with statement.  I
did this because I couldn't get any of the DDL statements in the tests
to run without using read committed isolation.  I'm not sure this is
the best solution, so I'm open to suggestions.
 * Support for NLS_LANG settings other than UTF-8.

I did also make some changes outside of Oracle support.  Fortunately,
I didn't change too much of the actual code itself (and what I did
change may even end up getting rolled back), but I did have to make
some changes to some of the tests.  I was going to include those
changes here, but when I started to type the list out, I decided it's
better to save them for a separate email.  :-)

At any rate, this branch is *far* from perfect.  What it really needs
now is more real-world testing.  We're going to start using it for one
of our own projects, but if anyone else is using Oracle, it would be
helpful if you could test it out.  If there are any questions, let me
know.

Jason



More information about the storm mailing list