Project

General

Profile

« Previous | Next » 

Revision 2589

sql.py: put_table(): insert_out_pkeys, insert_in_pkeys: Use sql_gen.add_suffix() to ensure name isn't too long

View differences:

lib/sql.py
994 994
        update(db, in_table, [(in_col, None)],
995 995
            sql_gen.ColValueCond(in_col, value))
996 996
    
997
    def insert_pkeys_table(which):
998
        return sql_gen.Table(sql_gen.add_suffix(in_table.name,
999
            '_insert_'+which+'_pkeys'))
1000
    insert_out_pkeys = insert_pkeys_table('out')
1001
    insert_in_pkeys = insert_pkeys_table('in')
1002
    
997 1003
    # Do inserts and selects
998 1004
    join_cols = sql_gen.ColDict()
999
    insert_out_pkeys = sql_gen.Table(in_table.name+'_insert_out_pkeys')
1000
    insert_in_pkeys = sql_gen.Table(in_table.name+'_insert_in_pkeys')
1001 1005
    while True:
1002 1006
        if limit_ref[0] == 0: # special case
1003 1007
            log_debug('Creating an empty pkeys table')

Also available in: Unified diff