← Back to team overview

mahara-contributors team mailing list archive

[Bug 1692389] Re: can't install in MariaDB 5.5.52

 

Hi Au Yeung Wai Lap,

Thank you for your bug report

Hmm, this is an interesting error - when I install Mahara on Mysql
5.7.18 it goes fine and I see in the database that the
'interaction_forum_post' table has the 'path column set to:

  `path` varchar(2048) DEFAULT NULL,

and the index for the table set to:

  KEY `inteforupost_pat_ix` (`path`(1024)),

Looking at the command that is run via mysqli_query() I see it is:

  CREATE INDEX inteforupost_pat_ix ON mh_interaction_forum_post (path)

But when I drop/add the index directly via the database I get:

  CREATE INDEX inteforupost_pat_ix ON interaction_forum_post (path);
  ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes

But if I specify key length I get:

  CREATE INDEX inteforupost_pat_ix ON interaction_forum_post (path(1024));
  Query OK

So for me my setup 'knows' that the max length is 1024 and truncates the
index length to 1024 - but I've not found where/how that is

If you need to avoid this issue you could try commenting out

            <INDEXES>
                <INDEX NAME="pathix" UNIQUE="false" FIELDS="path"/>
            </INDEXES>

in the htdocs/interaction/forum/db/install.xml file and then once Mahara
installs try adding in the index to the db directly

  CREATE INDEX inteforupost_pat_ix ON interaction_forum_post
(path(1024));

but using a value that is acceptable.

The shorter the index the less efficient it will be but it should be
fine to be 765 chars

Cheers

Robert

** Changed in: mahara
    Milestone: None => 17.10.0

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1692389

Title:
  can't install in MariaDB 5.5.52

Status in Mahara:
  New

Bug description:
  I got error when installing Mahara 
  interaction.forum	Not installed	1.2.2	Failed to upgrade.

  https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX/admin/upgrade.php
  [Mon May 22 09:49:01.760479 2017] [:error] [pid 43866] [client 137.189.62.47:31261] [DBG] f0 (lib/dml.php:157) mysqli error: [1709: Index column size too large. The maximum column size is 767 bytes.] in EXECUTE("CREATE INDEX inteforupost_pat_ix ON interaction_forum_post (path)")Command was: CREATE INDEX inteforupost_pat_ix ON interaction_forum_post (path), referer: 

  i checked the settings is already on
  innodb_file_format = BARRACUDA;
  innodb_large_prefix = ON;

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1692389/+subscriptions


References