Revision 7243
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/db_xml.py | ||
---|---|---|
221 | 221 |
return put(db, node, row_ins_ct_ref, on_error, col_defaults) |
222 | 222 |
|
223 | 223 |
in_table = sql_gen.as_Table(in_table) |
224 |
is_view = sql.view_exists(db, in_table) |
|
224 | 225 |
sql_io.mk_errors_table(db, in_table) |
225 | 226 |
in_table.set_srcs([in_table], overwrite=False) |
226 | 227 |
db.src = strings.ustr(in_table) |
... | ... | |
253 | 254 |
|
254 | 255 |
this_ct = cur.rowcount |
255 | 256 |
total += this_ct |
256 |
start += this_ct # advance start to fetch next set |
|
257 |
if not is_view: start += this_ct # advance start to fetch next set
|
|
257 | 258 |
if this_ct == 0: break # in_table size is multiple of partition_size |
258 | 259 |
|
259 | 260 |
# Import data |
Also available in: Unified diff
db_xml.py: put_table(): Fixed bug where for views, shouldn't advance start (OFFSET clause) after each chunk, because views are typically dynamic and will contain a new set of rows after the first set is imported