PayasR / paralite

0 stars 0 forks source link

.import hangs when the import file is empty #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. paralite test.db "create table foo(x)"
2. paralite test.db ".import test.dat foo"
3. cat test.dat

What is the expected output? What do you see instead?
I expected paralite to finish without error and nothing is imported to the 
table.
I checked the paralite log file and the content of the log file is as the 
following:

[06/03/2013 02:45:45] Traceback (most recent call last):
  File "/home/thienbao/Project/paralite-read-only/ParaLite-3.0/bin/dload_client.py", line 434, in load_internal_file
    sub_dbs = mm[1].split(",")
IndexError: list index out of range

Please use labels and text to provide additional information.

Original issue reported on code.google.com by ntbao2...@gmail.com on 2 Jun 2013 at 5:56

GoogleCodeExporter commented 9 years ago
The problem is files w/ size==0 are specially treated on m_paraLite.py : 
proc_req_msg().
If the size is 0, reply the client with the information "The file is empty" and 
send a exit information to the master. 

Since backend SQLite can correctly import files w/ size==0, we removed the 
size==0 check.

Original comment by lay.sak...@gmail.com on 18 Jun 2013 at 3:20