Current time: 02-09-2010, 03:42 PM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] phpBB3: SQL error 1062 during users import
06-22-2009, 12:49 PM
Post: #1
[F] phpBB3: SQL error 1062 during users import
A user reported that he gets the following error converting from phpBB3. He said he had no problems with beta3 but with beta5 it isn't working.
Code:
SQL Error:
    1062 - Duplicate entry 'K' for key 2
Query:
    INSERT INTO mybb_users (`usergroup`,`additionalgroups`,`displaygroup`,`import_usergroup`,`import_additi​​onalgroups`,`import_displaygroup`,`import_uid`,`username`,`password`,`salt`,`lo​g​inkey`,`email`,`regdate`,`lastactive`,`lastvisit`,`website`,`showsigs`,`signat​ur​e`,`showavatars`,`timezone`,`avatardimensions`,`avatartype`,`avatar`,`lastpos​t`,​`icq`,`aim`,`yahoo`,`msn`,`hideemail`,`allownotices`,`regip`,`lastip`,`longr​egip​`,`longlastip`,`language`,`passwordconvert`,`passwordconverttype`,`postnum`​,`inv​isible`,`birthday`,`birthdayprivacy`,`subscriptionmethod`,`receivepms`,`pm​notice​`,`pmnotify`,`remember`,`showquickreply`,`ppp`,`tpp`,`daysprune`,`timefor​mat`,`d​st`,`buddylist`,`ignorelist`,`style`,`away`,`awaydate`,`returndate`,`ref​errer`,`​reputation`,`timeonline`,`showcodebuttons`,`totalpms`,`unreadpms`,`pmfo​lders`,`n​otepad`,`threadmode`,`showredirect`,`dateformat`,`dstcorrection`,`warn​ingpoints`​,`moderateposts`,`moderationtime`,`suspendposting`,`suspensiontime`,`​coppauser`,​`classicpostbit`,`loginattempts`,`failedlogin`) VALUES ('2','','2','2','','2','635','K�bler','','irgendeincode','irgendeincode','email@​​example.com','Nummer','Nummer','GleicheNummerWieDavor','','1','','1','10','0|0','','','0​​','','','','','1','0','***IP-Adresse***','','0','0','','***Code***','phpbb3','0','1','','all','0','1','1','1'​​,'1','1','0','0','0','D j. M Y, H:i','1','','','0','0','0','0','0','0','0','1','0','0','1**Inbox$%%$2**Sent Items$%%$3**Drafts$%%$4**Trash Can','','','1','0','1','0','0','0','0','0','0','0','0','0')

Greets,
Michael
-------------
German MyBB-Site
MyBBoard.de
Get the german languagepack here
Visit this user's website Find all posts by this user
06-22-2009, 01:00 PM (This post was last modified: 06-22-2009 01:00 PM by MattRogowski.)
Post: #2
RE: phpBB3: SQL error 1062 during users import
Me and Josh actually got this on Beta 3 IIRC. It's doesn't seem to happen every time though, it's odd, sometimes it works fine, sometimes it gives this error.

My Personal Site - Twitter
MyBB Support Team
MyBB Directory, coming soon.
[Image: lqscs]
Visit this user's website Find all posts by this user
06-23-2009, 03:11 AM
Post: #3
RE: phpBB3: SQL error 1062 during users import
Please provide repro. instructions. There is no clear reason why this is happening as we already have a separate duplicate users handling code

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
06-24-2009, 12:34 PM (This post was last modified: 06-24-2009 12:36 PM by pcworld.)
Post: #4
RE: phpBB3: SQL error 1062 during users import
I'm the user who get this error.

The error comes, when I convert the users, but only with users, who have German umlauts like ä, ö or ü in their username.

The database encoding is UTF-8 Unicode.

pcworld
Find all posts by this user
06-24-2009, 07:54 PM
Post: #5
RE: phpBB3: SQL error 1062 during users import
That makes more sense - Though it is still odd that MySQL isn't matching those strings properly

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
06-25-2009, 02:51 PM (This post was last modified: 06-27-2009 09:59 AM by pcworld.)
Post: #6
RE: phpBB3: SQL error 1062 during users import
Is it possible that this bug can be fixed? Wink

pcworld
Find all posts by this user
06-27-2009, 01:07 PM
Post: #7
RE: phpBB3: SQL error 1062 during users import
So, now it is working.
The database must have the correct encoding... Smile

But there was one bug, too: Then I it was possible to convert the phpBB3. But if there was a German umlaut like ä, ö or ü in a forum description or in a post, the post was be cutted at the place, where normally the umlaut stands.
So that is the answer to this problem:
Before converting, replace in inc/config.php this:
Code:
$config['database']['encoding'] = 'utf8';
with this:
Code:
$config['database']['encoding'] = '';
And after the converting do it backwards. Smile

Sorry for my bad English Wink
German users can read the answer to the problem here: http://forum.mybboard.de/thread-13566-post-97010.html

pcworld
Find all posts by this user
07-04-2009, 12:48 AM
Post: #8
RE: phpBB3: SQL error 1062 during users import
I think I fixed it - It looks like the LOWER() function in MySQL isn't UTF-8 safe or has some sort of bug.

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user
07-04-2009, 12:48 AM
Post: #9
[F] phpBB3: SQL error 1062 during users import
This bug has been fixed in the latest version of the MyBB Merge System.

Please note the latest code is not live on the site or for download. An update for the MyBB Merge System will be released which contains this fix.

With regards,
The MyBB Group

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user


Forum Jump: