* implement the new SessionsCache table
- The SessionsCache table can be used to track overall or game sepecific sessions
- The totalProfit field is summed by gameTypeId for cash games allowing for multiple currencies
- Tournament profit (cashes - buy-ins) are also recorded in totalProfit and its grouped by tourneyId
* change the sequence and methodology surrounding the import of hands
- fpdb_import.py implements a unique Hand.py method for each table
- Hands SessionCache and HudCache records themselves are 'cached' to allow for 'bulk insert' at EOF
- import is reorganized to allow for efficient locking in multiple connection environments
* changes the name of the index created by addTPlayersIndex (so that it is unique) to accommodate a bug in MySQL 5.5
TODO
* A 'rebuild_sessionsCache' method is still required
* Further commits are expected to fix bugs created during the porting of this code
The previous calculation didn't correctly deal with the 'complete' and 'bringin' actions, with bringin being markes as raisedFirstIn = True
Reduced regression test errors, but triggered some in unverified file.
---------------------
Total Errors: 22
---------------------
Likely offenders:
( 2) : regression-test-files/cash/Stars/Stud/7-StudHL-USD-0.04-0.08-200911.Cardtest.txt
( 2) : raiseFirstInChance
( 1) : street1CBChance
( 1) : street1CBDone
Code looks trivial and correct.
Causes 13 regressions that need to be reviewed.
Total Errors: 48
( 7) : wonWhenSeenStreet2
( 4) : wonWhenSeenStreet3
( 2) : wonWhenSeenStreet4
* added logic to Hand.import() so that it only calls db.storeHandsActions if saveActions is true
* added logic to DetailedStats.getstats() so that it only calls assembleHandsActions() if saveActions is true
Comment from code:
hand.players includes people that are sitting out on some sites for cash games
actionStreets[1] is 'DEAL', 'THIRD', 'PREFLOP', so any player dealt cards
must act on this street if dealt cards. Almost certainly broken for the 'all-in blind' case
and right now i don't care - CG