[FIX] rename database: set the cursor in autocommit mode

bzr revid: chs@openerp.com-20100527141347-rusf72102qic1pvb
This commit is contained in:
Christophe Simonis
2010-05-27 16:13:47 +02:00
parent 62c4eb806f
commit e5588c57d3
+1
View File
@@ -261,6 +261,7 @@ class db(netsvc.ExportService):
db = sql_db.db_connect('template1')
cr = db.cursor()
cr.autocommit(True) # avoid transaction block
try:
try:
cr.execute('ALTER DATABASE "%s" RENAME TO "%s"' % (old_name, new_name))