yashwantkumargaurav / fb2pdf

Automatically exported from code.google.com/p/fb2pdf
1 stars 0 forks source link

Conversion of the second and following books of the same author silently fails #93

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add  book of author A.
2. Add another book of author A.
3. Look into apache log file.

What is the expected output? 
There should be no errors in the log.

What do you see instead?
[Sun Oct 04 08:18:57 2009] [error] [client 93.100.32.78] FB2PDF ERROR. Unable 
to insert book 
with key 98e67509ef21d6e1af52ab701d5b3f8f.zip into DB., referer: 
http://fb2pdf.com/index.php

Please use labels and text to provide additional information.
The problem is in db.php file, function insertBook. Each call of this function 
blindly attempts to 
insert a new author into AuthorSearch table but second and following attempts 
fail due to unique 
constraint on author name. The logic or SQL should be changed to insert only 
unique authors.

Original issue reported on code.google.com by zlatk...@gmail.com on 8 Oct 2009 at 5:07