Advertisement:

Author Topic: SQL error in Upgrade  (Read 6542 times)

Offline GRIMPMASTER

  • Newbie
  • *
  • Posts: 9
SQL error in Upgrade
« on: November 10, 2009, 09:05:54 PM »
Hi,

I have tried to update my forum from 2.0 rc1.2   to 2.0 rc2

but in , "Database Changes" step they get an sql error

"Error
BLOB/TEXT column 'real_name' used in key specification without a key length"


can you explain me wat is ? and how to solve the problem.

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,862
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: SQL error in Upgrade
« Reply #1 on: November 10, 2009, 09:49:56 PM »
This is likely caused by MySQL being compiled with "strict mode" enabled. The "strict mode" option makes MySQL complain about even the most minor issues, including things like this that it would normally ignore...

Try replacing your copy of upgrade_2-0_mysql.sql with the version I've attached, then run upgrade.php again (you will be given an option to continue from the previous spot, which should be fine).
Michael Eshom
Cincy Space - now open!

Offline GRIMPMASTER

  • Newbie
  • *
  • Posts: 9
Re: SQL error in Upgrade
« Reply #2 on: November 10, 2009, 11:32:39 PM »
 thanks
i'm replacing the attached upgrade_2-0_mysql.sql , then i run upgrade.php again but not option to continue from the  spot,
 >:(
Error!
BLOB/TEXT column 'poster_ip' used in key specification without a key length

Offline ekfaysal

  • Jr. Member
  • **
  • Posts: 374
Re: SQL error in Upgrade
« Reply #3 on: November 11, 2009, 03:22:11 AM »
same thing is with me. please help

Offline GRIMPMASTER

  • Newbie
  • *
  • Posts: 9
Re: SQL error in Upgrade
« Reply #4 on: November 11, 2009, 06:39:41 AM »
the upgrade is stoped in "Database Changes"  at  97%
Error!
BLOB/TEXT column 'poster_ip' used in key specification without a key length

when i reload the board , it work fine but somme text change example : "é " appear "é"
why ?
« Last Edit: November 11, 2009, 07:14:52 AM by GRIMPMASTER »

Offline ekfaysal

  • Jr. Member
  • **
  • Posts: 374
Re: SQL error in Upgrade
« Reply #5 on: November 11, 2009, 10:25:47 AM »
This is likely caused by MySQL being compiled with "strict mode" enabled. The "strict mode" option makes MySQL complain about even the most minor issues, including things like this that it would normally ignore...

Try replacing your copy of upgrade_2-0_mysql.sql with the version I've attached, then run upgrade.php again (you will be given an option to continue from the previous spot, which should be fine).

After using ure file and tried upgrading it shows me t his error Pleas check screenshot.
try to respond as soon as possible coz its my active forum on stake. please.

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,862
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: SQL error in Upgrade
« Reply #6 on: November 11, 2009, 11:36:07 AM »
the upgrade is stoped in "Database Changes"  at  97%
Error!
BLOB/TEXT column 'poster_ip' used in key specification without a key length

Sorry. Overlooked that index. Try the new version that I've attached.

when i reload the board , it work fine but somme text change example : "é " appear "é"
why ?

The character issue is probably due to not having the proper language packs installed. You can install additional languages by going to Admin -> Configuration -> Languages and clicking on "Add Language".

This is likely caused by MySQL being compiled with "strict mode" enabled. The "strict mode" option makes MySQL complain about even the most minor issues, including things like this that it would normally ignore...

Try replacing your copy of upgrade_2-0_mysql.sql with the version I've attached, then run upgrade.php again (you will be given an option to continue from the previous spot, which should be fine).

After using ure file and tried upgrading it shows me t his error Pleas check screenshot.
try to respond as soon as possible coz its my active forum on stake. please.

Sorry. That's my fault. It's trying to create an index on the first 255 characters of that column, but the column is only 80 characters long. Fixed in the attached version.
Michael Eshom
Cincy Space - now open!

Offline ekfaysal

  • Jr. Member
  • **
  • Posts: 374
Re: SQL error in Upgrade
« Reply #7 on: November 11, 2009, 01:02:41 PM »
@  Oldiesmann
Thanx man. your file did the trick. its done 100% .
now im stucked. whenever i tried to open my forum it says

Maintenance Mode
Okay faithful users...we're attempting to restore an older backup of the database...news will be posted once we're back!

I shoud display my forum not this message. please help . thanx

Offline ekfaysal

  • Jr. Member
  • **
  • Posts: 374
Re: SQL error in Upgrade
« Reply #8 on: November 11, 2009, 01:06:25 PM »
i had just run repair setting file. and now my forum is back.
thanx guys.

Offline GRIMPMASTER

  • Newbie
  • *
  • Posts: 9
Re: SQL error in Upgrade
« Reply #9 on: November 11, 2009, 01:27:44 PM »
thanks , fine & flawless work  ;D
but if the probleme is in  "strict mode" enabled ,, how to disable the sql strict mode , this error can appear in anny server.

Offline AndreT

  • Jr. Member
  • **
  • Posts: 196
    • SFSE
Re: SQL error in Upgrade
« Reply #10 on: November 29, 2009, 06:03:35 AM »
Thank you. Really useful help topic and files!

Offline JoannaMarie

  • Newbie
  • *
  • Posts: 1
Re: SQL error in Upgrade
« Reply #11 on: December 02, 2009, 04:57:01 AM »
Thanks so much for the file, can I suggest that it be included in the upgrade and install packages. It would save much headaches

Offline Ajay

  • Semi-Newbie
  • *
  • Posts: 17
  • Gender: Male
    • Ajay - On the Road called Life
Re: SQL error in Upgrade
« Reply #12 on: December 13, 2009, 01:42:03 AM »
Thank you. This file worked perfectly.
Ajay D'Souza [nofollow]

Offline amandato

  • Newbie
  • *
  • Posts: 1
Re: SQL error in Upgrade
« Reply #13 on: March 10, 2010, 10:07:10 AM »
This version of the upgrade_2-0_mysql.sql was not included in the RC3 that was released this week. Can these changes be included in the next releases of 2.0? There are many of us who have this strict mode MySQL server and would appreciate the fix being permanently added to the install/upgrades.

Offline AndreT

  • Jr. Member
  • **
  • Posts: 196
    • SFSE
Re: SQL error in Upgrade
« Reply #14 on: March 10, 2010, 11:17:57 AM »
Good point indeed. I posted a topic about this yesterday and also posted a working .sql which did the trick for me.

Offline Truja

  • Semi-Newbie
  • *
  • Posts: 37
Re: SQL error in Upgrade
« Reply #15 on: November 03, 2010, 09:26:27 PM »
tnks.. i need this to fix DB to RC4

:)

Offline airguard

  • Newbie
  • *
  • Posts: 1
Re: SQL error in Upgrade
« Reply #16 on: December 20, 2011, 10:50:17 AM »
great this worked for me today even if it a year since you guys posted this and new versions of uppgrade is up.

« Last Edit: December 21, 2011, 05:38:49 AM by airguard »