Project

General

Profile

« Previous | Next » 

Revision 2258

sql.py: put_table(): DuplicateKeyException: Assert that join_cols has changed to avoid infinite loops

View differences:

lib/sql.py
852 852
            
853 853
            break # insert successful
854 854
        except DuplicateKeyException, e:
855
            old_join_cols = join_cols.copy()
855 856
            join_cols.update(util.dict_subset_right_join(mapping, e.cols))
856 857
            db.log_debug('Ignoring existing rows, comparing on '+str(join_cols))
858
            assert join_cols != old_join_cols # avoid infinite loops
857 859
            # rerun loop with additional constraints
858 860
        except NullValueException, e:
859 861
            out_col, = e.cols

Also available in: Unified diff