Advertisement:

Author Topic: Large board upgrade error - "Data truncated for column 'poster_ip_old'"  (Read 996 times)

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
So, uploaded RC2 last night to do the upgrade, got this error...

"Data truncated for column 'poster_ip_old' at row"

Ummm... now the upgrade won't continue, what can I do?

Cheers

Stew

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Forgot to say, it was during this stage...

Executing database changes
Please be patient - this may take some time on large forums. The time elapsed increments from the server to show progress is being made!
Executing: "Update messages poster_ip with ipv6 support (May take a while)" (47 of 65)

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
I did a full restore, ran database cleanup and re-did it, dies in the same place again...


Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 551
From which version you came?
Which mysql version you use?
Which datatype got the colum poster_ip of you messages table?

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
coming from 2.0.15

Database:
Server: Localhost via UNIX socket
Server type: MariaDB
Server connection: SSL is not being used Documentation
Server version: 10.2.23-MariaDB-log-cll-lve - MariaDB Server
Protocol version: 10
User: cpses_tnfqpdi3zj@localhost
Server charset: UTF-8 Unicode (utf8)

Datatype, what do you mean?



Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 551
In the database table smf_message you find poster_ip column,
which datatype it got (use phpmyadmin).

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Does this help?


Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 551
Change your upgrade_2-1_mysql.sql in this way:
replace
Code: [Select]
upgrade_query("ALTER TABLE {$db_prefix}messages CHANGE poster_ip poster_ip_old varchar(200);");

with
Code: [Select]
upgrade_query("ALTER TABLE {$db_prefix}messages CHANGE poster_ip poster_ip_old varchar(255);");

related pr https://github.com/SimpleMachines/SMF2.1/pull/5678/files

Offline Sesquipedalian

  • The Mad Doctor
  • Lead Developer
  • Sr. Member
  • *
  • Posts: 872
  • Gender: Male
  • It works! ... in theory.
    • Sesquipedalian on GitHub
PR has been merged.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Hi,
I've done the change this morning, but it's STILL doing the same issue... I have confirmed that I did indeed upload the modified sql file.

Stewart

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 551
well it make no sense that the error keep the same,
when you apply the correction correctly.

Offline m4z

  • Jr. Member
  • **
  • Posts: 135
Be sure to actually (re)load the modified file in your browser, not from history/cache etc.
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Be sure to actually (re)load the modified file in your browser, not from history/cache etc.

well I'm doing a full restore of the site, then re-uploading ALL the upgrade files for 2.1 RC2, then just running the upgrade script, so not sure how it wouldn't be there...


Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 551
Could it be that another table is mention?
Please post the error message again please.

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Rename old ip column on messages...done
Error!
Data truncated for column 'poster_ip_old' at row 169964

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,993
    • StoryBB/StoryBB on GitHub
So what's in that row, from the database before upgrade?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Sorry for the delay, work etc...

Looking at that row it looks fine... even the rows around it look fine?!?

Code: [Select]
169964
5369
9
1077129984
126
0
Re: UPDATED: Rush 2004 "PARTIAL" Date Li
The_Letter_R
k********@m*******.com
62.8.125.182
0
0
[quote]It's obviously EuCon '04 you daft ninny's
xx
1

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 551
give us the response of this sql code
Code: [Select]
select max(length(poster_ip)) from smf_messages

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Providing I've done it correctly...

217

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,993
    • StoryBB/StoryBB on GitHub
Then: SELECT * FROM smf_messages WHERE LENGTH(poster_ip) = 217
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.