statistics and filter with group by didn't work

MySQL 5.7 in Ubuntu 16.04 has ONLY_FULL_GROUP_BY enabled
as default but cqrlog uses group by like it was in previous
versions of MySQL
This commit is contained in:
ok2cqr 2016-05-01 06:55:53 +02:00
parent 5fbe796bd6
commit 7c8450623b
2 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Legend:
- fixed "TApplication.HandleException TControl.InvalidatePreferredSize loop"
- frequency memories didn't switch between AM and FM when radio is on USB or LSB - fixed
- bandmap didn't show CW spots when radio was in CWR mode - fixed
- statistics and filter with group by didn't work on MySQL 5.7 - fixed
2.0.0 (2016-04-20)
+ program should work also with MariaDB 10.1

View File

@ -520,6 +520,8 @@ begin
end;
function TdmData.OpenConnections(host,port,user,pass : String) : Boolean;
var
sql : String;
begin
Result := True;
@ -568,6 +570,14 @@ begin
LogUploadCon.Connected := True;
BandMapCon.Connected := True;
RbnMonCon.Connected := True;
sql := 'SET SESSION sql_mode=(SELECT REPLACE(@@sql_mode,'+QuotedStr('ONLY_FULL_GROUP_BY')+','+QuotedStr('')+'));';
MainCon.ExecuteDirect(sql);
dbDXC.ExecuteDirect(sql);
LogUploadCon.ExecuteDirect(sql);
BandMapCon.ExecuteDirect(sql);
RbnMonCon.ExecuteDirect(sql)
except
on E : Exception do
begin