View Issue Details

IDProjectCategoryView StatusLast Update
0002809phplist applicationAll Otherpublic20-05-05 21:14
Reportermfischer 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version2.9.5 
Summary0002809: mysql.inc: Sql_Affected_Rows missing explicit database link
DescriptionThe function Sql_Affected_Rows is missing the explicit database
connection handler:

function Sql_Affected_Rows() {
   return mysql_affected_rows();
}

When e.g. using custom database session save handlers, it's not
guaranteed that the last opened mysql link is the one needed by this
function.

I've seen that Sql_Insert_id() has been fixed since, it would be nice if
Sql_Affected_Rows() could be fixed too.
TagsNo tags attached.

Relationships

related to 0002457 resolvedmichiel PHPList v2.9.5 release 

Activities

30-03-05 13:12

 

mysql.inc.diff (312 bytes)
--- mysql.inc-2.9.4	2005-03-30 11:07:33.000000000 +0000
+++ mysql.inc	2005-03-30 11:08:00.000000000 +0000
@@ -166,7 +166,7 @@
 }
 
 function Sql_Affected_Rows() {
-  return mysql_affected_rows();
+  return mysql_affected_rows($GLOBALS["database_connection"]);
 }
 
 function Sql_Num_Rows($result = "") {
mysql.inc.diff (312 bytes)

michiel

30-03-05 14:19

manager   ~0004063

Hmm

patching file mysql.inc
Hunk #1 FAILED at 166.
1 out of 1 hunk FAILED -- saving rejects to file mysql.inc.rej

in this case the patch is small enough to do manually, but it would be useful to diff against the CVS code instead

mfischer

30-03-05 14:59

reporter   ~0004064

I'm sorry I'm unable to do the CVS checkout. This is all I can do for this bug report, this is actually only a one-line change so I hope you're capable of doing it yourself. Thanks.

michiel

30-03-05 15:05

manager   ~0004065

Yes, in this case it's ok, but if you were to submit bigger patches, please use the cvs.

mfischer

30-03-05 15:14

reporter   ~0004066

Thanks for your accommodation. I promised I will. Cheers.

DamienMcKenna

31-03-05 05:29

manager   ~0004068

The new line should say:

return mysql_affected_rows($GLOBALS["database_connection"]);

Figured I'd save everyone the hassle.

Damien