This content has been marked as final.
Show 3 replies
-
1. Re: Different Error running nukes-installer
stiphout May 4, 2004 1:20 PM (in response to stiphout)Ok, managed to fix it myself. For any of you that have this same problem, here's the fix:
The file nukes-snapshot\sections\src\resources\mysql\setup.xml has some mysql statements that don't seem to be entirely correct. It's my guess that it works on some more forgiving installations/versions/configurations of MySQL, but it didn't on mine, so I had to change it slightly.
The pertinent statements in that xml file started out as:<statement name="sections" description="Creates Sections table"> [CDATA[ CREATE TABLE nuke_sections ( pn_secid INTEGER NOT NULL IDENTITY, pn_secname VARCHAR(40) DEFAULT '' NOT NULL, pn_image VARCHAR(50) DEFAULT '' NOT NULL ); ]] </statement> <statement name="seccont" description="Creates Sections Contents table"> [CDATA[ CREATE TABLE nuke_seccont ( pn_artid INTEGER NOT NULL IDENTITY, pn_secid INTEGER DEFAULT 0, pn_title VARCHAR(256) NOT NULL, pn_content VARCHAR(256) NOT NULL, pn_counter INTEGER DEFAULT 0 NOT NULL, pn_language VARCHAR(30) DEFAULT '' NOT NULL ); ]] </statement>
and I changed them to be this:<statement name="sections" description="Creates Sections table"> [CDATA[ CREATE TABLE nuke_sections ( pn_secid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, pn_secname VARCHAR(40) DEFAULT '' NOT NULL, pn_image VARCHAR(50) DEFAULT '' NOT NULL ); ]] </statement> <statement name="seccont" description="Creates Sections Contents table"> [CDATA[ CREATE TABLE nuke_seccont ( pn_artid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, pn_secid INTEGER DEFAULT 0, pn_title VARCHAR(255) NOT NULL, pn_content VARCHAR(255) NOT NULL, pn_counter INTEGER DEFAULT 0 NOT NULL, pn_language VARCHAR(30) DEFAULT '' NOT NULL ); ]] </statement>
Essentially, the problem was twofold: 1st, the IDENTITY keyword is not really a MySQL keyword, but some versions of MySQL honor it as a synonym for "AUTO_INCREMENT PRIMARY KEY"
2nd, VARHCHAR's have a max size of 255, so I chopped off a byte and called it 255 instead of 256. This might cause a bug if the system is validating on 256, so an extra character that was permitted to be typed in might not get saved. Worth looking into for the release, I'd say, but not a big deal for me.
Anyway, hope this helps!!! -
2. Re: Different Error running nukes-installer
sgwood May 4, 2004 1:39 PM (in response to stiphout)
I'll wind these into CVS.
Sherman -
3. Re: Different Error running nukes-installer
sgwood May 4, 2004 1:43 PM (in response to stiphout)
I also made pn_content be a TEXT column.
Sherman