Upgraded several sites from 5.x-1.7 to 5.x-1.8 and with a couple of them the quotes_update_9 function would run until it consumed all available memory. Increasing memory in php.ini did not help, it would always run until no more memory was left.
I checked the database schema and all the changes were made, except for the more_text update. It looks like somehow that last while loop never stopped. I do not understand why.
Also checked the more_text column in the quotes_blocks table, the first row was set to empty string the rest to NULL. I did not have any of the quotes_more_N variables set, so all should have been NULL.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | quotes_install.patch | 978 bytes | nancydru |
Comments
Comment #1
nancydruHow many rows do you have in quotes_blocks? I can't imagine it would be that many. All the structure changes got made?
Comment #2
mariuss commentedYes, all the structure changes happened. Just a few rows, so it is not the number of rows for sure.
Comment #3
nancydru#324123: unrecoverable error when running update.php marked as duplicate of this.
Comment #4
nancydruCan you recreate this? If so, I'd like to give you a patch to try.
Comment #5
mariuss commentedI manually fixed both sites that had this issue.
But I guess I could reset the schema version and force an update. Or explicitly select an update. Attach the patch and I'll try.
Comment #6
nancydruOkay, here it is. This is for 5.x only.
According to the PHP manual mysql_result can be bad, so I switched to fetch_array.
Comment #7
schnippy commentedI'm having the same problem and will try installing the patch now and report on results. Here's the SQL error I'm getting from watchdog on update_9:
Duplicate column name 'more_text' query: ALTER TABLE quotes_blocks ADD COLUMN more_text VARCHAR(64) in /home/webadmin/platform/public/includes/database.mysql.inc on line 174.
Comment #8
schnippy commentedSuccess -- I applied the patch and re-ran the update.php script and it worked this time. It performed the update but returned with these five errors / warnings:
# user warning: Duplicate column name 'show_citation' query: ALTER TABLE quotes_blocks ADD COLUMN show_citation INTEGER NOT NULL DEFAULT 0 in /home/webadmin/platform/public/includes/database.mysql.inc on line 174.
# user warning: Duplicate column name 'max_length' query: ALTER TABLE quotes_blocks ADD COLUMN max_length INTEGER NOT NULL DEFAULT 0 in /home/webadmin/platform/public/includes/database.mysql.inc on line 174.
# user warning: Duplicate column name 'view_weight' query: ALTER TABLE quotes_blocks ADD COLUMN view_weight INTEGER NOT NULL DEFAULT 0 in /home/webadmin/platform/public/includes/database.mysql.inc on line 174.
# user warning: Duplicate column name 'view_text' query: ALTER TABLE quotes_blocks ADD COLUMN view_text VARCHAR(64) in /home/webadmin/platform/public/includes/database.mysql.inc on line 174.
# user warning: Duplicate column name 'more_text' query: ALTER TABLE quotes_blocks ADD COLUMN more_text VARCHAR(64) in /home/webadmin/platform/public/includes/database.mysql.inc on line 174.
I double-checked the target table structure in the install file against what I had in my database and everything matched up.
Thanks for the quick patch
Comment #9
nancydruSince you are rerunning the update that added those fields, I would expect them to be duplicates the second time unless you had restored the database. That can be ignored.
Thank you for testing this.
Comment #10
nancydruCommitted on both branches.
Comment #11
asb commentedHi,
thanks for the patch. When running from /sites/all/modules/quotes, it applies cleanly.
Running update.php after applying the patch outputs lots of warnings and failures:
and
However, re-running update.php a second time (is this safe?) outputs neither errors nor warnings.
Thanks & greetings, -asb
Comment #12
nancydruIf you re-update without restoring the database, you will get the ADD COLUMN failures because you have already added them the first time. Since they are already there, that can be ignored. I'm not sure why each of them is coming out more than once though.
Comment #13
dsp1 commentedan error like this deserves a quick release so people don't have to have this issue then there is a fix.
how about creating a 1.81 version.