[ts-gen] shim setup issues on 64-bit linux

Bill Pippin pippin at owlriver.net
Mon Apr 13 13:22:39 EDT 2009


Thanks for checking the archives first.  You're correct that there is
a problem in your database setup.  As Nils suggested, I suspect the
problem lies somewhere in the availability of load files, or the way
the setup script and its descendants use them.  His analysis should
lead you directly to your problem, and is worth considering --- thanks
Nils, for the quick response.

Or, if you wish, read on for a more general perspective.

I doubt your problem is with 64bit for Linux; we've been working with
same for awhile now. 

The following suggests that the risk.sql script is having problems.  This
script creates dummy order records for the Template table for use in the
order regression tests, which are run against the testing database only.

> ERROR 1452 (23000): Cannot add or update a child row: a foreign key
> constraint fails (`testing`.`Template`, CONSTRAINT `Template_ibfk_4`
> FOREIGN KEY (`par`) REFERENCES `Template` (`uid`))

The following suggests that the load (last) phase of setup.sql is failing
near the end; the HistoryTag and PastFilter tables are loaded via rest.sql,
which as the name suggests, does the rest of the table inserts:

> "The trading shim has connected to the database server
> The record with uid 32 from table PastFilter is out of sequence.
> Fill: 1 32 21 PastFilter
> Dbms: uid(32) next(21)
> Problem: 515 db record uid -- vector offset mismatch
> Exiting"

As the above notes, the shim is seeing nonsequential record indices,
and refuses to continue.  Anyway, your problem almost certainly stems
from the database setup, table creation, or table population phases
of the scripts sourced by setup.sql .

Please consider running the setup.sql script interactively, from within
the mysql interpreter, rather than piping the script into that
interpreter.  This way you can more easily observe any errors or warnings
as they occur.  Or, if piping from the command line, consider adding
the --show-warnings option to the mysql interpreter.

>From the bash prompt, and in the directory sql, when I enter the following,
where the server hostname is modified as needed, and I provide the proper
mysql admin password at the prompt that follows:

    sql$ mysql -u root -h <HOSTNAME> -p --show-warnings < setup.sql

I see something like the following:

    Note (Code 1305): PROCEDURE OrderUpdate does not exist
    Note (Code 1051): Unknown table 'Bool'
    Note (Code 1305): PROCEDURE OrderUpdate does not exist
    Note (Code 1051): Unknown table 'Bool'
    Note (Code 1051): Unknown table 'TsNames'
    Note (Code 1051): Unknown table 'TmpTabs'
    Note (Code 1051): Unknown table 'TmpUser'
    Note (Code 1051): Unknown table 'TmpHost'
    Note (Code 1051): Unknown table 'TmpShim'

Other warnings or errors are likely suspicious, and you might like to
investigate furthur.  The warnings I list above are harmless, and occur
when the setup script tries to drop tables and procedures that don't
exist, since the mysql "drop if exist" commands still insist on
generating warnings.

Good luck with getting the database populated, and please keep us
posted on your progress.



More information about the ts-general mailing list