Project

General

Profile

« Previous | Next » 

Revision 3113

db_xml.py: put_table(): Set in_table's default srcs to in_table itself instead of sql_gen.src_self, so that any copies of in_table will inherit the same srcs instead of being treated as a top-level table. This ensures that the top-level table's errors table will always be used.

View differences:

lib/db_xml.py
144 144
        available
145 145
    '''
146 146
    in_table = sql_gen.as_Table(in_table)
147
    in_table.set_srcs(sql_gen.src_self, overwrite=False)
147
    in_table.set_srcs([in_table], overwrite=False)
148 148
    
149 149
    def put_table_(node, in_row_ct_ref=None, limit=None, start=0):
150 150
        return put_table(db, node, in_table, in_row_ct_ref, row_ins_ct_ref,
......
152 152
    
153 153
    # Subset in_table if needed
154 154
    if limit != None or start != 0:
155
        full_in_table = in_table
156 155
        in_table = copy.copy(in_table) # don't modify input!
157
        in_table.set_srcs([full_in_table])
158 156
        sql.run_query_into(db, sql.mk_select(db, in_table, limit=limit,
159 157
            start=start), into=in_table)
160 158
            # in_table will be shadowed (hidden) by the created temp table

Also available in: Unified diff