Bug #1193 possible issue with mysqlclient in 4.0.14
Submitted: 4 Sep 2003 5:24 Modified: 4 Oct 2003 6:55
Reporter: andre watts Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.14 OS:Linux (Slackware 9.0)
Assigned to: CPU Architecture:Any

[4 Sep 2003 5:24] andre watts
Description:
I will be brief I am posting here first.  A particular query run using PHP 4.3.3 yields the wrong value with MySQL 4.0.14 using the 4.0.14 MySQLclient.  However, it will yield the CORRECT result when it is querying a 4.0.12 MySQL server still using the client that came with MySQL 4.0.14.

Even more perplexing is that the same query using the MySQL 4.0.12 client yields the same wrong result when querying the 4.0.14 database.  This was tested using php 4.1, 4.2, 4.3.1, and 4.3.3.  If I can provide any more information I will be happy to assist.

It is also not every record in a result set, it is just a few. 

How to repeat:
<?
	// connect to the database, choose the table

	$link = mysql_connect("localhost", "admin", "") or die(mysql_error());
	mysql_select_db("central") or die(mysql_error());
	?>
<?
$dlcredithour = 0;
$enrollmenttot = 0;
$tresult = mysql_query("SELECT * FROM class_info where class_term_cd = '1190'") or die(mysql_error());
while ($tarr = mysql_fetch_array($tresult)) {
	if ($tarr[CLASS_INSTRUCTION_MODE] == MT) {
			
		$enrollmenttot = $enrollmenttot + $tarr[CLASS_ENRL_TOT];
		echo "$tarr[CLASS_SECTION] $tarr[CLASS_ENRL_TOT]<BR>";
	}
	}
echo "$dlcredithour, $enrollmenttot";
?>
[4 Sep 2003 6:55] Indrek Siitan
Do I understand you correctly that querying the 4.0.14 database with any
mysqlclient (including the one bundled with 4.0.14) will yield the wrong
results?

Would it be possible for you to upload the dump of the table in question
here, along with the expected, and wrong result received?
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".