From 8339ad1da67b0de6402c40cbc3d8bf33cee77650 Mon Sep 17 00:00:00 2001 From: Worros Date: Mon, 20 Dec 2010 15:57:15 +0800 Subject: [PATCH] Winamax: Reduce size of tourney hids The max size of a MySQL unsigned bigint is 9223372036854775808 Winamax hand.handid was a lot larger than that. Reduce the size if the nummber is 19 digits long. --- pyfpdb/WinamaxToFpdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyfpdb/WinamaxToFpdb.py b/pyfpdb/WinamaxToFpdb.py index 47721515..c6b49c4c 100644 --- a/pyfpdb/WinamaxToFpdb.py +++ b/pyfpdb/WinamaxToFpdb.py @@ -222,6 +222,8 @@ class Winamax(HandHistoryConverter): if key == 'HID1': # Need to remove non-alphanumerics for MySQL hand.handid = "1%.9d%s%s"%(int(info['HID2']),info['HID1'],info['HID3']) + if len (hand.handid) > 19: + hand.handid = "%s" % info['HID1'] if key == 'TOURNO': hand.tourNo = info[key] if key == 'TABLE':