From 1ec75a24469bb54f68e66402f492c716cf1d7ee7 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Fri, 12 Aug 2005 02:31:34 +0000 Subject: [PATCH] Merged from MOODLE_15_STABLE - Temp table now matches idnumber length with username - thanks to Yves Roy for pointing this out. --- auth/ldap/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/ldap/lib.php b/auth/ldap/lib.php index 53c701abc6b..8bd3dd3a688 100644 --- a/auth/ldap/lib.php +++ b/auth/ldap/lib.php @@ -383,10 +383,10 @@ function auth_sync_users ($bulk_insert_records = 1000, $do_updates=1) { if(strtolower($CFG->dbtype) === 'mysql'){ // help old mysql versions cope with large temp tables execute_sql('SET SQL_BIG_TABLES=1', false); - execute_sql('CREATE TEMPORARY TABLE ' . $CFG->prefix .'extuser (idnumber VARCHAR(12), PRIMARY KEY (idnumber)) TYPE=MyISAM',false); + execute_sql('CREATE TEMPORARY TABLE ' . $CFG->prefix .'extuser (idnumber VARCHAR(64), PRIMARY KEY (idnumber)) TYPE=MyISAM',false); } elseif (strtolower($CFG->dbtype) === 'postgres7'){ $bulk_insert_records = 1; // no support for multiple sets of values - execute_sql('CREATE TEMPORARY TABLE '.$CFG->prefix.'extuser (idnumber VARCHAR(12), PRIMARY KEY (idnumber))',false); + execute_sql('CREATE TEMPORARY TABLE '.$CFG->prefix.'extuser (idnumber VARCHAR(64), PRIMARY KEY (idnumber))',false); }