mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-27 12:10:09 +02:00
fcl-db: tests: improve TestSQLInterval + comments
(MySQL ODBC driver does not correctly handles TIME values >= '100:00:00') git-svn-id: trunk@23112 -
This commit is contained in:
parent
b36aa216e5
commit
a49dc1d262
@ -187,7 +187,7 @@ begin
|
|||||||
AFld3.FieldName := 'CALCFLD';
|
AFld3.FieldName := 'CALCFLD';
|
||||||
AFld3.DataSet := ds;
|
AFld3.DataSet := ds;
|
||||||
Afld3.FieldKind := fkCalculated;
|
Afld3.FieldKind := fkCalculated;
|
||||||
AFld3.ProviderFlags := [];
|
AFld3.ProviderFlags := []; // do not include calculated fields into generated sql insert/update
|
||||||
|
|
||||||
Open;
|
Open;
|
||||||
Edit;
|
Edit;
|
||||||
@ -1912,7 +1912,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var testIntervalValuesCount: integer;
|
var testIntervalValuesCount: integer;
|
||||||
const testIntervalValues: array[0..4] of shortstring = ('00:00:00.000','00:00:01.000','23:59:59.000','838:59:59.000','1000:00:00.000');
|
const testIntervalValues: array[0..5] of shortstring = ('00:00:00.000','00:00:01.000','23:59:59.000','99:59:59.000','838:59:59.000','1000:00:00.000');
|
||||||
// Placed here, as long as bug 18702 is not solved
|
// Placed here, as long as bug 18702 is not solved
|
||||||
function TestSQLInterval_GetSQLText(const a: integer) : string;
|
function TestSQLInterval_GetSQLText(const a: integer) : string;
|
||||||
begin
|
begin
|
||||||
@ -1934,7 +1934,7 @@ begin
|
|||||||
if SQLConnType = postgresql then
|
if SQLConnType = postgresql then
|
||||||
begin
|
begin
|
||||||
datatype:='INTERVAL';
|
datatype:='INTERVAL';
|
||||||
testIntervalValuesCount := 5;
|
testIntervalValuesCount := 6;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -1942,9 +1942,10 @@ begin
|
|||||||
if datatype = '' then
|
if datatype = '' then
|
||||||
Ignore(STestNotApplicable);
|
Ignore(STestNotApplicable);
|
||||||
if SQLServerType = ssSQLite then
|
if SQLServerType = ssSQLite then
|
||||||
testIntervalValuesCount := 5
|
testIntervalValuesCount := 6
|
||||||
else if SQLServerType = ssMySQL then
|
else if SQLServerType = ssMySQL then
|
||||||
testIntervalValuesCount := 4
|
// MySQL ODBC driver does not correctly handles time values >= '100:00:00'
|
||||||
|
testIntervalValuesCount := 5
|
||||||
else
|
else
|
||||||
testIntervalValuesCount := 3;
|
testIntervalValuesCount := 3;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user