forked from science-ation/science-ation
Add a fix for new MySQL 5.1 where it doesnt truncate at 16 characters before comparing, so all our long usernames were failing (mysql internally only supports 16 characters)
This commit is contained in:
parent
c1afa5f00f
commit
79513c6d29
@ -80,6 +80,15 @@ else
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
difference between MySQL <5.1 and 5.1:
|
||||
in <5.1 in must have internall truncated it at 16 before comparing with the hard-coded 16 character database limit
|
||||
in 5.1 it doesnt truncate and compares the full string with the hardcoded 16 character limit, so all our very long usernames
|
||||
are now failing
|
||||
James - Dec 30 2010
|
||||
*/
|
||||
$DBUSER=substr($DBUSER,0,16);
|
||||
|
||||
if(!mysql_connect($DBHOST,$DBUSER,$DBPASS))
|
||||
{
|
||||
echo "<html><head><title>SFIAB ERROR</title></head><body>";
|
||||
|
Loading…
Reference in New Issue
Block a user