* 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 'ADD INDEX nid (nid)' at line 1 query: ALTER TABLE ADD INDEX nid (nid) in /home/www/Drupal6/includes/database.mysql-common.inc on line 434.
* warning: Division by zero in /home/www/Drupal6/sites/all/modules/cck/content.install on line 343.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | content.install.txt | 14.26 KB | yched |
Comments
Comment #1
rhlowe commentedMonitoring
Comment #2
jimsmith commentedI got that one too.
My version of MySQL: 5.0.67
Comment #3
hideo commentedsame result
just moved to 6.4,
updated calendar and date at same time as this module
hosted on dreamhost, mysql 5.0.67 & php5 (if that helps)
Comment #4
pobster commentedYeah the
tablein my query is blank too, does anyone know what content table the update is trying to change? I just wanted to do it manually so I don't have to restore my site to a previous version...Pobster
Comment #5
yched commentedCrap. Looks like I forgot a few edge cases in that update.
Sorry about that. At any rate, these errors won't cause any data loss.
AFAICT, these errors should only happen if there are no actual cck field on any of the site's content types.
To anyone seeing this :
- can you confirm that your site doesn't have any cck field ?
- can you specify which version you upgraded from ? CCK D6 RC4 ? or straight from a D5 site ?
Please
- replace content.install with attached file (remove the .txt extension in the filename),
- re-run the updates from update 6004
- and tell me the results.
Comment #6
ElonNarai commentedSame issue, but I have
user warning: Table 'SITENAME_drupal.drupal_' doesn't exist query: ALTER TABLE drupal_ ADD INDEX nid (nid) in /home/.gaelicize/USERNAME/SITENAME/includes/database.mysql-common.inc on line 434.as first warning (second warning is the same). It's the exact same SQL query that causes the problem but the warning returned by SQL is a bit more.I have dived a bit further and from "content.install" I have found out that it tries to "Index the 'nid' column on data tables to optimize node deletion." If I look at the code on line 343
$ret['#finished'] = 1 - count($sandbox['tables']) / $sandbox['count'];which causes a division through zero.
$sandbox['count']; is count($sandbox['tables']);before inside an if statement, which can mean two things:1. If statement is not executed
2. or
count($sandbox['tables']);was zero which in that case it means there were no tables to update or the SQL query to select those tables were wrong.From the rest what I have read it seems as if the update assumes I have CCK entries, which is not. And tries to update the tables related to CCK entries (which would be none).
If anyone could confirm my train of thoughts (or just fix the problem ;) ) I would really like it.
Since I'm not using it I will just disable the module and wait for the next update.
Comment #7
ElonNarai commentedNo, CCK fields
Drupal 6.4
RESULT: Better, but still an error
user warning: Duplicate column name 'locked' query: ALTER TABLE drupal_content_node_field ADD `locked` TINYINT DEFAULT 0 in /home/.gaelicize/USERNAME/SITENAME/includes/database.mysql-common.inc on line 298.Hope this helps.
Comment #8
yched commentedElonNarai : see my comment #5 above (we probably cross-posted)
Comment #9
yched commentedElonNarai : The "Duplicate column name 'locked'" error is normal, it's because update 6005 has run twice.
Everything is now OK on your site.
I still welcome feedback from other people that have reported here.
Comment #10
ElonNarai commentedyched: I can't really check since I haven't had time to start using CCK but since there are no more errors, and everything is explained, I will simply assume that it is fixed.
Anyway, you did a great job fixing, thanks.
And yes, we cross posted (I did check, but then I decided to alter a few things, apparently I needed almost ten minutes for ~_~)
Comment #11
yched commentedmore explicit title.
Comment #12
hideo commentedyes, all correct on the assumptions that there weren't yet any CCK fields, just began building the site yesterday.
and yes, i'm (99%) certain that it was upgraded from RC4 (i'd say 100%, but i have no hard proof, like old downloads still around), but it must have been rc4 as it's a brand new install.
also, all correct on the 6004 update, and yes, i also had the 'duplicate locked' error. So all is fine with me.
thankyou very much for the speedy help (and my first bug report wasn't as scary as I thought it would be)
Comment #13
yched commentedI committed the fix and released the RC6 hotfix release, to prevent further people from getting those scary messages :-(.
To anyone that might have seen those:
You can overlook these errors, your site is OK, and everything that needed to be updated has been updated.
Comment #14
tinou commentedI'm in the same situation as ElonNarai, except that I use PostgreSQL.
- started off with drupal-6.4, have not yet used CCK, but upgraded it to -rc5 as it was available.
- ran into the empty table instruction error.
- replaced "content.install" with the file above
- ran update 6004 and got the warning
- checked that the column "locked" has been created on table node_content_field: positive.
Very good. Thanks !
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.