mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 06:19:28 +02:00
--- Merging r32931 into '.':
U packages/fcl-db/src/sqldb/mysql/mysqlconn.inc --- Recording mergeinfo for merge of r32931 into '.': U . --- Merging r32964 into '.': U packages/fcl-db/src/datadict/fpdatadict.pp --- Recording mergeinfo for merge of r32964 into '.': G . --- Merging r33049 into '.': U packages/fcl-db/src/base/dsparams.inc --- Recording mergeinfo for merge of r33049 into '.': G . --- Merging r33078 into '.': U packages/fcl-db/src/sqldb/sqldb.pp --- Recording mergeinfo for merge of r33078 into '.': G . --- Merging r33079 into '.': G packages/fcl-db/src/sqldb/sqldb.pp --- Recording mergeinfo for merge of r33079 into '.': G . --- Merging r33080 into '.': U packages/fcl-db/tests/sqldbtoolsunit.pas --- Recording mergeinfo for merge of r33080 into '.': G . --- Merging r33085 into '.': U packages/fcl-db/src/base/dataset.inc U packages/fcl-db/src/dbase/dbf.pas --- Recording mergeinfo for merge of r33085 into '.': G . --- Merging r33086 into '.': U packages/fcl-db/src/dbase/dbf_common.inc --- Recording mergeinfo for merge of r33086 into '.': G . --- Merging r33087 into '.': U packages/fcl-db/src/datadict/fpddsqldb.pp --- Recording mergeinfo for merge of r33087 into '.': G . # revisions: 32931,32964,33049,33078,33079,33080,33085,33086,33087 git-svn-id: branches/fixes_3_0@33372 -
This commit is contained in:
parent
c76c86e598
commit
fcbc1fd615
@ -1028,7 +1028,7 @@ end;
|
|||||||
|
|
||||||
procedure TDataSet.InternalPost;
|
procedure TDataSet.InternalPost;
|
||||||
|
|
||||||
Procedure Checkrequired;
|
Procedure CheckRequiredFields;
|
||||||
|
|
||||||
Var I : longint;
|
Var I : longint;
|
||||||
|
|
||||||
@ -1042,7 +1042,7 @@ procedure TDataSet.InternalPost;
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Checkrequired;
|
CheckRequiredFields;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDataSet.InternalSetToRecord(Buffer: TRecordBuffer);
|
procedure TDataSet.InternalSetToRecord(Buffer: TRecordBuffer);
|
||||||
|
@ -1104,7 +1104,7 @@ Var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
SetLength(Temp,ASize);
|
SetLength(Temp,ASize);
|
||||||
Move(Buffer^,Temp,ASize);
|
Move(Buffer^,Temp[1],ASize);
|
||||||
AsBlob:=Temp;
|
AsBlob:=Temp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2844,7 +2844,7 @@ begin
|
|||||||
WriteString(ASection,KeyCaseInsFields,CaseInsFields);
|
WriteString(ASection,KeyCaseInsFields,CaseInsFields);
|
||||||
WriteString(ASection,KeyDescFields,DescFields);
|
WriteString(ASection,KeyDescFields,DescFields);
|
||||||
WriteString(ASection,KeySource,Source);
|
WriteString(ASection,KeySource,Source);
|
||||||
O:=Integer(Options);
|
O:=Integer(self.Options);
|
||||||
T:=TypeInfo(TIndexOptions);
|
T:=TypeInfo(TIndexOptions);
|
||||||
WriteString(ASection,KeyOptions,SetToString(T,O,False));
|
WriteString(ASection,KeyOptions,SetToString(T,O,False));
|
||||||
end;
|
end;
|
||||||
|
@ -232,8 +232,8 @@ begin
|
|||||||
Q.SQL.text:=Format('SELECT * FROM %s WHERE (1=2)',[ATableName]);
|
Q.SQL.text:=Format('SELECT * FROM %s WHERE (1=2)',[ATableName]);
|
||||||
Q.ReadOnly:=False;
|
Q.ReadOnly:=False;
|
||||||
Q.Prepare;
|
Q.Prepare;
|
||||||
Q.IndexDefs.Update;
|
Q.ServerIndexDefs.Update;
|
||||||
IndexDefsToDDIndexDefs(Q.IndexDefs,Defs);
|
IndexDefsToDDIndexDefs(Q.ServerIndexDefs,Defs);
|
||||||
Result:=Defs.Count;
|
Result:=Defs.Count;
|
||||||
finally
|
finally
|
||||||
Q.Free;
|
Q.Free;
|
||||||
|
@ -1428,6 +1428,8 @@ var
|
|||||||
pRecord: pDbfRecord;
|
pRecord: pDbfRecord;
|
||||||
I, newRecord: Integer;
|
I, newRecord: Integer;
|
||||||
begin
|
begin
|
||||||
|
// check required fields
|
||||||
|
inherited;
|
||||||
// if internalpost is called, we know we are active
|
// if internalpost is called, we know we are active
|
||||||
pRecord := pDbfRecord(ActiveBuffer);
|
pRecord := pDbfRecord(ActiveBuffer);
|
||||||
// commit blobs
|
// commit blobs
|
||||||
|
@ -222,14 +222,7 @@
|
|||||||
{$define SUPPORT_VARIANTS}
|
{$define SUPPORT_VARIANTS}
|
||||||
{$define SUPPORT_SEPARATE_VARIANTS_UNIT}
|
{$define SUPPORT_SEPARATE_VARIANTS_UNIT}
|
||||||
{$define SUPPORT_REFRESHEVENTS}
|
{$define SUPPORT_REFRESHEVENTS}
|
||||||
|
|
||||||
// FPC 2.0.x improvements
|
|
||||||
// todo: add a $IF FPC_FULLVERSION>=20000 for support for future FPC 3+
|
|
||||||
{$ifdef VER2}
|
|
||||||
{$ifndef VER2_0_0}
|
|
||||||
{$define SUPPORT_BACKWARD_FIELDDATA}
|
{$define SUPPORT_BACKWARD_FIELDDATA}
|
||||||
{$endif}
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
// FPC 1.0.x exceptions: no 0/0 support
|
// FPC 1.0.x exceptions: no 0/0 support
|
||||||
{$ifdef VER1_0}
|
{$ifdef VER1_0}
|
||||||
|
@ -106,7 +106,7 @@ Type
|
|||||||
|
|
||||||
TConnectionName = class (TSQLConnection)
|
TConnectionName = class (TSQLConnection)
|
||||||
private
|
private
|
||||||
FSkipLibrarVersionCheck : Boolean;
|
FSkipLibraryVersionCheck : Boolean;
|
||||||
FHostInfo: String;
|
FHostInfo: String;
|
||||||
FServerInfo: String;
|
FServerInfo: String;
|
||||||
FMySQL : PMySQL;
|
FMySQL : PMySQL;
|
||||||
@ -165,7 +165,7 @@ Type
|
|||||||
property ClientInfo: string read GetClientInfo;
|
property ClientInfo: string read GetClientInfo;
|
||||||
property ServerStatus : String read GetServerStatus;
|
property ServerStatus : String read GetServerStatus;
|
||||||
published
|
published
|
||||||
Property SkipLibrarVersionCheck : Boolean Read FSkipLibrarVersionCheck Write FSkipLibrarVersionCheck;
|
Property SkipLibraryVersionCheck : Boolean Read FSkipLibraryVersionCheck Write FSkipLibraryVersionCheck;
|
||||||
property DatabaseName;
|
property DatabaseName;
|
||||||
property HostName;
|
property HostName;
|
||||||
property KeepConnection;
|
property KeepConnection;
|
||||||
@ -497,7 +497,7 @@ var
|
|||||||
FullVersion: string;
|
FullVersion: string;
|
||||||
begin
|
begin
|
||||||
InitialiseMysql;
|
InitialiseMysql;
|
||||||
if not SkipLibrarVersionCheck then
|
if not SkipLibraryVersionCheck then
|
||||||
begin
|
begin
|
||||||
FullVersion:=strpas(mysql_get_client_info());
|
FullVersion:=strpas(mysql_get_client_info());
|
||||||
// Version string should start with version number:
|
// Version string should start with version number:
|
||||||
|
@ -819,31 +819,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TSqlObjectIdentifierList }
|
|
||||||
|
|
||||||
function TSqlObjectIdentifierList.GetIdentifier(Index: integer): TSqlObjectIdenfier;
|
|
||||||
begin
|
|
||||||
Result := Items[Index] as TSqlObjectIdenfier;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TSqlObjectIdentifierList.SetIdentifier(Index: integer; AValue: TSqlObjectIdenfier);
|
|
||||||
begin
|
|
||||||
Items[Index] := AValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TSqlObjectIdentifierList.AddIdentifier: TSqlObjectIdenfier;
|
|
||||||
begin
|
|
||||||
Result:=Add as TSqlObjectIdenfier;
|
|
||||||
end;
|
|
||||||
|
|
||||||
function TSqlObjectIdentifierList.AddIdentifier(Const AObjectName: String;
|
|
||||||
Const ASchemaName: String = ''): TSqlObjectIdenfier;
|
|
||||||
begin
|
|
||||||
Result:=AddIdentifier();
|
|
||||||
Result.SchemaName:=ASchemaName;
|
|
||||||
Result.ObjectName:=AObjectName;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TSQLDBFieldDefs }
|
{ TSQLDBFieldDefs }
|
||||||
|
|
||||||
class function TSQLDBFieldDefs.FieldDefClass: TFieldDefClass;
|
class function TSQLDBFieldDefs.FieldDefClass: TFieldDefClass;
|
||||||
@ -1298,10 +1273,13 @@ begin
|
|||||||
If LogEvent(detPrepare) then
|
If LogEvent(detPrepare) then
|
||||||
Log(detPrepare,SQL);
|
Log(detPrepare,SQL);
|
||||||
PrepareStatement(Cursor,ATransaction,SQL,Nil);
|
PrepareStatement(Cursor,ATransaction,SQL,Nil);
|
||||||
|
try
|
||||||
If LogEvent(detExecute) then
|
If LogEvent(detExecute) then
|
||||||
Log(detExecute,SQL);
|
Log(detExecute,SQL);
|
||||||
Execute(Cursor,ATransaction, Nil);
|
Execute(Cursor,ATransaction, Nil);
|
||||||
|
finally
|
||||||
UnPrepareStatement(Cursor);
|
UnPrepareStatement(Cursor);
|
||||||
|
end;
|
||||||
finally;
|
finally;
|
||||||
DeAllocateCursorHandle(Cursor);
|
DeAllocateCursorHandle(Cursor);
|
||||||
end;
|
end;
|
||||||
@ -3647,6 +3625,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TSqlObjectIdenfier }
|
{ TSqlObjectIdenfier }
|
||||||
|
|
||||||
constructor TSqlObjectIdenfier.Create(ACollection: TSqlObjectIdentifierList;
|
constructor TSqlObjectIdenfier.Create(ACollection: TSqlObjectIdentifierList;
|
||||||
@ -3657,6 +3636,32 @@ begin
|
|||||||
FObjectName:=AObjectName;
|
FObjectName:=AObjectName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TSqlObjectIdentifierList }
|
||||||
|
|
||||||
|
function TSqlObjectIdentifierList.GetIdentifier(Index: integer): TSqlObjectIdenfier;
|
||||||
|
begin
|
||||||
|
Result := Items[Index] as TSqlObjectIdenfier;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TSqlObjectIdentifierList.SetIdentifier(Index: integer; AValue: TSqlObjectIdenfier);
|
||||||
|
begin
|
||||||
|
Items[Index] := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TSqlObjectIdentifierList.AddIdentifier: TSqlObjectIdenfier;
|
||||||
|
begin
|
||||||
|
Result:=Add as TSqlObjectIdenfier;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TSqlObjectIdentifierList.AddIdentifier(Const AObjectName: String;
|
||||||
|
Const ASchemaName: String = ''): TSqlObjectIdenfier;
|
||||||
|
begin
|
||||||
|
Result:=AddIdentifier();
|
||||||
|
Result.SchemaName:=ASchemaName;
|
||||||
|
Result.ObjectName:=AObjectName;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Initialization
|
Initialization
|
||||||
|
|
||||||
Finalization
|
Finalization
|
||||||
|
@ -184,10 +184,9 @@ begin
|
|||||||
{$ENDIF Win64}
|
{$ENDIF Win64}
|
||||||
MSSQL: Fconnection := TMSSQLConnection.Create(nil);
|
MSSQL: Fconnection := TMSSQLConnection.Create(nil);
|
||||||
SYBASE: Fconnection := TSybaseConnection.Create(nil);
|
SYBASE: Fconnection := TSybaseConnection.Create(nil);
|
||||||
|
else writeln('Invalid database type, check if a valid database type for your achitecture was provided in the file ''database.ini''');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if not assigned(Fconnection) then writeln('Invalid database type, check if a valid database type for your achitecture was provided in the file ''database.ini''');
|
|
||||||
|
|
||||||
FTransaction := TSQLTransaction.Create(nil);
|
FTransaction := TSQLTransaction.Create(nil);
|
||||||
|
|
||||||
with Fconnection do
|
with Fconnection do
|
||||||
|
Loading…
Reference in New Issue
Block a user