Project

General

Profile

« Previous | Next » 

Revision 2521

sql.py: put_table(): Fixed bug where some exceptions with no handler would not even allow insertion of no rows into the out_table (due to type mismatch issues), by creating an empty pkeys table as a special case

View differences:

sql.py
965 965
    insert_out_pkeys = sql_gen.Table(into.name+'-insert_out_pkeys')
966 966
    insert_in_pkeys = sql_gen.Table(into.name+'-insert_in_pkeys')
967 967
    while True:
968
        if limit_ref[0] == 0: # special case
969
            log_debug('Creating an empty pkeys table')
970
            cur = run_query_into(db, *mk_select(db, out_table, [out_pkey],
971
                limit=limit_ref[0]), into=insert_out_pkeys)
972
            break # don't do main case
973
        
968 974
        has_joins = join_cols != {}
969 975
        
970 976
        # Prepare to insert new rows

Also available in: Unified diff