Revision 3144
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql_io.py | ||
---|---|---|
310 | 310 |
|
311 | 311 |
limit_ref = [None] |
312 | 312 |
insert_in_table = in_table |
313 |
insert_in_tables = [insert_in_table] |
|
313 | 314 |
conds = set() |
314 | 315 |
distinct_on = sql_gen.ColDict(db, out_table) |
315 | 316 |
def mk_main_select(joins, cols): |
... | ... | |
419 | 420 |
# Uniquify input table to avoid internal duplicate keys |
420 | 421 |
insert_in_table = sql.distinct_table(db, insert_in_table, |
421 | 422 |
filter(sql_gen.is_table_col, distinct_on.values())) |
423 |
insert_in_tables.append(insert_in_table) |
|
422 | 424 |
except sql.NullValueException, e: |
423 | 425 |
log_exc(e) |
424 | 426 |
|
... | ... | |
474 | 476 |
|
475 | 477 |
assert sql.table_row_count(db, into) == sql.table_row_count(db, in_table) |
476 | 478 |
|
477 |
sql.empty_temp(db, set([in_table, insert_in_table]))
|
|
479 |
sql.empty_temp(db, insert_in_tables)
|
|
478 | 480 |
|
479 | 481 |
srcs = [] |
480 | 482 |
if is_func: srcs = sql_gen.cols_srcs(in_cols) |
Also available in: Unified diff
sql_io.py: put_table(): Fixed bug where if there were multiple unique constraints that were violated, only the distinct temp table for the last one would get garbage-collected