summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Ryan2011-02-05 21:03:33 (GMT)
committer Mike Ryan2011-02-05 21:03:33 (GMT)
commitb5af16445090623cb2954541a96545e6f1add34c (patch)
treea48c66801d8b4a6d490e0789ade1f954e29bce30
parent0b3e8679332571f031d08b7184cbecd68d688b9f (diff)
#1027468 by mikeryan: Limit map/message table name lengths
-rw-r--r--CHANGELOG.txt3
-rw-r--r--plugins/sources/sqlmap.inc4
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d5b5973..3872ecf 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -12,7 +12,8 @@ Features and enhancements
Let a node migration set node_revisions.uid. That's the 'last edited by' user
Bug fixes
-- #1045646 - Handle PHP memory_limit of -1
+- #1027468 - Limit map/message table name lengths.
+- #1045646 - Handle PHP memory_limit of -1.
- #1050348 - Check map table existence in correct DB.
- #1028824 - Errors during registry rebuild trigger fatal error.
Fix highwater handling to deal with duplicate values.
diff --git a/plugins/sources/sqlmap.inc b/plugins/sources/sqlmap.inc
index c49d71f..148ecf5 100644
--- a/plugins/sources/sqlmap.inc
+++ b/plugins/sources/sqlmap.inc
@@ -51,9 +51,11 @@ class MigrateSQLMap extends MigrateMap {
public function __construct($machine_name, array $source_key,
array $destination_key, $connection_key = 'default') {
- // Default generated table names
+ // Default generated table names, limited to 63 characters
$this->mapTable = 'migrate_map_' . drupal_strtolower($machine_name);
+ $this->mapTable = substr($this->mapTable, 0, 63);
$this->messageTable = 'migrate_message_' . drupal_strtolower($machine_name);
+ $this->messageTable = substr($this->messageTable, 0, 63);
$this->sourceKey = $source_key;
$this->destinationKey = $destination_key;
$this->connection = Database::getConnection('default', $connection_key);