I have just upgraded from 5.22 to 6.16 (running under Mac OS X Snow Leopard) and got a lot of warnings on the semaphore and menu_router tables, like so:

user warning: Table 'bnupgrade.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /Users/me/Documents/WebSites/bn/includes/lock.inc on line 154.

and like so:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY fit DESC LIMIT 0, 1' at line 1 query: SELECT path FROM menu_router WHERE path IN () ORDER BY fit DESC LIMIT 0, 1 in /Users/me/Documents/WebSites/bn/includes/menu.inc on line 2099.

This does not seem to be a critical problem, since further down in Update #6020 there is a "create table menu_router" which has run successfully, while #6054 has a "create table semaphore", also fine. So far the site looks ok so I am continuing with the upgrade, but it is disconcerting to get these errors just the same.
I have previously done an upgrade from 5.22 to 6.15 and don't remember getting these problems (though my memory may be playing tricks)

Files: 
CommentFileSizeAuthor
#5 fix-semaphore-upgrade-errors.patch2.85 KBhunmonk
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch fix-semaphore-upgrade-errors.patch.
[ View ]

Comments

joel_guesclin’s picture

This upgrade also seems to cause a problem with books which I have noted here. I find that upgrading from D5.22 to D6.15 seems to avoid both problems.

batigolix’s picture

Version:6.16» 6.17

This error is the same when upgrading from 5.22 to 6.17. I confirm Joel's solution: first upgrade 5.22 to 6.15. Then 6.15 tot 6.17. This resolves the problem with disappearing book structures as well.

eddified’s picture

Same problems here, but I don't have the book module enabled. I suppose I'll try to upgrade to 6.15 first.

eddified’s picture

Upgrading from 5.22 to 6.17, I had the problems mentioned above. I also can confirm joel_guesclin's solution: first upgrading to 6.15, and then to 6.17, avoids the problems shown here.

hunmonk’s picture

Title:Errors upgrading from 5.22 to 6.16» semaphore table need to be created during update_fix_d6_requirements()
Version:6.17» 6.x-dev
Status:Active» Needs review
StatusFileSize
new2.85 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch fix-semaphore-upgrade-errors.patch.
[ View ]

wow, i can't believe this problem has existed for so long. still results in a scary wall of red errors when trying to upgrade from the latest 5.x.

attach patch fixes the issue by moving the creation of the semaphore table to update_fix_d6_requirements(), and having system_update_6054() check for the existence of the table before creating it. this should address the issue fully.

oadaeh’s picture

Status:Needs review» Reviewed & tested by the community

I've tested the patch on a site I was having troubles with on upgrading (currently, 5.23 -> 6.19; previously earlier versions). The patch applies cleanly, and the upgrade works as expected (except for other unrelated issues). (And my book outline shows up correctly!)

asb’s picture

sub

george@dynapres.nl’s picture

sub

Status:Reviewed & tested by the community» Needs work

The last submitted patch, fix-semaphore-upgrade-errors.patch, failed testing.

Gábor Hojtsy’s picture

Status:Needs work» Fixed

Looks great, committed, thanks.

asb’s picture

#9: The last submitted patch, fix-semaphore-upgrade-errors.patch, failed testing.
#10: Looks great, committed, thanks.

???

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jpl’s picture

Status:Closed (fixed)» Active

Reopening. The patch from comment #5 applies cleanly, but it apparently doesn't work. Upgrading from 5.23 to 6.19 with the patch applied still produces this error (four times):

user warning: Table 'testdb.semaphore' doesn't exist query: SELECT expire, value FROM semaphore WHERE name = 'menu_rebuild' in /sman/app/testdb/httpsdocs/includes/lock.inc on line 149.
jpl’s picture

Status:Active» Fixed

Closing again. The false alarm was due to variable update_d6_requirements already having been set to 1 in the test database before I applied the patch. This rendered the update.php part of the patch ineffective.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.