# HG changeset patch # User Daniele Nicolodi # Date 1309017321 -7200 # Node ID 9883a35f89f34b3fc80f9b560a540c8c05a9e484 # Parent 66101b35a8c01f0b74b3fc6a0e66eaee511e042f Fold 2.4 to 2.41 and 2.41 to 2.5 upgrade steps into a single one. diff -r 66101b35a8c0 -r 9883a35f89f3 src/ltpdarepo/upgrade.py --- a/src/ltpdarepo/upgrade.py Sat Jun 25 17:47:51 2011 +0200 +++ b/src/ltpdarepo/upgrade.py Sat Jun 25 17:55:21 2011 +0200 @@ -46,17 +46,13 @@ conn.close() -@register(2.4, 2.41) -def set_strict_mode(conn): - curs = conn.cursor() - curs.execute("""SET GLOBAL sql_mode='STRICT_TRANS_TABLES'""") - conn.commit() - - -@register(2.41, 2.5) +@register(2.4, 2.5) def upgrade_24_to_25(conn): curs = conn.cursor() + # make mysql beheave: use sql strict mode + curs.execute("""SET GLOBAL sql_mode='STRICT_TRANS_TABLES'""") + # consolidate privileges: there is no need to specify grants # both for 'localhost' and for '%' hosts. drop privileges granted # for 'localhost'