mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 05:29:21 +02:00
fcl-db: mysql: add support for MySQL 5.6
git-svn-id: trunk@26197 -
This commit is contained in:
parent
dde4ec96c2
commit
29ddc3f688
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -2152,6 +2152,7 @@ packages/fcl-db/src/sqldb/mysql/mysql4conn.pas svneol=native#text/plain
|
|||||||
packages/fcl-db/src/sqldb/mysql/mysql50conn.pas svneol=native#text/plain
|
packages/fcl-db/src/sqldb/mysql/mysql50conn.pas svneol=native#text/plain
|
||||||
packages/fcl-db/src/sqldb/mysql/mysql51conn.pas svneol=native#text/plain
|
packages/fcl-db/src/sqldb/mysql/mysql51conn.pas svneol=native#text/plain
|
||||||
packages/fcl-db/src/sqldb/mysql/mysql55conn.pas svneol=native#text/plain
|
packages/fcl-db/src/sqldb/mysql/mysql55conn.pas svneol=native#text/plain
|
||||||
|
packages/fcl-db/src/sqldb/mysql/mysql56conn.pas svneol=native#text/pascal
|
||||||
packages/fcl-db/src/sqldb/mysql/mysqlconn.inc svneol=native#text/plain
|
packages/fcl-db/src/sqldb/mysql/mysqlconn.inc svneol=native#text/plain
|
||||||
packages/fcl-db/src/sqldb/odbc/Makefile svneol=native#text/plain
|
packages/fcl-db/src/sqldb/odbc/Makefile svneol=native#text/plain
|
||||||
packages/fcl-db/src/sqldb/odbc/Makefile.fpc svneol=native#text/plain
|
packages/fcl-db/src/sqldb/odbc/Makefile.fpc svneol=native#text/plain
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
unit mysql50conn;
|
unit mysql50conn;
|
||||||
|
|
||||||
{$DEFINE MYSQL50_up}
|
{$DEFINE MYSQL50_UP}
|
||||||
{$DEFINE MYSQL50}
|
{$DEFINE MYSQL50}
|
||||||
|
|
||||||
{$i mysqlconn.inc}
|
{$i mysqlconn.inc}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
unit mysql51conn;
|
unit mysql51conn;
|
||||||
|
|
||||||
{$DEFINE MYSQL50_UP}
|
|
||||||
{$DEFINE MYSQL51_UP}
|
{$DEFINE MYSQL51_UP}
|
||||||
{$DEFINE MYSQL51}
|
{$DEFINE MYSQL51}
|
||||||
|
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
|
|
||||||
unit mysql55conn;
|
unit mysql55conn;
|
||||||
|
|
||||||
{$DEFINE MYSQL50_UP}
|
{$DEFINE MYSQL55_UP}
|
||||||
{$DEFINE MYSQL51_UP}
|
|
||||||
{$DEFINE MYSQL55}
|
{$DEFINE MYSQL55}
|
||||||
|
|
||||||
{$i mysqlconn.inc}
|
{$i mysqlconn.inc}
|
||||||
|
12
packages/fcl-db/src/sqldb/mysql/mysql56conn.pas
Normal file
12
packages/fcl-db/src/sqldb/mysql/mysql56conn.pas
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
Contains the TMysqlConnection for MySQL 5.6
|
||||||
|
}
|
||||||
|
|
||||||
|
unit mysql56conn;
|
||||||
|
|
||||||
|
{$DEFINE MYSQL56_UP}
|
||||||
|
{$DEFINE MYSQL56}
|
||||||
|
|
||||||
|
{$i mysqlconn.inc}
|
||||||
|
|
||||||
|
end.
|
@ -1,3 +1,12 @@
|
|||||||
|
{$IFDEF MYSQL56_UP}
|
||||||
|
{$DEFINE MYSQL55_UP}
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF MYSQL55_UP}
|
||||||
|
{$DEFINE MYSQL51_UP}
|
||||||
|
{$ENDIF}
|
||||||
|
{$IFDEF MYSQL51_UP}
|
||||||
|
{$DEFINE MYSQL50_UP}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
@ -5,9 +14,12 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,bufdataset,sqldb,db,ctypes,
|
Classes, SysUtils,bufdataset,sqldb,db,ctypes,
|
||||||
{$IFDEF mysql55}
|
{$IFDEF mysql56}
|
||||||
|
mysql56dyn;
|
||||||
|
{$ELSE}
|
||||||
|
{$IFDEF mysql55}
|
||||||
mysql55dyn;
|
mysql55dyn;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF mysql51}
|
{$IFDEF mysql51}
|
||||||
mysql51dyn;
|
mysql51dyn;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -17,38 +29,37 @@ uses
|
|||||||
{$IfDef mysql41}
|
{$IfDef mysql41}
|
||||||
mysql41dyn;
|
mysql41dyn;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF mysql4} // temporary backwards compatibility for Lazarus
|
|
||||||
mysql40dyn;
|
mysql40dyn;
|
||||||
{$ELSE}
|
|
||||||
mysql40dyn;
|
|
||||||
{$EndIf}
|
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
Const
|
Const
|
||||||
|
MySQLVersion =
|
||||||
|
{$IFDEF mysql56}
|
||||||
|
'5.6';
|
||||||
|
{$ELSE}
|
||||||
{$IFDEF mysql55}
|
{$IFDEF mysql55}
|
||||||
MySQLVersion = '5.5';
|
'5.5';
|
||||||
{$else}
|
{$ELSE}
|
||||||
{$IFDEF mysql51}
|
{$IFDEF mysql51}
|
||||||
MySQLVersion = '5.1';
|
'5.1';
|
||||||
{$else}
|
{$else}
|
||||||
{$IfDef mysql50}
|
{$IfDef mysql50}
|
||||||
MySQLVersion = '5.0';
|
'5.0';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IfDef mysql41}
|
{$IfDef mysql41}
|
||||||
MySQLVersion = '4.1';
|
'4.1';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF mysql4} // temporary backwards compatibility for Lazarus
|
'4.0';
|
||||||
MySQLVersion = '4.0';
|
|
||||||
{$ELSE}
|
|
||||||
MySQLVersion = '4.0';
|
|
||||||
{$EndIf}
|
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
Type
|
Type
|
||||||
TTransactionName = Class(TSQLHandle)
|
TTransactionName = Class(TSQLHandle)
|
||||||
protected
|
protected
|
||||||
@ -152,6 +163,12 @@ Type
|
|||||||
|
|
||||||
|
|
||||||
EMySQLError = Class(Exception);
|
EMySQLError = Class(Exception);
|
||||||
|
{$IFDEF mysql56}
|
||||||
|
TMySQL56Connection = Class(TConnectionName);
|
||||||
|
TMySQL56ConnectionDef = Class(TMySQLConnectionDef);
|
||||||
|
TMySQL56Transaction = Class(TTransactionName);
|
||||||
|
TMySQL56Cursor = Class(TCursorName);
|
||||||
|
{$ELSE}
|
||||||
{$ifdef mysql55}
|
{$ifdef mysql55}
|
||||||
TMySQL55Connection = Class(TConnectionName);
|
TMySQL55Connection = Class(TConnectionName);
|
||||||
TMySQL55ConnectionDef = Class(TMySQLConnectionDef);
|
TMySQL55ConnectionDef = Class(TMySQLConnectionDef);
|
||||||
@ -175,22 +192,16 @@ Type
|
|||||||
TMySQL41ConnectionDef = Class(TMySQLConnectionDef);
|
TMySQL41ConnectionDef = Class(TMySQLConnectionDef);
|
||||||
TMySQL41Transaction = Class(TTransactionName);
|
TMySQL41Transaction = Class(TTransactionName);
|
||||||
TMySQL41Cursor = Class(TCursorName);
|
TMySQL41Cursor = Class(TCursorName);
|
||||||
{$ELSE}
|
|
||||||
{$IFDEF mysql4} // temporary backwards compatibility for Lazarus
|
|
||||||
TMySQLConnection = Class(TConnectionName);
|
|
||||||
TMySQL40ConnectionDef = Class(TMySQLConnectionDef);
|
|
||||||
TMySQLTransaction = Class(TTransactionName);
|
|
||||||
TMySQLCursor = Class(TCursorName);
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
TMySQL40Connection = Class(TConnectionName);
|
TMySQL40Connection = Class(TConnectionName);
|
||||||
TMySQL40ConnectionDef = Class(TMySQLConnectionDef);
|
TMySQL40ConnectionDef = Class(TMySQLConnectionDef);
|
||||||
TMySQL40Transaction = Class(TTransactionName);
|
TMySQL40Transaction = Class(TTransactionName);
|
||||||
TMySQL40Cursor = Class(TCursorName);
|
TMySQL40Cursor = Class(TCursorName);
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
|
||||||
{$endif}
|
{$endif}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -215,8 +226,16 @@ const
|
|||||||
,'MYSQL_REPORT_DATA_TRUNCATION', 'MYSQL_OPT_RECONNECT'
|
,'MYSQL_REPORT_DATA_TRUNCATION', 'MYSQL_OPT_RECONNECT'
|
||||||
{$IFDEF mysql51_UP}
|
{$IFDEF mysql51_UP}
|
||||||
,'MYSQL_OPT_SSL_VERIFY_SERVER_CERT'
|
,'MYSQL_OPT_SSL_VERIFY_SERVER_CERT'
|
||||||
{$IFDEF mysql55}
|
{$IFDEF mysql55_UP}
|
||||||
,'MYSQL_PLUGIN_DIR', 'MYSQL_DEFAULT_AUTH'
|
,'MYSQL_PLUGIN_DIR', 'MYSQL_DEFAULT_AUTH'
|
||||||
|
{$IFDEF MYSQL56_UP}
|
||||||
|
,'MYSQL_OPT_BIND'
|
||||||
|
,'MYSQL_OPT_SSL_KEY', 'MYSQL_OPT_SSL_CERT', 'MYSQL_OPT_SSL_CA', 'MYSQL_OPT_SSL_CAPATH', 'MYSQL_OPT_SSL_CIPHER', 'MYSQL_OPT_SSL_CRL', 'MYSQL_OPT_SSL_CRLPATH'
|
||||||
|
,'MYSQL_OPT_CONNECT_ATTR_RESET', 'MYSQL_OPT_CONNECT_ATTR_ADD', 'MYSQL_OPT_CONNECT_ATTR_DELETE'
|
||||||
|
,'MYSQL_SERVER_PUBLIC_KEY'
|
||||||
|
,'MYSQL_ENABLE_CLEARTEXT_PLUGIN'
|
||||||
|
,'MYSQL_OPT_CAN_HANDLE_EXPIRED_PASSWORDS'
|
||||||
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
@ -469,6 +488,9 @@ end;
|
|||||||
|
|
||||||
function TConnectionName.AllocateCursorHandle: TSQLCursor;
|
function TConnectionName.AllocateCursorHandle: TSQLCursor;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF mysql56}
|
||||||
|
Result:=TMySQL56Cursor.Create;
|
||||||
|
{$ELSE}
|
||||||
{$IfDef mysql55}
|
{$IfDef mysql55}
|
||||||
Result:=TMySQL55Cursor.Create;
|
Result:=TMySQL55Cursor.Create;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -480,16 +502,13 @@ begin
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IfDef mysql41}
|
{$IfDef mysql41}
|
||||||
Result:=TMySQL41Cursor.Create;
|
Result:=TMySQL41Cursor.Create;
|
||||||
{$ELSE}
|
|
||||||
{$IFDEF mysql4} // temporary backwards compatibility for Lazarus
|
|
||||||
Result:=TMySQLCursor.Create;
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Result:=TMySQL40Cursor.Create;
|
Result:=TMySQL40Cursor.Create;
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$endif}
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Procedure TConnectionName.DeAllocateCursorHandle(var cursor : TSQLCursor);
|
Procedure TConnectionName.DeAllocateCursorHandle(var cursor : TSQLCursor);
|
||||||
@ -1216,6 +1235,9 @@ end;
|
|||||||
|
|
||||||
class function TMySQLConnectionDef.ConnectionClass: TSQLConnectionClass;
|
class function TMySQLConnectionDef.ConnectionClass: TSQLConnectionClass;
|
||||||
begin
|
begin
|
||||||
|
{$IFDEF mysql56}
|
||||||
|
Result:=TMySQL56Connection;
|
||||||
|
{$ELSE}
|
||||||
{$IfDef mysql55}
|
{$IfDef mysql55}
|
||||||
Result:=TMySQL55Connection;
|
Result:=TMySQL55Connection;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
@ -1227,16 +1249,13 @@ begin
|
|||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IfDef mysql41}
|
{$IfDef mysql41}
|
||||||
Result:=TMySQL41Connection;
|
Result:=TMySQL41Connection;
|
||||||
{$ELSE}
|
|
||||||
{$IFDEF mysql4} // temporary backwards compatibility for Lazarus
|
|
||||||
Result:=TMySQLConnection;
|
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
Result:=TMySQL40Connection;
|
Result:=TMySQL40Connection;
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class function TMySQLConnectionDef.Description: String;
|
class function TMySQLConnectionDef.Description: String;
|
||||||
@ -1264,6 +1283,12 @@ begin
|
|||||||
Result:=MysqlLoadedLibrary;
|
Result:=MysqlLoadedLibrary;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$IFDEF mysql56}
|
||||||
|
initialization
|
||||||
|
RegisterConnection(TMySQL56ConnectionDef);
|
||||||
|
finalization
|
||||||
|
UnRegisterConnection(TMySQL56ConnectionDef);
|
||||||
|
{$ELSE}
|
||||||
{$IfDef mysql55}
|
{$IfDef mysql55}
|
||||||
initialization
|
initialization
|
||||||
RegisterConnection(TMySQL55ConnectionDef);
|
RegisterConnection(TMySQL55ConnectionDef);
|
||||||
@ -1288,20 +1313,14 @@ end;
|
|||||||
finalization
|
finalization
|
||||||
UnRegisterConnection(TMySQL41ConnectionDef);
|
UnRegisterConnection(TMySQL41ConnectionDef);
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$IFDEF mysql4} // temporary backwards compatibility for Lazarus
|
|
||||||
initialization
|
initialization
|
||||||
RegisterConnection(TMySQL40ConnectionDef);
|
RegisterConnection(TMySQL40ConnectionDef);
|
||||||
finalization
|
finalization
|
||||||
UnRegisterConnection(TMySQL40ConnectionDef);
|
UnRegisterConnection(TMySQL40ConnectionDef);
|
||||||
{$ELSE}
|
|
||||||
initialization
|
|
||||||
RegisterConnection(TMySQL40ConnectionDef);
|
|
||||||
finalization
|
|
||||||
UnRegisterConnection(TMySQL40ConnectionDef);
|
|
||||||
{$EndIf}
|
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$EndIf}
|
{$EndIf}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -7,7 +7,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, toolsunit
|
Classes, SysUtils, toolsunit
|
||||||
,db, sqldb
|
,db, sqldb
|
||||||
,mysql40conn, mysql41conn, mysql50conn, mysql51conn, mysql55conn
|
,mysql40conn, mysql41conn, mysql50conn, mysql51conn, mysql55conn, mysql56conn
|
||||||
,ibconnection
|
,ibconnection
|
||||||
,pqconnection
|
,pqconnection
|
||||||
,odbcconn
|
,odbcconn
|
||||||
@ -20,13 +20,13 @@ uses
|
|||||||
;
|
;
|
||||||
|
|
||||||
type
|
type
|
||||||
TSQLConnType = (mysql40,mysql41,mysql50,mysql51,mysql55,postgresql,interbase,odbc,oracle,sqlite3,mssql,sybase);
|
TSQLConnType = (mysql40,mysql41,mysql50,mysql51,mysql55,mysql56,postgresql,interbase,odbc,oracle,sqlite3,mssql,sybase);
|
||||||
TSQLServerType = (ssFirebird, ssInterbase, ssMSSQL, ssMySQL, ssOracle, ssPostgreSQL, ssSQLite, ssSybase, ssUnknown);
|
TSQLServerType = (ssFirebird, ssInterbase, ssMSSQL, ssMySQL, ssOracle, ssPostgreSQL, ssSQLite, ssSybase, ssUnknown);
|
||||||
|
|
||||||
const
|
const
|
||||||
MySQLConnTypes = [mysql40,mysql41,mysql50,mysql51,mysql55];
|
MySQLConnTypes = [mysql40,mysql41,mysql50,mysql51,mysql55,mysql56];
|
||||||
SQLConnTypesNames : Array [TSQLConnType] of String[19] =
|
SQLConnTypesNames : Array [TSQLConnType] of String[19] =
|
||||||
('MYSQL40','MYSQL41','MYSQL50','MYSQL51','MYSQL55','POSTGRESQL','INTERBASE','ODBC','ORACLE','SQLITE3','MSSQL','SYBASE');
|
('MYSQL40','MYSQL41','MYSQL50','MYSQL51','MYSQL55','MYSQL56','POSTGRESQL','INTERBASE','ODBC','ORACLE','SQLITE3','MSSQL','SYBASE');
|
||||||
|
|
||||||
STestNotApplicable = 'This test does not apply to this sqldb-connection type';
|
STestNotApplicable = 'This test does not apply to this sqldb-connection type';
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ const
|
|||||||
|
|
||||||
// fall back mapping (e.g. in case GetConnectionInfo(citServerType) is not implemented)
|
// fall back mapping (e.g. in case GetConnectionInfo(citServerType) is not implemented)
|
||||||
SQLConnTypeToServerTypeMap : array[TSQLConnType] of TSQLServerType =
|
SQLConnTypeToServerTypeMap : array[TSQLConnType] of TSQLServerType =
|
||||||
(ssMySQL,ssMySQL,ssMySQL,ssMySQL,ssMySQL,ssPostgreSQL,ssFirebird,ssUnknown,ssOracle,ssSQLite,ssMSSQL,ssSybase);
|
(ssMySQL,ssMySQL,ssMySQL,ssMySQL,ssMySQL,ssMySQL,ssPostgreSQL,ssFirebird,ssUnknown,ssOracle,ssSQLite,ssMSSQL,ssSybase);
|
||||||
|
|
||||||
|
|
||||||
{ TSQLDBConnector }
|
{ TSQLDBConnector }
|
||||||
@ -153,6 +153,7 @@ begin
|
|||||||
if SQLConnType = MYSQL50 then Fconnection := TMySQL50Connection.Create(nil);
|
if SQLConnType = MYSQL50 then Fconnection := TMySQL50Connection.Create(nil);
|
||||||
if SQLConnType = MYSQL51 then Fconnection := TMySQL51Connection.Create(nil);
|
if SQLConnType = MYSQL51 then Fconnection := TMySQL51Connection.Create(nil);
|
||||||
if SQLConnType = MYSQL55 then Fconnection := TMySQL55Connection.Create(nil);
|
if SQLConnType = MYSQL55 then Fconnection := TMySQL55Connection.Create(nil);
|
||||||
|
if SQLConnType = MYSQL56 then Fconnection := TMySQL56Connection.Create(nil);
|
||||||
if SQLConnType = SQLITE3 then Fconnection := TSQLite3Connection.Create(nil);
|
if SQLConnType = SQLITE3 then Fconnection := TSQLite3Connection.Create(nil);
|
||||||
if SQLConnType = POSTGRESQL then Fconnection := TPQConnection.Create(nil);
|
if SQLConnType = POSTGRESQL then Fconnection := TPQConnection.Create(nil);
|
||||||
if SQLConnType = INTERBASE then Fconnection := TIBConnection.Create(nil);
|
if SQLConnType = INTERBASE then Fconnection := TIBConnection.Create(nil);
|
||||||
@ -228,8 +229,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
ssMySQL:
|
ssMySQL:
|
||||||
begin
|
begin
|
||||||
|
// Add into my.ini: sql-mode="...,PAD_CHAR_TO_FULL_LENGTH,ANSI_QUOTES"
|
||||||
FieldtypeDefinitions[ftWord] := 'SMALLINT UNSIGNED';
|
FieldtypeDefinitions[ftWord] := 'SMALLINT UNSIGNED';
|
||||||
//MySQL recognizes BOOLEAN, but as synonym for TINYINT, not true sql boolean datatype
|
// MySQL recognizes BOOLEAN, but as synonym for TINYINT, not true sql boolean datatype
|
||||||
FieldtypeDefinitions[ftBoolean] := '';
|
FieldtypeDefinitions[ftBoolean] := '';
|
||||||
// Use 'DATETIME' for datetime-fields instead of timestamp, because
|
// Use 'DATETIME' for datetime-fields instead of timestamp, because
|
||||||
// mysql's timestamps are only valid in the range 1970-2038.
|
// mysql's timestamps are only valid in the range 1970-2038.
|
||||||
|
@ -2093,8 +2093,8 @@ begin
|
|||||||
AFldName:=Adataset.Fields[1];
|
AFldName:=Adataset.Fields[1];
|
||||||
for i := 1 to 5 do
|
for i := 1 to 5 do
|
||||||
begin
|
begin
|
||||||
AssertEquals(i,AFldID.asinteger);
|
AssertEquals(i, AFldID.AsInteger);
|
||||||
AssertEquals('TestName'+inttostr(i),AFldName.asstring);
|
AssertEquals('TestName'+inttostr(i), AFldName.AsString);
|
||||||
ADataset.Next;
|
ADataset.Next;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2107,11 +2107,11 @@ begin
|
|||||||
ADataset.First;
|
ADataset.First;
|
||||||
for i := 1 to 5 do
|
for i := 1 to 5 do
|
||||||
begin
|
begin
|
||||||
AssertEquals(i,AFldID.AsInteger);
|
AssertEquals('ID', i, AFldID.AsInteger);
|
||||||
if i = 2 then
|
if i = 2 then
|
||||||
AssertEquals('test',AFldName.AsString)
|
AssertEquals('NAME', 'test', AFldName.AsString)
|
||||||
else
|
else
|
||||||
AssertEquals('TestName'+inttostr(i),AFldName.AsString);
|
AssertEquals('NAME', 'TestName'+inttostr(i), AFldName.AsString);
|
||||||
ADataset.Next;
|
ADataset.Next;
|
||||||
end;
|
end;
|
||||||
ADataset.Next;
|
ADataset.Next;
|
||||||
|
Loading…
Reference in New Issue
Block a user