Author: jure
Date: Wed Feb 20 09:59:25 2013
New Revision: 1448062
URL: http://svn.apache.org/r1448062
Log:
Stop leaking fds by not creating temporary tables when migrating data on schema
upgrade
Modified:
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
Modified:
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
URL:
http://svn.apache.org/viewvc/incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py?rev=1448062&r1=1448061&r2=1448062&view=diff
==============================================================================
---
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
(original)
+++
incubator/bloodhound/branches/bep_0003_multiproduct/bloodhound_multiproduct/multiproduct/api.py
Wed Feb 20 09:59:25 2013
@@ -173,7 +173,7 @@ class MultiProductSystem(Component):
for table in migrate_tables:
cols = ','.join(table_columns[table])
self.log.info("Migrating table '%s' to a new schema",
table)
- db("CREATE TEMPORARY TABLE %s_temp AS SELECT %s FROM %s" %
+ db("CREATE TABLE %s_temp AS SELECT %s FROM %s" %
(table, cols, table))
db("DROP TABLE %s" % table)
db_connector, _ =
DatabaseManager(self.env)._get_connector()