Project

General

Profile

« Previous | Next » 

Revision 2966

db_xml.py: put_table(): Empty unneeded temp tables to free up memory

View differences:

lib/db_xml.py
194 194
        
195 195
        return put_table_(path)
196 196
    
197
    no_empty = set([in_table])
198
    
197 199
    # Remove any explicit pkey
198 200
    try: del row[pkey(out_table)]
199 201
    except KeyError: pass
200 202
    
201 203
    # Add fkey to parent
202 204
    if parent_ids_loc != None:
205
        no_empty.add(parent_ids_loc.table)
203 206
        parent_ptr = node.getAttribute('fkey')
204 207
        if parent_ptr == '': parent_ptr = pkey(name_of(node.parentNode))
205 208
        row[parent_ptr] = parent_ids_loc
......
226 229
    pkeys_loc = sql.put_table(db, out_table, in_tables, row, row_ins_ct_ref,
227 230
        None, next, is_func, on_error)
228 231
    
232
    if not db.debug_temp: sql.empty_temp(db, set(in_tables) - no_empty)
233
    
229 234
    # Insert children with fkeys to parent
230 235
    parent_ids_loc = pkeys_loc # applies to this section
231 236
    for child in children: put_table_(child)

Also available in: Unified diff