show_image mysql error: Duplicate entry
show_image.php is giving a database error when showing a thumb nail. This only occurs on images of an odd shape in tikiwiki-1.9.2
Viewing the thumbnail in a page gives a broken image icon, but viewing it in a browser shows that a database error is the cause:
Warning: mysql error: Duplicate entry '1189-200-80-t' for key 1 in query: insert into `tiki_images_data`(`imageId`,`xsize`,`ysize`, `type`,`filesize`,`filetype`,`filename`,`data`) values (?,?,?,?,?,?,?,?) in /home/sk8m8ne/public_html/tiki/lib/tikidblib.php on line 134
The database does have the duplicate the script refers to
Table: tiki_images_data
| imageId | xsize | ysize | type | filesize | filetype | filename | data | etag |
| 1189 | 800 | 318 | o | 106621 | image/pjpeg | 2parkpancopy.jpg | BLOB - 0 Bytes | b5b970412cc6718ff840b7610977470c |
| 1189 | 200 | 80 | t | 3987 | image/pjpeg | 200x80_2parkpancopy.jpg | BLOB - 0 Bytes | NULL |
| 0 | 0 | 0 | t | 0 | NULL | x_ | BLOB - 0 Bytes | NULL |
| 0 | 200 | 150 | t | 0 | NULL | 200x150_ | BLOB - 0 Bytes | NULL |
The last two look like bad news, deleting them makes no difference and they did not re appear on adding the image again.
Here is the example imageThumbnail
Full image
Any help would be gratefully accepted.