Problems setting alias for new DB + Import

Experiencing technical difficulties? Think you've found a problem with PokerTracker 3? Report it here.

Moderator: Moderators

Problems setting alias for new DB + Import

Postby dackjaniels » Thu Jun 12, 2008 5:45 am

Hi,
Apologies if this has already been covered elsewhere. I had trouble with Build 2 and the latest Beta 12 versions when trying to set an alias.

Here is how it went....

1. Used PT3 DB export function to back up all DB hands.(Build2)
2. Installed Beta 12.
3. Created new DB.
4. Used PT3 import function to import previously exported hands.
5. Attempted to set the aliases up again but PT3 returned a fatal error regarding the SQL statement it was trying to execute.

Some investigation showed that the DB table that this query was trying to update (tourney_holdem_results) contained a number of invalid primary keys and this was preventing the alias creation query from running. Specifically, as you know, the primary key is a combination of the id_tourney and id_player fields.

I have a number of nicknames for the same poker network (iPoker) and I like to 'tie' them together using the alias function (let's call them NICK1 and NICK2). As these nick's are at the same poker network I have never played the same tournament using more than one nickname (I know its possible but I wouldn't stoop to this ;) ).

However, when I looked through the tournament results in PT3, I noticed a number of instances where both NICK1 and NICK2 are recorded as having played in the same tournament! A closer look revealed that actual hands were only stored for the tournament played by NICK1, the tourney entry for NICK2, that appears to have been created in error during the export or import process, has no hands listed (no surprise really).

This all leads to the SQL error when trying to create an alias.

What happens is this:

Assume the following values....

NICK1 id_player = 500
NICK2 id_player = 650
id_tourney = 23

Current DB entries are (touney_holdem_results table):

id_tourney playername id_player id_player_real
23 NICK1 500 500
23 NICK2 650 650

NICK1 is my default PT3 nickname (entered in settings)
NICK2 is the alias I wish to link to NICK1

When PT3 attempts to create this alias it finds all instances of the NICK2 id_player and replaces them with the NICK1 id_player value, for example, it will find all id_player fields with the value 650 and replace them with the value 500.

In my case this would result in the following:

id_tourney playername id_player id_player_real
23 NICK1 500 500
23 NICK2 500 650


As you can see, this results in entries in the tourney_holdem_results table that violate the primary key constraint, there are now multiple records that have the same values for id_player and id_tourney.

Of course the SQL query fails, if won't let you violate the primary key constraint. The downside is no aliases :(


My thoughts...

1. The duplicate tournament entries must have crept into the database either during the export of the build 2 DB or during the import into Beta12. It is specifically these duplicate entries that prevent an alias being created.
2. It may be possible to make the tourney_holdem_results primary key a combination of id_tourney and id_player_real (instead of usig id_player) as I guess id_player_real never changes and therefore this specific problem would not appear, though I guess this would cause problems elsewhere an is therefore not possible.
3. When I exported the hands from Build 2 I had already created aliases. I did not remove them before the export as I never believed it necessary (I have seen no references to such in this forum at least). Perhaps this caused some problems during the export resulting in the duplicate tourney results.

Workaround...

The only way to solve this problem was to create a new DB and re-import all hands (yet again) from the original poker site hand histories. Aliases could then be created with no problems.


Sorry for the long post but hope that the detail helps you to resolve this bug.

Best regards,
Steve

**Interested to hear from anyone else that has experienced the same problem. :shock:
dackjaniels
 
Posts: 9
Joined: Fri May 02, 2008 1:41 am

Re: Problems setting alias for new DB + Import

Postby kraada » Thu Jun 12, 2008 12:14 pm

We're pretty sure this is fixed in the new Beta which will be released later today. Please upgrade when it is available, and if you still have this issue at that time, create a support ticket referencing this thread.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Problems setting alias for new DB + Import

Postby nachtwacht » Fri Jun 13, 2008 1:51 pm

It's "fixed" but not realy fixed.

The error now shows "you can not alias a player that has played against..."

Maybe I have a unique setup but my setup makes it that aliasing does not work.

I play on a normal computer (in the office) and on my laptop (usualy livingroom). All my historical hands played on my laptop have had a nick change. They are all played by "NICK_LPT". Sometimes I start playing a tournament in the office, then quit playing there, go to my laptop, log in there and continue the tournament. Ofcourse, the continuation of the tournament is done with the same player name wich, later when I start with a clean database (like now when installing PT3) is changed to NICK_LPT.

So you probably understand that these 2 players do not mix the way you have limited it now.

Ofcourse, you might think it is a strange idea to rename all hands played on a different computer but I do this to track if I have different results playing in one or another situation. It would be nice if these players could still be aliased. It might ofcourse not be possible at all due to the way you have set up your tables.... then please let me know.

greetings
nachtwacht
 
Posts: 2
Joined: Sat May 17, 2008 8:52 am

Re: Problems setting alias for new DB + Import

Postby WhiteRider » Fri Jun 13, 2008 2:04 pm

I don't think that's going to work if you play in the same tournament with "two different names". Surely, though, you'd want to use a single name for tournaments at least - if you have separate names you won't be able to do tournament summaries correctly!?
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Problems setting alias for new DB + Import

Postby nachtwacht » Sat Jun 14, 2008 3:10 pm

Depends on how an alias would handle tournaments. But since I am mainly a cash game player it would not matter that much to me.

It has brought me to an idea... not to rename the tournament hands..... will do that if it will never work.
nachtwacht
 
Posts: 2
Joined: Sat May 17, 2008 8:52 am

Re: Problems setting alias for new DB + Import

Postby WhiteRider » Sat Jun 14, 2008 3:14 pm

That should be OK - I doubt there will ever be a way of doing what you want with the tournaments.
WhiteRider
Moderator
 
Posts: 53972
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Technical Support / Bug Reports [Read Only]

Who is online

Users browsing this forum: No registered users and 9 guests

cron