Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade database from 2.0 fail #6082

Closed
gayratv opened this issue Apr 24, 2020 · 9 comments
Closed

Upgrade database from 2.0 fail #6082

gayratv opened this issue Apr 24, 2020 · 9 comments
Labels

Comments

@gayratv
Copy link

gayratv commented Apr 24, 2020

Description

--Converting legacy attachments smf_attachments--

Steps to reproduce

  1. php upgrade.php (cli mode)
  2. Enable query log
  3. More > 300 000 records in smf_attachments
  4. during step "Converting legacy attachments"
    I'm see sql query to smf_attachments with subset from .. to
    In my case queries stopped at 185 000 records.

I'm fix it : temporary delete 230 000 records.

Environment (complete as necessary)

  • Version/Git revision: 2.1.RC2
  • Database Type: MySQL
  • Database Version: 8
  • PHP Version: 7.3

Additional information/references

Windows 10, openserver, apache

@sbulen
Copy link
Contributor

sbulen commented Apr 24, 2020

Was there any specific error message?
In the SMF log?
In any server or Apache log?

@gayratv
Copy link
Author

gayratv commented Apr 25, 2020

My steps was described at this topic:
https://www.simplemachines.org/community/index.php?topic=572888.0

I'm have working SMF forum at SMF 2.015
I made database backup (about 5gb uncompressed)
Next :

  1. restore backup on my local windwos machine - openserver

  2. download 2.017 fresh installation from SMF

  3. run install

  4. run recovery_settings, entered the necessary settings

  5. in admin install russuain UTF-8 language

  6. download and install any theme, compatible with 2.17
    -- forum work at 2.017 on local machine

  7. download 2.1RC2 from smf

  8. in google chrome run upgrade.php

wait for a long time in step:

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: "Changing column names." (1 of 42)

I'm enable query log for all queries and see infinite loop :

Connect root@localhost on using TCP/IP
Init DB woodtools
Query SET NAMES utf8

Query SELECT variable, value FROM smf_settings

Query SELECT variable, value
FROM smf_themes
WHERE id_theme = 1
AND variable IN ('theme_url', 'theme_dir', 'images_url')

Next I'm run php upgrade.php from console.
I'm see all sql querys at MySQL log file

was a big loop at step:
"Converting legacy attachments"
sorry, I'm not store log but I'm see querys like this:
SELECT * FROM smf_attachments WHERE id_attach between 1 and 100

I'm have about 300 000 records in my table, but loop stop at 185 000
I'm don't see any error in console - script stop working.

I'm have old database backup
I can clear members data and share it to you

@jdarwood007
Copy link
Member

Are the attachments missing?

@gayratv
Copy link
Author

gayratv commented Apr 25, 2020

After I'm delete 230 000 records - upgrade step on attachments pass

@sbulen
Copy link
Contributor

sbulen commented Apr 27, 2020

The upgrader would have continued processing the attachments if it was restarted.

@sbulen
Copy link
Contributor

sbulen commented Apr 27, 2020

I have no idea ehat would have caused it to stop. No errors? It just stopped?

@gayratv
Copy link
Author

gayratv commented Apr 27, 2020

The upgrader would have continued processing the attachments if it was restarted.

Antes wrote:

Copy following files and run upgrade.php again (via CLI)

upgrade.php
upgrade-helper.php
upgrade_2-0_mysql.sql
upgrade_2-1_mysql.sql

I'm do this steps several times :) (about 10- 20 times)

Yes, upgrader just stopped.
No error.
I'm try to debug upgrader and don't understand why it's stopped

@MissAllSunday
Copy link
Contributor

Is this related to #6085? As in, can it be merged?

@MissAllSunday
Copy link
Contributor

Will close in favor of #6085

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants