[FIX] rename database: set the cursor in autocommit mode
bzr revid: chs@openerp.com-20100527141347-rusf72102qic1pvb
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user