Fix rowcount statistics for pre-4.0 servers.

See also: http://www.heidisql.com/forum/viewtopic.php?p=1046#1046
This commit is contained in:
Ansgar Becker
2007-07-07 11:16:47 +00:00
parent 028aa65b72
commit 1e6b065015

View File

@@ -1742,12 +1742,16 @@ begin
@see TZMySQLResultSet:Create
@see TZMySQLResultSet:Open
}
if (
( mysql_version >= 40000 ) and
( Trim( SynMemoFilter.Text ) <> '' )
) then
if Trim( SynMemoFilter.Text ) <> '' then
begin
rows_matching := StrToInt64Def(GetVar('SELECT @found_rows'), 0);
if mysql_version >= 40000 then
begin
rows_matching := StrToInt64Def(GetVar('SELECT @found_rows'), 0);
end
else
begin
rows_matching := ActiveGrid.DataSource.DataSet.RecordCount;
end;
end
else
begin
@@ -1764,7 +1768,6 @@ begin
end;
if (
( mysql_version >= 40000 ) and
( rows_matching = rows_total ) and
( Trim( SynMemoFilter.Text ) <> '')
) then