changeset 12:9883a35f89f3

Fold 2.4 to 2.41 and 2.41 to 2.5 upgrade steps into a single one.
author Daniele Nicolodi <daniele@grinta.net>
date Sat, 25 Jun 2011 17:55:21 +0200
parents 66101b35a8c0
children fad020eceac0
files src/ltpdarepo/upgrade.py
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- 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'