Lines 165-171
type
Link Here
|
165 |
function GetMySQLLib : String; |
165 |
function GetMySQLLib : String; |
166 |
function GetDebugLevel : Integer; |
166 |
function GetDebugLevel : Integer; |
167 |
|
167 |
|
168 |
procedure CreateDBConnections; |
168 |
procedure CreateDBConnections(const SkipLibraryVersionCheck : Boolean = False); |
169 |
procedure CreateViews; |
169 |
procedure CreateViews; |
170 |
procedure PrepareBandDatabase; |
170 |
procedure PrepareBandDatabase; |
171 |
procedure PrepareDXClusterDatabase; |
171 |
procedure PrepareDXClusterDatabase; |
Lines 1069-1074
var
Link Here
|
1069 |
c : TConnectionName; |
1069 |
c : TConnectionName; |
1070 |
MySQLVer : String; |
1070 |
MySQLVer : String; |
1071 |
param : String; |
1071 |
param : String; |
|
|
1072 |
SkipLibraryVersionCheck : Boolean = False; |
1072 |
begin |
1073 |
begin |
1073 |
InitCriticalSection(csPreviousQSO); |
1074 |
InitCriticalSection(csPreviousQSO); |
1074 |
cqrini := nil; |
1075 |
cqrini := nil; |
Lines 1108-1117
begin
Link Here
|
1108 |
Writeln('**************************') |
1109 |
Writeln('**************************') |
1109 |
end; |
1110 |
end; |
1110 |
|
1111 |
|
1111 |
if MySQLVer = '10.' then |
1112 |
case MySQLVer of |
1112 |
MySQLVer := '5.6'; |
1113 |
'5.1', '5.2', '5.3', '5.4' : MySQLVer := '5.1'; |
1113 |
if MySQLVer = '10.1' then |
1114 |
'5.5' : MySQLVer := '5.5'; |
1114 |
MySQLVer := '5.7' |
1115 |
'5.6' : MySQLVer := '5.6'; |
|
|
1116 |
'10.' : MySQLVer := '5.6'; |
1117 |
else |
1118 |
// use latest available TMySQL component and disable library version check |
1119 |
// to allow yet unknown versions |
1120 |
MySQLVer := '5.7'; |
1121 |
SkipLibraryVersionCheck := True |
1122 |
end; |
1115 |
|
1123 |
|
1116 |
except |
1124 |
except |
1117 |
on E : Exception do |
1125 |
on E : Exception do |
Lines 1132-1141
begin
Link Here
|
1132 |
begin |
1140 |
begin |
1133 |
Writeln('**********************************'); |
1141 |
Writeln('**********************************'); |
1134 |
Writeln('MySQL version assigned: ',FloatToStr(fMySQLVersion)); |
1142 |
Writeln('MySQL version assigned: ',FloatToStr(fMySQLVersion)); |
|
|
1143 |
if SkipLibraryVersionCheck then |
1144 |
begin |
1145 |
Writeln('No suitable TMySQL class for used MySQL client library available, library version check disabled'); |
1146 |
end; |
1135 |
Writeln('**********************************') |
1147 |
Writeln('**********************************') |
1136 |
end; |
1148 |
end; |
1137 |
|
1149 |
|
1138 |
CreateDBConnections; |
1150 |
CreateDBConnections(SkipLibraryVersionCheck); |
1139 |
|
1151 |
|
1140 |
MainCon.KeepConnection := True; |
1152 |
MainCon.KeepConnection := True; |
1141 |
MainCon.Transaction := trmQ; |
1153 |
MainCon.Transaction := trmQ; |
Lines 4164-4170
begin
Link Here
|
4164 |
end |
4176 |
end |
4165 |
end; |
4177 |
end; |
4166 |
|
4178 |
|
4167 |
procedure TdmData.CreateDBConnections; |
4179 |
procedure TdmData.CreateDBConnections(const SkipLibraryVersionCheck: Boolean = False); |
4168 |
begin |
4180 |
begin |
4169 |
if fMySQLVersion < 5.5 then |
4181 |
if fMySQLVersion < 5.5 then |
4170 |
begin |
4182 |
begin |
Lines 4172-4186
begin
Link Here
|
4172 |
BandMapCon := TMySQL51Connection.Create(self); |
4184 |
BandMapCon := TMySQL51Connection.Create(self); |
4173 |
RbnMonCon := TMySQL51Connection.Create(self); |
4185 |
RbnMonCon := TMySQL51Connection.Create(self); |
4174 |
LogUploadCon := TMySQL51Connection.Create(self); |
4186 |
LogUploadCon := TMySQL51Connection.Create(self); |
4175 |
dbDXC := TMySQL51Connection.Create(self) |
4187 |
dbDXC := TMySQL51Connection.Create(self); |
|
|
4188 |
|
4189 |
if SkipLibraryVersionCheck then |
4190 |
begin |
4191 |
TMySQL51Connection(MainCon).SkipLibraryVersionCheck := True; |
4192 |
TMySQL51Connection(BandMapCon).SkipLibraryVersionCheck := True; |
4193 |
TMySQL51Connection(RbnMonCon).SkipLibraryVersionCheck := True; |
4194 |
TMySQL51Connection(LogUploadCon).SkipLibraryVersionCheck := True; |
4195 |
TMySQL51Connection(dbDXC).SkipLibraryVersionCheck := True |
4196 |
end |
4176 |
end |
4197 |
end |
4177 |
else if fMySQLVersion < 5.6 then |
4198 |
else if fMySQLVersion < 5.6 then |
4178 |
begin |
4199 |
begin |
4179 |
MainCon := TMySQL55Connection.Create(self); |
4200 |
MainCon := TMySQL55Connection.Create(self); |
4180 |
BandMapCon := TMySQL55Connection.Create(self); |
4201 |
BandMapCon := TMySQL55Connection.Create(self); |
4181 |
RbnMonCon := TMySQL55Connection.Create(self); |
4202 |
RbnMonCon := TMySQL55Connection.Create(self); |
4182 |
LogUploadCon := TMySQL55Connection.Create(self); |
4203 |
LogUploadCon := TMySQL55Connection.Create(self); |
4183 |
dbDXC := TMySQL55Connection.Create(self) |
4204 |
dbDXC := TMySQL55Connection.Create(self); |
|
|
4205 |
|
4206 |
if SkipLibraryVersionCheck then |
4207 |
begin |
4208 |
TMySQL55Connection(MainCon).SkipLibraryVersionCheck := True; |
4209 |
TMySQL55Connection(BandMapCon).SkipLibraryVersionCheck := True; |
4210 |
TMySQL55Connection(RbnMonCon).SkipLibraryVersionCheck := True; |
4211 |
TMySQL55Connection(LogUploadCon).SkipLibraryVersionCheck := True; |
4212 |
TMySQL55Connection(dbDXC).SkipLibraryVersionCheck := True |
4213 |
end |
4184 |
end |
4214 |
end |
4185 |
else begin |
4215 |
else begin |
4186 |
if fMySQLVersion < 5.7 then |
4216 |
if fMySQLVersion < 5.7 then |
Lines 4189-4202
begin
Link Here
|
4189 |
BandMapCon := TMySQL56Connection.Create(self); |
4219 |
BandMapCon := TMySQL56Connection.Create(self); |
4190 |
RbnMonCon := TMySQL56Connection.Create(self); |
4220 |
RbnMonCon := TMySQL56Connection.Create(self); |
4191 |
LogUploadCon := TMySQL56Connection.Create(self); |
4221 |
LogUploadCon := TMySQL56Connection.Create(self); |
4192 |
dbDXC := TMySQL56Connection.Create(self) |
4222 |
dbDXC := TMySQL56Connection.Create(self); |
|
|
4223 |
|
4224 |
if SkipLibraryVersionCheck then |
4225 |
begin |
4226 |
TMySQL56Connection(MainCon).SkipLibraryVersionCheck := True; |
4227 |
TMySQL56Connection(BandMapCon).SkipLibraryVersionCheck := True; |
4228 |
TMySQL56Connection(RbnMonCon).SkipLibraryVersionCheck := True; |
4229 |
TMySQL56Connection(LogUploadCon).SkipLibraryVersionCheck := True; |
4230 |
TMySQL56Connection(dbDXC).SkipLibraryVersionCheck := True |
4231 |
end |
4193 |
end |
4232 |
end |
4194 |
else begin |
4233 |
else begin |
4195 |
MainCon := TMySQL57Connection.Create(self); |
4234 |
MainCon := TMySQL57Connection.Create(self); |
4196 |
BandMapCon := TMySQL57Connection.Create(self); |
4235 |
BandMapCon := TMySQL57Connection.Create(self); |
4197 |
RbnMonCon := TMySQL57Connection.Create(self); |
4236 |
RbnMonCon := TMySQL57Connection.Create(self); |
4198 |
LogUploadCon := TMySQL57Connection.Create(self); |
4237 |
LogUploadCon := TMySQL57Connection.Create(self); |
4199 |
dbDXC := TMySQL57Connection.Create(self) |
4238 |
dbDXC := TMySQL57Connection.Create(self); |
|
|
4239 |
|
4240 |
if SkipLibraryVersionCheck then |
4241 |
begin |
4242 |
TMySQL57Connection(MainCon).SkipLibraryVersionCheck := True; |
4243 |
TMySQL57Connection(BandMapCon).SkipLibraryVersionCheck := True; |
4244 |
TMySQL57Connection(RbnMonCon).SkipLibraryVersionCheck := True; |
4245 |
TMySQL57Connection(LogUploadCon).SkipLibraryVersionCheck := True; |
4246 |
TMySQL57Connection(dbDXC).SkipLibraryVersionCheck := True |
4247 |
end |
4200 |
end |
4248 |
end |
4201 |
end |
4249 |
end |
4202 |
end; |
4250 |
end; |