PDA

View Full Version : No hands importing



atatta
03-31-2009, 03:11 PM
I just updated from 1.07 to 1.08 beta 22 and no hands are importing, all new hands are considered duplicates and aren't imported into the database, both from iPoker and FTP, and almost certainly every other site. The same is true of beta 23, which I just tried.

I don't even know whether it's safe to downgrade again after the major database changes in 1.08. I need a fix or workaround quite urgently, as HEM is completely unusable now.

Looking at my postgresql log, there are many instances of 'prepared statement "pkhexecute" does not exist' and a few 'language "plpgsql" does not exist'. Did the database update perhaps fail because it couldn't create a function?

This happens even on a fresh database with any of the hands I've ever played.

After experimenting some more, I've found another error that seems to be the likely one, "there is no parameter $44", but I don't know what the query is so I don't know why this would be.

(Later) The actual statement (one of a series of PREPAREs including PKHExecute) causing the error is:

PREPARE PHTourneyKeyHeroExecute (integer,integer,timestamp without time zone,integer,integer,smallint,smallint,smallint,sm allint,smallint,
integer,integer,smallint,boolean,boolean,smallint, smallint,smallint,smallint,smallint,
smallint,smallint,smallint,smallint,smallint,boole an,boolean,boolean,boolean,smallint,boolean,boolea n,boolean,boolean,smallint,boolean,boolean,boolean ,boolean,smallint,character varying(20),smallint,smallint)
AS INSERT INTO playerhandstourneykeycolumns_hero
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$1 5,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27, $28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$4 0,$41,$42,$43,$44);

And indeed there are only 43 parameters there. How is this even working for anyone?

The addition of one "int" after the character varying(20) would fix this, and this was done for the non-hero version of this prepared statement. However, I can't fix this myself as the statements are hardcoded into HEM afaics.

morny
03-31-2009, 04:56 PM
What site is this for?

atatta
03-31-2009, 05:36 PM
All sites (I've personally tested iPoker, FTP, stars, party and some others I can't remember; every hand I've ever played failed to import into a fresh database). It's a HEM bug. The statement above clearly shows that. (Since nobody else has reported it newer postgresql versions probably support that broken query, but it's still wrong.)

morny
03-31-2009, 06:52 PM
Create a new database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=146 and try importing some hands and see if the problem persists

atatta
03-31-2009, 06:58 PM
Okay, I know you're busy, but I did write a fairly detailed bug report for a reason. I have tried that. It did not work. I investigated further and I have even identified the exact bug and fix. It is all in the first post.

morny
03-31-2009, 07:02 PM
Sorry didnt see the last line that you created a new database, thats really weird, email me and well arrange a suitable time to do a teamviewer session morny@holdemmanager.net

atatta
03-31-2009, 07:14 PM
It's not so weird, the SQL I pasted from postgresql's error log (after I changed my conf to log it) is just wrong (and it is very easy to fix).

I'm using postgresql 8.0.8 (stoneage, I know), and I don't know why later postgresql versions tolerate it, but since it works for everyone else they blatantly do (though maybe there is some subtle bug because of it silently ignoring the error).

Updating postgresql will almost certainly get it working for me, but the sql in question should still be fixed.

morny
03-31-2009, 08:30 PM
Ok but PostgreSQL 8 is no longer supported or available to download for anyone so the best thing is to update to the newest version

atatta
04-03-2009, 11:01 PM
Whether 8.0 is supported or not isn't the issue, the SQL is wrong and even on versions where it doesn't fail hard it might not be working correctly. This is a two minute fix, so please do forward it to Roy, there might be less trouble later that way.