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

Mike Thornton endoscope at gmail.com
Wed Apr 15 02:39:56 EDT 2009


Hi folks,

Running "mysql_install_db" again + other minor file edits (below), and then
sourcing "setup.sql" cleaned up most of those errors.  My last error (I
hope) is a gap in the Symbol table.  A previous user mentioned having
trouble with this, but I am not clear how he solved it..  When running "shim
--data", I see the message
----------------
"          The trading shim has connected to the database server

The record with uid 65536 from table Symbol is out of sequence.
Fill: 1 65536 45188 Symbol
Dbms: uid(65536) next(45188)

Problem: 515 db record uid -- vector offset mismatch
Exiting"
---------------
It appears that the symbol table is not being built properly.  When I run
"select * from Symbol;" in mysql, I see
---------------------------------
...
45184    4    2    254    EUR    n/a    GG7293770    36302777
45185    4    2    254    EUR    n/a    GG7293994    40061818
45186    4    2    254    EUR    n/a    ZZ2071012    36302810
45187    4    49    254    GBP    n/a    880591DU3    29108635
65536    5    1    14    USD    AU    AUD    \N
65537    5    1    14    USD    AU    BHP    \N
65538    5    1    28    USD    BM    ACE    \N
65539    5    1    31    USD    BR    BRL    \N
65540    5    1    31    USD    BR    RIO    \N
65541    5    1    38    USD    CA    ABH    \N
65542    5    1    38    USD    CA    ABX    \N
65543    5    1    38    USD    CA    CAD    \N
65544    5    1    38    USD    CA    SV    \N
65545    5    1    43    USD    CH    CHF    \N
65546    5    1    48    USD    CN    BIDU    \N
...
---------------------
The several contracts before the gap are bond contracts from the files
"A0Bnd03.sql" and "A0Bnd00.sql".  What is after the gap appears to be stocks
with "\N" denoting NULL.  Does anyone know what is causing the gap or have
any insights into how to fix this?

Thanks.
Mike


------------- other minor edits -------------
1.  In "risk.sql", comment out the lines as follows (this eliminates error
#1452 relating to the foreign key constraint)

   -- insert into Template(side, pro, fid, par) values (2, 37, 2, 3),
   --                                                 (2, 37, 2, 3),
   --                                                 (2, 37, 2, 3);

2.  Edit Makefile lines to

TWO      := $(filter %/mysql/lib,$(SQL))    \
            $(filter %client,$(SQL))

i.e. "%/mysql" ----> "%/mysql/lib"
------------------------------------------

On Mon, Apr 13, 2009 at 10:22 AM, Bill Pippin <pippin at owlriver.net> wrote:

> Mike,
>
> 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.
>
> Thanks,
>
> Bill
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.trading-shim.org/pipermail/ts-general/attachments/20090414/69ec9cad/attachment.html 


More information about the ts-general mailing list