Index: database/database.mysql =================================================================== RCS file: /cvs/drupal/drupal/database/database.mysql,v retrieving revision 1.230 diff -u -p -r1.230 database.mysql --- database/database.mysql 14 Mar 2006 14:04:13 -0000 1.230 +++ database/database.mysql 18 Mar 2006 16:55:04 -0000 @@ -385,8 +385,9 @@ CREATE TABLE locales_meta ( CREATE TABLE locales_source ( lid int(11) NOT NULL auto_increment, location varchar(255) NOT NULL default '', - source blob NOT NULL, - PRIMARY KEY (lid) + source text NOT NULL default '', + PRIMARY KEY (lid), + KEY source (source(30)) ) /*!40100 DEFAULT CHARACTER SET utf8 */ ; @@ -396,7 +397,7 @@ CREATE TABLE locales_source ( CREATE TABLE locales_target ( lid int(11) NOT NULL default '0', - translation blob NOT NULL, + translation text NOT NULL default '', locale varchar(12) NOT NULL default '', plid int(11) NOT NULL default '0', plural int(1) NOT NULL default '0', Index: database/database.pgsql =================================================================== RCS file: /cvs/drupal/drupal/database/database.pgsql,v retrieving revision 1.171 diff -u -p -r1.171 database.pgsql --- database/database.pgsql 4 Mar 2006 18:12:10 -0000 1.171 +++ database/database.pgsql 18 Mar 2006 16:55:04 -0000 @@ -361,13 +361,13 @@ CREATE TABLE locales_meta ( -- Table structure for locales_source -- - CREATE TABLE locales_source ( lid SERIAL, location varchar(255) NOT NULL default '', source text NOT NULL, PRIMARY KEY (lid) ); +CREATE INDEX locales_source_source_idx ON locales_source(source); -- -- Table structure for locales_target Index: database/updates.inc =================================================================== RCS file: /cvs/drupal/drupal/database/updates.inc,v retrieving revision 1.218 diff -u -p -r1.218 updates.inc --- database/updates.inc 12 Mar 2006 22:25:00 -0000 1.218 +++ database/updates.inc 18 Mar 2006 16:55:07 -0000 @@ -1828,3 +1828,23 @@ function system_update_178() { return array(); } + +/** + * Performance update for queries that are related to the locale.module + */ +function system_update_179() { + $ret = array(); + + switch ($GLOBALS['db_type']) { + case 'mysql': + case 'mysqli': + $ret[] = update_sql("ALTER TABLE {locales_target} CHANGE translation translation text NOT NULL default ''"); + $ret[] = update_sql("ALTER TABLE {locales_source} CHANGE source source text NOT NULL default ''"); + $ret[] = update_sql('ALTER TABLE {locales_source} ADD KEY source (source(30))'); + break; + case 'pgsql': + $ret[] = update_sql("CREATE INDEX {locales_source}_source_idx on {locales_source}(source)"); + } + + return $ret; +}