I have found a bug in new_user_md5.php at this line:
$query = "update auth_user_md5 set
username='$username', $password_query
perms='$permlist' where user_id='$u_id'";
$db->query($query);
if ($db->affected_rows() == 0) {
....
From
http://www.php.net/manual/en/function.mysql-affected-rows.php:
"When using UPDATE, MySQL will not update columns
where the new value is the same as the old value. This
creates the possiblity that mysql_affected_rows() may not
actually equal the number of rows matched, only the
number of rows that were literally affected by the query."
I mean that the 0 comparison with $db->affected_rows()
is not enough for a correct error test.
A test with the output of mysql_errno() can fix this
problem. But it give in db_mysql.inc, at this time, not a
function to return direkt this result.
Logged In: YES
user_id=339498
My original fix for this problem appears to still be present in
db_mysql.inc(? I think - maybe ct_sql.inc?); the same theory
of operation can be adapted to this case. Unfortunately, it
triples the size of the error-checking code...