Revision 5377
Added by Aaron Marcuse-Kubitza over 12 years ago
sql_io.py | ||
---|---|---|
459 | 459 |
remove_all_rows() |
460 | 460 |
else: exc_strs.add(e_str) |
461 | 461 |
|
462 |
limit_ref = [None]
|
|
462 |
ignore_all_ref = [False]
|
|
463 | 463 |
def remove_all_rows(): |
464 | 464 |
log_debug('Ignoring all rows') |
465 |
limit_ref[0] = 0 # just return the default value column
|
|
465 |
ignore_all_ref[0] = True # just return the default value column
|
|
466 | 466 |
|
467 | 467 |
def ignore_cond(cond, e): |
468 | 468 |
if is_literals: remove_all_rows() |
... | ... | |
575 | 575 |
while True: |
576 | 576 |
has_joins = join_cols != {} |
577 | 577 |
|
578 |
if limit_ref[0] == 0: break # unrecoverable error, so don't do main case
|
|
578 |
if ignore_all_ref[0]: break # unrecoverable error, so don't do main case
|
|
579 | 579 |
|
580 | 580 |
# Prepare to insert new rows |
581 | 581 |
if is_function: |
... | ... | |
693 | 693 |
# extra tables which aren't used by the dataset |
694 | 694 |
|
695 | 695 |
# Handle unrecoverable errors |
696 |
if limit_ref[0] == 0:
|
|
696 |
if ignore_all_ref[0]:
|
|
697 | 697 |
log_debug('Returning default: '+strings.as_tt(strings.urepr(default))) |
698 | 698 |
return default |
699 | 699 |
|
Also available in: Unified diff
sql_io.py: put_table(): Replaced limit_ref integer with ignore_all_ref boolean, because it is no longer used as a select statement limit