I received this error:

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 'SELECT uid FROM users u WHERE u.name = ws.user)' at line 1 query: UPDATE webform_submissions ws set uid = (SELECT uid FROM users u WHERE u.name = ws.user) in
/database.mysql.inc on line 172.

My site runs on MySQL version 4.0.27-standard. Could that be the problem?

Lucky I didn't have any valuable data in there, as your upgrade script continued running, as in:

Update #12

* ALTER TABLE {webform_submissions} ADD uid int(10) NOT NULL DEFAULT 0 AFTER sid
* Failed: UPDATE {webform_submissions} ws set uid = (SELECT uid FROM {users} u WHERE u.name = ws.user)
* ALTER TABLE {webform_submissions} DROP user

which means that now I don't have the 'user' column information anymore to even update my database manually ... that's pretty bad!

Comments

quicksketch’s picture

Yes, sub-queries were not available until mySQL 4.1. If you can write a better update function I'd be glad put it in there.

jonty_q’s picture

OK Hmm that could be difficult, never tried SQL where you don't have sub-queries! Not sure why my hoster chose to run with 4.0 ... :-(

For now, you should at the least put a warning in the Install or Readme that it will not work with MySql 4.0 .

quicksketch’s picture

Status: Active » Closed (won't fix)

I've posted mySQL 4.1 as a requirement on the project page. mySQL 4.1 was released 4 years ago now. I don't think that's an unacceptable requirement for a contrib module. In the worst case scenario, you can install mySQL 5 or 4.1 locally and update a dump of the database, then restore the database on the live server.