11
ghia
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?
  • 2009/3/15 7:21

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Open /sql/mysql.sql with an editor eg Notepad.
Change
KEY
 cl_sortkey
(cl_to,cl_sortkey),

to
KEY
 cl_sortkey
(cl_to (240),cl_sortkey),

Save and upload.
Install the module.

12
sailjapan
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

... that's the file I was looking for, but it's not there, neither is the directory /sql

Never let a man who does not believe something can be done, talk to a man that is doing it.

13
Mamba
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?
  • 2009/3/15 8:41

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


The only sql files that contain "cl_sortkey(cl_to,cl_sortkey),", is "Tables.sql" in:

modules\mediawiki\maintenance\Mysql5\
modules\mediawiki\maintenance\
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

14
sailjapan
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

No joy

Error message on install:

Quote:
Query "CREATE TABLE `xxxx_mediawiki_categorylinks` ( cl_from int(8) unsigned NOT NULL default '0', cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(86) binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey), KEY cl_timestamp(cl_to,cl_timestamp) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1000 bytes (localhost)".


Error message displayed on modules/mediawiki/index.php:

Quote:
A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "MediaWikiBagOStuff::_doquery". MySQL returned error "1146: Table 'xxxxx_2311stdb.xxxx_mediawiki_objectcache' doesn't exist (localhost)".

Retrieved from "http://silverinnovations.com/modules/mediawiki/index.php/Special:Error"


Any other ideas? Like, is it possible to alter these sql tables via phpAdmin?
Never let a man who does not believe something can be done, talk to a man that is doing it.

15
dbman
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?
  • 2009/3/15 14:27

  • dbman

  • Friend of XOOPS

  • Posts: 172

  • Since: 2005/4/28


This is a MySQL bug (http://bugs.mysql.com/bug.php?id=4541). It's been on the buglist at MySQL since 2004 so no fix is imminent. By changing the key size to 120 from 240 I was able to install locally. I am not sure what impact this has on the sort key though.

16
ghia
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?
  • 2009/3/15 20:53

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
that's the file I was looking for, but it's not there, neither is the directory /sql

Seems MediaWiki is a derived module and uses not the standard XOOPS layout.
Quote:
No joy
Error message on install:
From your error message it is obvious that the required modification edit was not done or you missed a file:
/maintenance/FiveUpgrade.inc
/maintenance/tables.sql
/maintenance/archives/patch-categorylinks.sql
/maintenance/mysql5/tables.sql
Quote:
This is a MySQL bug
It is not a bug, but a limitation.
Quote:
By changing the key size to 120 from 240 I was able to install locally.
Was it needed to go that low? I assumed (240+86)*3 < 1000 would cut it.

Anyway the author has foreseen this problem and says:
Quote:
-- For MySQL 4.1with charset set to utf8the sort key *index*
  -- 
needs cut to be smaller than 1024 bytes (at 3 bytes per char).
  -- 
To sort properly on the shorter keythis field needs to be
  
-- the same shortness.
  
cl_sortkey varchar(86binary NOT NULL default '',
But it seems he tought 1024 was allowed, but from the error message, the limit is only 1000 which means you should change the 86 to 78 in the line here above in all the listed files. (And forget about my initial suggestion for the fix.)


17
sailjapan
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

Thanks to both of you for your ideas. I have a couple of comments, first, which file are you referring to when you mention the change to 78 above, Ghia. mysql/tables.sql ? or are there more?

Next, I seem to remember somewhere that sql5 doesn't permit empty 'values'

cl_sortkey varchar(86) binary NOT NULL default '',

would have to become

cl_sortkey varchar(86) binary NOT NULL default '0',

Is that right, or have I got that wrong?

Many thanks again.

Crip
Never let a man who does not believe something can be done, talk to a man that is doing it.

18
ghia
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?
  • 2009/3/15 23:23

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
or are there more?
The four files in the list in the middle of my previous post.
Quote:
Next, I seem to remember somewhere that sql5 doesn't permit empty 'values'
That was the case for integer types. For binary, I'm not sure. Try first unmodified and if install complains about it, I would rather change it to:
cl_sortkey varchar(78binary NOT NULL,
or maybe
cl_sortkey varchar(78binary NOT NULL default ' ',


Edited: incorporated good length in example for default.

19
Catzwolf
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?
  • 2009/3/15 23:59

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


MySQL 5 does not support default values for columns of type text and binary.

20
sailjapan
Re: Is Mediawiki 1.71 working with Xoops 2.3 RC2?

hmm, I made the changes to the four files Ghia recommended, changing all found examples to
Quote:
cl_sortkey varchar(86) binary NOT NULL,
(noting catz's comment about defaults.

still churning out backend errors.

Quote:
Query "CREATE TABLE `xxxx_mediawiki_categorylinks` ( cl_from int(8) unsigned NOT NULL default '0', cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(86) binary NOT NULL, cl_timestamp timestamp NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey), KEY cl_timestamp(cl_to,cl_timestamp) ) TYPE=InnoDB " failed with error code "Specified key was too long; max key length is 1000 bytes (localhost)".


and userside error as follows:
Quote:

A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

(SQL query hidden)

from within function "MediaWikiBagOStuff::_doquery". MySQL returned error "1146: Table 'xxxxxx_2311stdb.xxxx_mediawiki_objectcache' doesn't exist (localhost)".


Hope I'm not tying up too much of your time in this season of 2.3.3 final

Cheers as always.

Crip
Never let a man who does not believe something can be done, talk to a man that is doing it.

Login

Who's Online

246 user(s) are online (155 user(s) are browsing Support Forums)


Members: 0


Guests: 246


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits