[ts-gen] Failed dbms account code update [Was: shim error]

Bill Pippin pippin at owlriver.net
Tue Mar 23 19:44:42 EDT 2010


Mike,

With respect to version dependent database problems:

> I started mysql manually, and mysql detected that the "testing"
> database was corrupt.  I am not sure why mysql did not detect this
> earlier since I had started mysql manually a few times, albeit with
> a different user name and not "shim".  Mysql said something about
> needing to repair the database, which it did behind the scenes.  I
> did not need to run any of the scripts again.  Then, when I started
> the shim, it just started working.

The setup.sql script takes dbms admin (root) permissions, drops
both databases, testing and trading, recreates the databases,
adds permissions, creates tables, and populates them.

The create.sql script --- for one database only, determined by
context --- drops tables, recreates them, and repopulates them.

So, one way to get your databases out of sync is to use create.sql
to update one and not the other.

> Before I had run the latest sql scripts for the first time (I had
> an older version of the shim database setup from over 1 year ago),
> I manually deleted the trading database.  The testing database
> would not "drop" for some reason -- I cannot remember the error
> message.  However, the setup.sql script had run OK, and the testing
> database looked fine upon running queries so I had initially assumed
> it was OK.

Dropping tables must be performed bottom up, that is postorder
for the foreign key dependency graph.  When tables are added or
renamed, this means that the create.sql script from a newer version 
of the shim may have trouble with dropping the tables from an older
version.  The setup.sql script, in contrast, since it drops both
databases, just blows everything away all at once.  It sounds like
you may have had some problems with the create.sql script.

> So to answer your question, I am not sure what I did to fix it.
> Somehow mysql detected the database corruption.  Perhaps I should
> rerun the "setup.sql" script, but I have not done this since the
> shim says it connects OK.

Hard to say from here, but glad it works.

Thanks for the explanation,

Bill


More information about the ts-general mailing list