Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 02-06-2009, 10:45 AM   #1
LQ Newbie
Registered: Oct 2008
Location: Cardiff, Wales
Distribution: Jaunty
Posts: 20

Rep: Reputation: 0
mysql, duplicate entry error with unknown character: �

Im running a pipeline (est2uni) which does some analysis and then puts the output into a mysql database. the database structure is already produced from a sql file they supplied, so that is correct but im getting the error:

DBD::mysql::st execute failed: Duplicate entry �' for key 1 at /usr/local/bioinf/est2uni/perl/ line 1153.
I know that duplicate entry would usually be resolved by an auto increment function, but i need the id's that it imports to stay the same, and I have no idea what the � is supposed to represent

Heres the point where its reading in the .pm :
        #should we clean previous clones?
        my $clean=read_config($config,'do_clean_db','');
        if ($clean){
                #rflp table should be completely cleanned
                my @tables=($table);
                clean_tables($config,@tables) or return 0;

        my $only_clean = read_config($config,'only_clean','');
        if (!$only_clean){
                #we assume that there is no previuos clone info in the database
                my $st="INSERT INTO $table (name,library) VALUES (?,?);";

                foreach my $clone (keys %clone_info){
                        if ($clone_info{$clone} eq 'none'){
                        $sth->execute or return 0;
with the last line being 1153 which it refers to.

Ill be thankfull for any help. been stuck on this for a while. (and ive just put the RAM up from 1gb to 4gb today so i want to get it whirring!)


Last edited by pwd_pwd_omg_pwd; 02-06-2009 at 10:45 AM. Reason: i put 1152 insead of 1153 at the end. number dyslexia!
Old 02-09-2009, 06:31 AM   #2
Senior Member
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Hmm doesn't that error mean that somewhere a query like this is trying to execute:

insert into whatever set id = ,;

This is invalid SQL, as far as I know.... what type of column is the ID column?
Old 02-11-2009, 05:38 AM   #3
LQ Newbie
Registered: Oct 2008
Location: Cardiff, Wales
Distribution: Jaunty
Posts: 20

Original Poster
Rep: Reputation: 0

Ive figured out the problem now guys. It was a duplication, but it was trying to put in the alphabetic files and the chromatogram (images) files too so it just buggered it up royaly. Now all i have to do is get it to take the files but thats for another day!



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysql Error: Duplicate entry '0' for key 1 w0lv3r1ne Linux - Server 1 08-17-2006 04:30 AM
Trying to restore mysql dump, error 1062: Duplicate entry mackdav Linux - Software 1 04-25-2006 04:02 AM
mysql dupe entry error, how to avoid? hydro Linux - Software 0 09-20-2003 01:08 PM
Unknown sendmail log entry error robeb Linux - General 5 06-26-2003 06:23 PM
Error: Acct: Couldn't insert SQL accounting START record - Duplicate entry '15212' fo ethanchic Linux - Software 0 04-11-2003 11:48 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration