Incorrect found_row() result in version 3.5.15 vs 2.8

Incorrect found_row() result in version 3.5.15 vs 2.8

Postby jboduch » Wed 13 Dec 2006 17:14

We recently bought MySQLDirect.NET 3.50.15 professional for one of our web projects. After testing the driver we found a certain query always returns 0 for found_rows() when using SQL_CALC_FOUND_ROWS, the actual value should be 2.

Here is the query we are running

SELECT SQL_CALC_FOUND_ROWS file_size, a.content_extension, a.asset_id, a.asset_type_id, a.name, a.short_description, a.created_date, a.asset_rating_id, a.amount, at.name as asset_type_name, a.publish_status_id, a.status_id, a.run_time_seconds, a.owner_id, a.owner_id as user_id, a.owner_username, a.owner_username as username, a.teaser, a.keywords, a.permission, a.permission_group, a.thumbnail_medium_path, a.thumbnail_gen
FROM assets a INNER JOIN asset_channels ac ON a.asset_id = ac.asset_id
INNER JOIN asset_types at ON a.asset_type_id = at.asset_type_id
WHERE ac.channel_id = @channelId
AND a.owner_id <> @userId
ORDER BY ac.created_date DESC


then immediately without closing the connection we are issueing

SELECT found_rows()


One interesting thing is if I install the 2.8 version of the driver the correct found_rows() vlaue is returned with the same code. It is only with the 3.50.15 driver I get the incorrect found_rows value of 0 everytime. Also if I run the query though MySQL Query Browser there are no issues.

Please let me know if you need additional information to help figure out this issue.

Jason
Last edited by jboduch on Thu 14 Dec 2006 12:56, edited 3 times in total.
jboduch
 
Posts: 1
Joined: Wed 13 Dec 2006 16:53

Postby Alexey » Thu 14 Dec 2006 07:25

Please provide the definitions of your database objects.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for MySQL