Revision 2319
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
399 | 399 |
''' |
400 | 400 |
if into_ref == None: return run_query(db, query, params, *args, **kw_args) |
401 | 401 |
else: # place rows in temp table |
402 |
check_name(into_ref[0]) |
|
403 | 402 |
kw_args['recover'] = True |
404 | 403 |
while True: |
405 | 404 |
try: |
406 | 405 |
create_query = 'CREATE' |
407 | 406 |
if not db.debug: create_query += ' TEMP' |
408 |
create_query += ' TABLE '+into_ref[0]+' AS '+query |
|
407 |
into = sql_gen.as_Table(into_ref[0]).to_str(db) |
|
408 |
create_query += ' TABLE '+into+' AS '+query |
|
409 | 409 |
|
410 | 410 |
return run_query(db, create_query, params, *args, **kw_args) |
411 | 411 |
# CREATE TABLE AS sets rowcount to # rows in query |
Also available in: Unified diff
sql.py: run_query_into(): Fixed bug where into table name was not being escaped