mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #19474
[Bug 1332373] [NEW] Make it clear what the maximum length is for $cfg->dbprefix
Public bug reported:
Bug 1326205, in which MySQL installs would error out if there was a
dbprefix present, has caused me to realize that we don't really have a
set limit on maximum dbprefix length. Obviously, setting one that's too
long, like "thisisareallyreallyreallyreallylongdbprefix" will cause the
code to crash no matter what.
It would probably be a good idea to decide on a maximum dbprefix length,
and put this into the pre-install sanity check. (It doesn't need to be
mentioned in the config-dist.php file, because most people are going to
be reasonable and use something short.)
For reference, MySQL has a limit of 64 characters for names of most
things ( http://dev.mysql.com/doc/refman/5.1/en/identifiers.html ) and
Postgres has a limit of 63 characters (because the "name" datatype is
limited to 64 characters, one of which is used for a terminating null:
http://www.postgresql.org/docs/8.3/static/datatype-character.html ).
With some quick testing, I find that in 1.10dev, the max length I can
use in mysql is 25 characters, and in postgres it's 19 characters. I'm
not sure why there's such a big difference... presumably this is due to
some objects being created in Postgres but not in MySQL?
** Affects: mahara
Importance: Low
Status: In Progress
--
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/1332373
Title:
Make it clear what the maximum length is for $cfg->dbprefix
Status in Mahara ePortfolio:
In Progress
Bug description:
Bug 1326205, in which MySQL installs would error out if there was a
dbprefix present, has caused me to realize that we don't really have a
set limit on maximum dbprefix length. Obviously, setting one that's
too long, like "thisisareallyreallyreallyreallylongdbprefix" will
cause the code to crash no matter what.
It would probably be a good idea to decide on a maximum dbprefix
length, and put this into the pre-install sanity check. (It doesn't
need to be mentioned in the config-dist.php file, because most people
are going to be reasonable and use something short.)
For reference, MySQL has a limit of 64 characters for names of most
things ( http://dev.mysql.com/doc/refman/5.1/en/identifiers.html ) and
Postgres has a limit of 63 characters (because the "name" datatype is
limited to 64 characters, one of which is used for a terminating null:
http://www.postgresql.org/docs/8.3/static/datatype-character.html ).
With some quick testing, I find that in 1.10dev, the max length I can
use in mysql is 25 characters, and in postgres it's 19 characters. I'm
not sure why there's such a big difference... presumably this is due
to some objects being created in Postgres but not in MySQL?
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1332373/+subscriptions
Follow ups
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Kristina Hoeppner, 2016-04-30
-
[Bug 1332373] A change has been merged
From: Mahara Bot, 2016-03-30
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Robert Lyon, 2016-03-30
-
[Bug 1332373] A patch has been submitted for review
From: Mahara Bot, 2016-02-12
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Aaron Wells, 2015-10-23
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Aaron Wells, 2015-04-21
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Robert Lyon, 2015-04-17
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Aaron Wells, 2014-10-20
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Kristina Hoeppner, 2014-08-23
-
[Bug 1332373] Re: Make it clear what the maximum length is for $cfg->dbprefix
From: Aaron Wells, 2014-06-20
-
[Bug 1332373] [NEW] Make it clear what the maximum length is for $cfg->dbprefix
From: Aaron Wells, 2014-06-20
References