vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   upgrade from 4.1.10 to 4.2.2 return DB error (https://vborg.vbsupport.ru/showthread.php?t=313715)

itayKinnrot 08-15-2014 08:08 PM

upgrade from 4.1.10 to 4.2.2 return DB error
 
hi,

im in the middle of vbulletin upgrade from 3.8.7 to 4.2.2 and in the middle of upgrade when it get to version 4.1.10 it return DB error:

Unexpected Text:
<?xml version="1.0" encoding="windows-1252"?>
<?xml version="1.0" encoding="windows-1252"?>
<errors>
<error><![CDATA[<p>Database Error</p>

Invalid SQL:

INSERT INTO style
(title, parentid, userselect, displayorder, type)
VALUES
('Default Mobile Style',
-2, 1, 1, 'mobile');

Duplicate entry '0' for key 1]]></error>
<error_html><![CDATA[<p>Database error in vBulletin 4.1.10</p>
<p>Invalid SQL:

INSERT INTO style
(title, parentid, userselect, displayorder, type)
VALUES
('Default Mobile Style',
-2, 1, 1, 'mobile');<p>
<p>
<strong>MySQL Error</strong> : Duplicate entry '0' for key 1<br />
<strong>Error Number</strong> : 1062<br />
<strong>Request Date</strong> : Saturday, August 16th 2014 @ 12:07:36 AM<br />
<strong>Error Date</strong> : Saturday, August 16th 2014 @ 12:07:37 AM<br />
<strong>Script</strong> : http://www.iphones.co.il/vbdev1/forum/install/upgrade.php<br />
<strong>Referrer</strong> : http://www.iphones.co.il/vbdev1/forum/install/upgrade.php<br />
<strong>Classname</strong> : vB_Database<br />
<strong>MySQL Version</strong> : 5.0.91-community<br />
</p>]]></error_html>
</errors>

please assist.

thanks,
Dooby

Paul M 08-17-2014 11:21 PM

Have you ever installed the vB3 MAPI (for mobile) plugin ?

That had a bug at one point that broke the style table in such a way that it would cause the above;

If you run the SQL below, it should fix it.
Before you do, back-up your styles, as you may lose one of them (the last one you created).

Code:

DELETE FROM style WHERE styleid = 0;
ALTER TABLE style CHANGE styleid styleid SMALLINT NOT NULL AUTO_INCREMENT;

(Note, if you use a table prefix, you will need to change the table name above to match).


All times are GMT. The time now is 08:22 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01038 seconds
  • Memory Usage 1,710KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete