projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
487e058
)
Make sure we don't generate MySQL index names longer than 64 characters
author
Chuck Hagenbuch
<chuck@horde.org>
Sun, 3 Oct 2010 17:40:01 +0000
(13:40 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Sun, 3 Oct 2010 17:41:47 +0000
(13:41 -0400)
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
patch
|
blob
|
history
diff --git
a/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
b/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
index
46df902
..
ae69e8e
100644
(file)
--- a/
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
+++ b/
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
@@
-367,6
+367,21
@@
class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
}
/**
+ * Get the name of the index
+ *
+ * @param string $tableName
+ * @param array $options
+ */
+ public function indexName($tableName, $options=array())
+ {
+ $indexName = parent::indexName($tableName, $options);
+ if (strlen($indexName) > 64) {
+ $indexName = substr($indexName, 0, 64);
+ }
+ return $indexName;
+ }
+
+ /**
* SHOW VARIABLES LIKE 'name'
*
* @param string $name