Project

General

Profile

« Previous | Next » 

Revision 2252

sql.py: put_table(): Moved assignment of in_pkeys_ref outside loop so it wouldn't need to be re-versioned every iteration

View differences:

lib/sql.py
814 814
    
815 815
    # Do inserts and selects
816 816
    out_pkeys_ref = [temp_prefix+'_out_pkeys']
817
    in_pkeys_ref = [temp_prefix+'_in_pkeys']
817 818
    while True:
818 819
        try:
819 820
            cur = insert_select(db, out_table, mapping.keys(),
......
824 825
                add_row_num(db, out_pkeys_ref[0]) # for joining with input pkeys
825 826
            
826 827
            # Get input pkeys corresponding to rows in insert
827
            in_pkeys_ref = [temp_prefix+'_in_pkeys']
828 828
            run_query_into(db, *mk_main_select([in_pkey]),
829 829
                into_ref=in_pkeys_ref)
830 830
            add_row_num(db, in_pkeys_ref[0]) # for joining with output pkeys

Also available in: Unified diff