mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1482: activate some more code in apphelpers, and testwise load libmariadb on Linux and Windows
This commit is contained in:
BIN
out/libmariadb.so.3
Normal file
BIN
out/libmariadb.so.3
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -260,7 +260,6 @@ type
|
|||||||
end;
|
end;
|
||||||
PMYSQL_RES = ^MYSQL_RES;
|
PMYSQL_RES = ^MYSQL_RES;
|
||||||
|
|
||||||
Tmgci = function: PAnsiChar; stdcall;
|
|
||||||
TMySQLLib = class(TDbLib)
|
TMySQLLib = class(TDbLib)
|
||||||
mysql_affected_rows: function(Handle: PMYSQL): Int64; stdcall;
|
mysql_affected_rows: function(Handle: PMYSQL): Int64; stdcall;
|
||||||
mysql_character_set_name: function(Handle: PMYSQL): PAnsiChar; stdcall;
|
mysql_character_set_name: function(Handle: PMYSQL): PAnsiChar; stdcall;
|
||||||
@ -317,7 +316,7 @@ type
|
|||||||
SSL_MODE_REQUIRED,
|
SSL_MODE_REQUIRED,
|
||||||
SSL_MODE_VERIFY_CA,
|
SSL_MODE_VERIFY_CA,
|
||||||
SSL_MODE_VERIFY_IDENTITY: Integer;
|
SSL_MODE_VERIFY_IDENTITY: Integer;
|
||||||
constructor Create(DllFile_, DefaultDll: String); override;
|
constructor Create(UsedDllFile, HintDefaultDll: String); override;
|
||||||
end;
|
end;
|
||||||
var
|
var
|
||||||
MySQLKeywords: TStringList;
|
MySQLKeywords: TStringList;
|
||||||
@ -325,8 +324,7 @@ var
|
|||||||
|
|
||||||
|
|
||||||
// MySQL Data Type List and Properties
|
// MySQL Data Type List and Properties
|
||||||
MySQLDatatypes: array of TDBDatatype;
|
MySQLDatatypes: array [0..41] of TDBDatatype =
|
||||||
{MySQLDatatypes: array [0..41] of TDBDatatype =
|
|
||||||
(
|
(
|
||||||
(
|
(
|
||||||
Index: dbdtUnknown;
|
Index: dbdtUnknown;
|
||||||
@ -1012,7 +1010,7 @@ var
|
|||||||
Category: dtcSpatial;
|
Category: dtcSpatial;
|
||||||
)
|
)
|
||||||
|
|
||||||
);}
|
);
|
||||||
|
|
||||||
|
|
||||||
MySQLVariables: array [0..417] of TServerVariable =
|
MySQLVariables: array [0..417] of TServerVariable =
|
||||||
@ -3134,9 +3132,7 @@ implementation
|
|||||||
uses apphelpers;
|
uses apphelpers;
|
||||||
|
|
||||||
|
|
||||||
constructor TMySQLLib.Create(DllFile_, DefaultDll: String);
|
constructor TMySQLLib.Create(UsedDllFile, HintDefaultDll: String);
|
||||||
var
|
|
||||||
BaseDll: String;
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
// MYSQL_OPT_* constants
|
// MYSQL_OPT_* constants
|
||||||
@ -3159,8 +3155,7 @@ begin
|
|||||||
SSL_MODE_REQUIRED := 3;
|
SSL_MODE_REQUIRED := 3;
|
||||||
SSL_MODE_VERIFY_CA := 4;
|
SSL_MODE_VERIFY_CA := 4;
|
||||||
SSL_MODE_VERIFY_IDENTITY := 5;
|
SSL_MODE_VERIFY_IDENTITY := 5;
|
||||||
BaseDll := ExtractFileName(FDllFile);
|
if String(ExtractFileName(FDllFile)).StartsWith('libmariadb', True) then begin
|
||||||
if BaseDLL.StartsWith('libmariadb', True) then begin
|
|
||||||
// Differences in libmariadb
|
// Differences in libmariadb
|
||||||
MYSQL_OPT_SSL_VERIFY_SERVER_CERT := 21;
|
MYSQL_OPT_SSL_VERIFY_SERVER_CERT := 21;
|
||||||
MARIADB_OPT_TLS_VERSION := 7005;
|
MARIADB_OPT_TLS_VERSION := 7005;
|
||||||
|
@ -88,7 +88,7 @@ type
|
|||||||
public
|
public
|
||||||
property Handle: TLibHandle read FHandle;
|
property Handle: TLibHandle read FHandle;
|
||||||
property DllFile: String read FDllFile;
|
property DllFile: String read FDllFile;
|
||||||
constructor Create(DllFile_, DefaultDll: String); virtual;
|
constructor Create(UsedDllFile, HintDefaultDll: String); virtual;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -148,13 +148,13 @@ end;
|
|||||||
|
|
||||||
{ TDbLib }
|
{ TDbLib }
|
||||||
|
|
||||||
constructor TDbLib.Create(DllFile_, DefaultDll: String);
|
constructor TDbLib.Create(UsedDllFile, HintDefaultDll: String);
|
||||||
var
|
var
|
||||||
msg, ErrorHint: String;
|
msg, ErrorHint: String;
|
||||||
begin
|
begin
|
||||||
// Load DLL as is (with or without path)
|
// Load DLL as is (with or without path)
|
||||||
inherited Create;
|
inherited Create;
|
||||||
FDllFile := DllFile_;
|
FDllFile := UsedDllFile;
|
||||||
if not FileExists(FDllFile) then begin
|
if not FileExists(FDllFile) then begin
|
||||||
msg := f_('File does not exist: %s', [FDllFile]) +
|
msg := f_('File does not exist: %s', [FDllFile]) +
|
||||||
sLineBreak + sLineBreak +
|
sLineBreak + sLineBreak +
|
||||||
@ -171,9 +171,9 @@ begin
|
|||||||
if GetLastOSError <> 0 then begin
|
if GetLastOSError <> 0 then begin
|
||||||
msg := msg + sLineBreak + sLineBreak + f_('Internal error %d: %s', [GetLastOSError, SysErrorMessage(GetLastOSError)]);
|
msg := msg + sLineBreak + sLineBreak + f_('Internal error %d: %s', [GetLastOSError, SysErrorMessage(GetLastOSError)]);
|
||||||
end;
|
end;
|
||||||
if (DefaultDll <> '') and (ExtractFileName(FDllFile) <> DefaultDll) then begin
|
if (HintDefaultDll <> '') and (ExtractFileName(FDllFile) <> HintDefaultDll) then begin
|
||||||
ErrorHint := f_('You could try the default library %s in your session settings. (Current: %s)',
|
ErrorHint := f_('You could try the default library %s in your session settings. (Current: %s)',
|
||||||
[DefaultDll, ExtractFileName(FDllFile)]
|
[HintDefaultDll, ExtractFileName(FDllFile)]
|
||||||
);
|
);
|
||||||
end else begin
|
end else begin
|
||||||
ErrorHint := '';
|
ErrorHint := '';
|
||||||
|
109
source/main.lfm
109
source/main.lfm
@ -627,8 +627,15 @@ object MainForm: TMainForm
|
|||||||
Align = alClient
|
Align = alClient
|
||||||
DefaultText = 'Node'
|
DefaultText = 'Node'
|
||||||
Header.AutoSizeIndex = 0
|
Header.AutoSizeIndex = 0
|
||||||
Header.Columns = <>
|
Header.Columns = <
|
||||||
Header.MainColumn = -1
|
item
|
||||||
|
Position = 0
|
||||||
|
Text = 'Name'
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 1
|
||||||
|
Text = 'Size'
|
||||||
|
end>
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -669,7 +676,105 @@ object MainForm: TMainForm
|
|||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object tabHost: TTabSheet
|
object tabHost: TTabSheet
|
||||||
Caption = 'Host'
|
Caption = 'Host'
|
||||||
|
ClientHeight = 283
|
||||||
|
ClientWidth = 772
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
|
object PageControlHost: TPageControl
|
||||||
|
Left = 0
|
||||||
|
Height = 283
|
||||||
|
Top = 0
|
||||||
|
Width = 772
|
||||||
|
ActivePage = tabDatabases
|
||||||
|
Align = alClient
|
||||||
|
Images = ImageListIcons8
|
||||||
|
TabIndex = 0
|
||||||
|
TabOrder = 0
|
||||||
|
object tabDatabases: TTabSheet
|
||||||
|
Caption = 'Databases'
|
||||||
|
ClientHeight = 250
|
||||||
|
ClientWidth = 764
|
||||||
|
object ListDatabases: TLazVirtualStringTree
|
||||||
|
Left = 0
|
||||||
|
Height = 250
|
||||||
|
Top = 0
|
||||||
|
Width = 764
|
||||||
|
Align = alClient
|
||||||
|
DefaultText = 'Node'
|
||||||
|
Header.AutoSizeIndex = 0
|
||||||
|
Header.Columns = <
|
||||||
|
item
|
||||||
|
Position = 0
|
||||||
|
Text = 'Database'
|
||||||
|
Width = 150
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 1
|
||||||
|
Text = 'Size'
|
||||||
|
Width = 80
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 2
|
||||||
|
Text = 'Items'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 3
|
||||||
|
Text = 'Last modification'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 4
|
||||||
|
Text = 'Tables'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 5
|
||||||
|
Text = 'Views'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 6
|
||||||
|
Text = 'Functions'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 7
|
||||||
|
Text = 'Procedures'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 8
|
||||||
|
Text = 'Triggers'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 9
|
||||||
|
Text = 'Events'
|
||||||
|
Width = 50
|
||||||
|
end
|
||||||
|
item
|
||||||
|
Position = 10
|
||||||
|
Text = 'Default collation'
|
||||||
|
Width = 120
|
||||||
|
end>
|
||||||
|
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowSortGlyphs, hoVisible, hoDisableAnimatedResize]
|
||||||
|
Images = ImageListIcons8
|
||||||
|
TabOrder = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object tabVariables: TTabSheet
|
||||||
|
Caption = 'Variables'
|
||||||
|
end
|
||||||
|
object tabStatus: TTabSheet
|
||||||
|
Caption = 'Status'
|
||||||
|
end
|
||||||
|
object tabProcesses: TTabSheet
|
||||||
|
Caption = 'Processes'
|
||||||
|
end
|
||||||
|
object tabCommandStats: TTabSheet
|
||||||
|
Caption = 'Command-Statistics'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object tabDatabase: TTabSheet
|
object tabDatabase: TTabSheet
|
||||||
Caption = 'Database'
|
Caption = 'Database'
|
||||||
|
155
source/main.pas
155
source/main.pas
@ -7,7 +7,7 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus, ActnList,
|
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, Menus, ActnList,
|
||||||
ComCtrls, ExtCtrls, SynEdit, SynHighlighterSQL, laz.VirtualTrees,
|
ComCtrls, ExtCtrls, SynEdit, SynHighlighterSQL, laz.VirtualTrees,
|
||||||
RegExpr,
|
RegExpr, Buttons, StdCtrls,
|
||||||
Generics.Collections, Generics.Defaults,
|
Generics.Collections, Generics.Defaults,
|
||||||
dbconnection, dbstructures, dbstructures.mysql;
|
dbconnection, dbstructures, dbstructures.mysql;
|
||||||
|
|
||||||
@ -183,12 +183,16 @@ type
|
|||||||
function SetThumbnailClip(hwnd: HWND; var prcClip: TRect): HRESULT; stdcall;
|
function SetThumbnailClip(hwnd: HWND; var prcClip: TRect): HRESULT; stdcall;
|
||||||
end;}
|
end;}
|
||||||
|
|
||||||
|
{ TMainForm }
|
||||||
|
|
||||||
TMainForm = class(TForm)
|
TMainForm = class(TForm)
|
||||||
|
actGotoDbTree: TAction;
|
||||||
actSessionManager: TAction;
|
actSessionManager: TAction;
|
||||||
ActionList1: TActionList;
|
ActionList1: TActionList;
|
||||||
actExitApplication: TAction;
|
actExitApplication: TAction;
|
||||||
ImageListIcons8: TImageList;
|
ImageListIcons8: TImageList;
|
||||||
DBtree: TLazVirtualStringTree;
|
DBtree: TLazVirtualStringTree;
|
||||||
|
ListDatabases: TLazVirtualStringTree;
|
||||||
MainMenu1: TMainMenu;
|
MainMenu1: TMainMenu;
|
||||||
MenuItem1: TMenuItem;
|
MenuItem1: TMenuItem;
|
||||||
MenuItem2: TMenuItem;
|
MenuItem2: TMenuItem;
|
||||||
@ -198,6 +202,7 @@ type
|
|||||||
MenuItem6: TMenuItem;
|
MenuItem6: TMenuItem;
|
||||||
MenuItem7: TMenuItem;
|
MenuItem7: TMenuItem;
|
||||||
MenuItem8: TMenuItem;
|
MenuItem8: TMenuItem;
|
||||||
|
PageControlHost: TPageControl;
|
||||||
PageControlMain: TPageControl;
|
PageControlMain: TPageControl;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
Panel2: TPanel;
|
Panel2: TPanel;
|
||||||
@ -212,6 +217,11 @@ type
|
|||||||
SynSQLSynUsed: TSynSQLSyn;
|
SynSQLSynUsed: TSynSQLSyn;
|
||||||
tabHost: TTabSheet;
|
tabHost: TTabSheet;
|
||||||
tabDatabase: TTabSheet;
|
tabDatabase: TTabSheet;
|
||||||
|
tabDatabases: TTabSheet;
|
||||||
|
tabVariables: TTabSheet;
|
||||||
|
tabStatus: TTabSheet;
|
||||||
|
tabProcesses: TTabSheet;
|
||||||
|
tabCommandStats: TTabSheet;
|
||||||
tabTable: TTabSheet;
|
tabTable: TTabSheet;
|
||||||
tabData: TTabSheet;
|
tabData: TTabSheet;
|
||||||
tabQuery: TTabSheet;
|
tabQuery: TTabSheet;
|
||||||
@ -638,65 +648,65 @@ type
|
|||||||
FLastTabNumberOnMouseUp: Integer;
|
FLastTabNumberOnMouseUp: Integer;
|
||||||
FLastMouseDownCloseButton: TObject;
|
FLastMouseDownCloseButton: TObject;
|
||||||
//FJumpList: TJumpList;
|
//FJumpList: TJumpList;
|
||||||
//// Filter text per tab for filter panel
|
// Filter text per tab for filter panel
|
||||||
//FFilterTextDatabases,
|
FFilterTextDatabases,
|
||||||
//FFilterTextEditor,
|
FFilterTextEditor,
|
||||||
//FFilterTextVariables,
|
FFilterTextVariables,
|
||||||
//FFilterTextStatus,
|
FFilterTextStatus,
|
||||||
//FFilterTextProcessList,
|
FFilterTextProcessList,
|
||||||
//FFilterTextCommandStats,
|
FFilterTextCommandStats,
|
||||||
//FFilterTextDatabase,
|
FFilterTextDatabase,
|
||||||
//FFilterTextData: String;
|
FFilterTextData: String;
|
||||||
//FTreeRefreshInProgress: Boolean;
|
FTreeRefreshInProgress: Boolean;
|
||||||
//FRefreshActionDisabledAt: Cardinal;
|
FRefreshActionDisabledAt: Cardinal;
|
||||||
//FDataGridColumnWidthsCustomized: Boolean;
|
FDataGridColumnWidthsCustomized: Boolean;
|
||||||
//FDataGridLastClickedColumnHeader: Integer;
|
FDataGridLastClickedColumnHeader: Integer;
|
||||||
//FDataGridLastClickedColumnLeftPos: Integer;
|
FDataGridLastClickedColumnLeftPos: Integer;
|
||||||
//FDataGridSortItems: TSortItems;
|
//FDataGridSortItems: TSortItems;
|
||||||
//FSnippetFilenames: TStringList;
|
FSnippetFilenames: TStringList;
|
||||||
//FConnections: TDBConnectionList;
|
//FConnections: TDBConnectionList;
|
||||||
//FTreeClickHistory: TNodeArray;
|
FTreeClickHistory: TNodeArray;
|
||||||
//FOperationTicker: Cardinal;
|
FOperationTicker: Cardinal;
|
||||||
//FOperatingGrid: TBaseVirtualTree;
|
FOperatingGrid: TBaseVirtualTree;
|
||||||
//FActiveDbObj: TDBObject;
|
//FActiveDbObj: TDBObject;
|
||||||
//FActiveObjectGroup: TListNodeType;
|
//FActiveObjectGroup: TListNodeType;
|
||||||
//FBtnAddTab: TSpeedButton;
|
FBtnAddTab: TSpeedButton;
|
||||||
//FDBObjectsMaxSize: Int64;
|
FDBObjectsMaxSize: Int64;
|
||||||
//FDBObjectsMaxRows: Int64;
|
FDBObjectsMaxRows: Int64;
|
||||||
//FSearchReplaceDialog: TfrmSearchReplace;
|
//FSearchReplaceDialog: TfrmSearchReplace;
|
||||||
//FCreateDatabaseDialog: TCreateDatabaseForm;
|
//FCreateDatabaseDialog: TCreateDatabaseForm;
|
||||||
//FTableToolsDialog: TfrmTableTools;
|
//FTableToolsDialog: TfrmTableTools;
|
||||||
//FGridEditFunctionMode: Boolean;
|
FGridEditFunctionMode: Boolean;
|
||||||
//FClipboardHasNull: Boolean;
|
FClipboardHasNull: Boolean;
|
||||||
FTimeZoneOffset: Integer;
|
FTimeZoneOffset: Integer;
|
||||||
//FGridCopying: Boolean;
|
FGridCopying: Boolean;
|
||||||
//FGridPasting: Boolean;
|
FGridPasting: Boolean;
|
||||||
//FHasDonatedDatabaseCheck: TThreeStateBoolean;
|
//FHasDonatedDatabaseCheck: TThreeStateBoolean;
|
||||||
//FFocusedTables: TDBObjectList;
|
//FFocusedTables: TDBObjectList;
|
||||||
FLastCaptionChange: Cardinal;
|
FLastCaptionChange: Cardinal;
|
||||||
//FListTablesSorted: Boolean;
|
FListTablesSorted: Boolean;
|
||||||
FLastPortableSettingsSave: Cardinal;
|
FLastPortableSettingsSave: Cardinal;
|
||||||
FLastAppSettingsWrites: Integer;
|
FLastAppSettingsWrites: Integer;
|
||||||
FFormatSettings: TFormatSettings;
|
FFormatSettings: TFormatSettings;
|
||||||
FDefaultHintFontName: String;
|
FDefaultHintFontName: String;
|
||||||
//FActionList1DefaultCaptions: TStringList;
|
FActionList1DefaultCaptions: TStringList;
|
||||||
//FActionList1DefaultHints: TStringList;
|
FActionList1DefaultHints: TStringList;
|
||||||
//FEditorCommandStrings: TStringList;
|
FEditorCommandStrings: TStringList;
|
||||||
//FLastSelWordInEditor: String;
|
FLastSelWordInEditor: String;
|
||||||
//FMatchingBraceForegroundColor: TColor;
|
FMatchingBraceForegroundColor: TColor;
|
||||||
//FMatchingBraceBackgroundColor: TColor;
|
FMatchingBraceBackgroundColor: TColor;
|
||||||
//FSynEditInOnPaintTransient: Boolean;
|
FSynEditInOnPaintTransient: Boolean;
|
||||||
//FExactRowCountMode: Boolean;
|
FExactRowCountMode: Boolean;
|
||||||
////FHelpData: TSimpleKeyValuePairs;
|
//FHelpData: TSimpleKeyValuePairs;
|
||||||
//
|
|
||||||
//// Host subtabs backend structures
|
// Host subtabs backend structures
|
||||||
//FHostListResults: TDBQueryList;
|
//FHostListResults: TDBQueryList;
|
||||||
//FStatusServerUptime: Integer;
|
FStatusServerUptime: Integer;
|
||||||
//FProcessListMaxTime: Int64;
|
FProcessListMaxTime: Int64;
|
||||||
//FCommandStatsQueryCount: Int64;
|
FCommandStatsQueryCount: Int64;
|
||||||
//FCommandStatsServerUptime: Integer;
|
FCommandStatsServerUptime: Integer;
|
||||||
//FVariableNames, FSessionVars, FGlobalVars: TStringList;
|
FVariableNames, FSessionVars, FGlobalVars: TStringList;
|
||||||
//
|
|
||||||
procedure SetDelimiter(Value: String);
|
procedure SetDelimiter(Value: String);
|
||||||
//procedure DisplayRowCountStats(Sender: TBaseVirtualTree);
|
//procedure DisplayRowCountStats(Sender: TBaseVirtualTree);
|
||||||
//procedure insertFunction(Sender: TObject);
|
//procedure insertFunction(Sender: TObject);
|
||||||
@ -733,25 +743,25 @@ type
|
|||||||
public
|
public
|
||||||
//QueryTabs: TQueryTabList;
|
//QueryTabs: TQueryTabList;
|
||||||
//ActiveObjectEditor: TDBObjectEditor;
|
//ActiveObjectEditor: TDBObjectEditor;
|
||||||
//FileEncodings: TStringList;
|
FileEncodings: TStringList;
|
||||||
//ImportSettingsDone: Boolean;
|
ImportSettingsDone: Boolean;
|
||||||
//
|
|
||||||
//// Data grid related stuff
|
//// Data grid related stuff
|
||||||
//DataGridHiddenColumns: TStringList;
|
DataGridHiddenColumns: TStringList;
|
||||||
//DataGridWantedRowCount: Int64;
|
DataGridWantedRowCount: Int64;
|
||||||
//DataGridTable: TDBObject;
|
//DataGridTable: TDBObject;
|
||||||
//DataGridFocusedCell: TStringList;
|
DataGridFocusedCell: TStringList;
|
||||||
//DataGridFocusedNodeIndex: Int64;
|
DataGridFocusedNodeIndex: Int64;
|
||||||
//DataGridFocusedColumnName: String;
|
DataGridFocusedColumnName: String;
|
||||||
//DataGridResult: TDBQuery;
|
//DataGridResult: TDBQuery;
|
||||||
//DataGridFullRowMode: Boolean;
|
DataGridFullRowMode: Boolean;
|
||||||
//DataLocalNumberFormat: Boolean;
|
DataLocalNumberFormat: Boolean;
|
||||||
//SelectedTableColumns: TTableColumnList;
|
//SelectedTableColumns: TTableColumnList;
|
||||||
//SelectedTableKeys: TTableKeyList;
|
//SelectedTableKeys: TTableKeyList;
|
||||||
//SelectedTableForeignKeys: TForeignKeyList;
|
//SelectedTableForeignKeys: TForeignKeyList;
|
||||||
//SelectedTableTimestampColumns: TStringList;
|
//SelectedTableTimestampColumns: TStringList;
|
||||||
//FilterPanelManuallyOpened: Boolean;
|
FilterPanelManuallyOpened: Boolean;
|
||||||
//
|
|
||||||
//// Task button interface
|
//// Task button interface
|
||||||
//TaskbarList: ITaskbarList;
|
//TaskbarList: ITaskbarList;
|
||||||
//TaskbarList2: ITaskbarList2;
|
//TaskbarList2: ITaskbarList2;
|
||||||
@ -1330,7 +1340,7 @@ var
|
|||||||
//EditorCommand: TSynEditorCommand;
|
//EditorCommand: TSynEditorCommand;
|
||||||
CmdCap: String;
|
CmdCap: String;
|
||||||
Lib: TMySQLLib;
|
Lib: TMySQLLib;
|
||||||
test: String;
|
LibFile: String;
|
||||||
begin
|
begin
|
||||||
{***
|
{***
|
||||||
OnCreate Event
|
OnCreate Event
|
||||||
@ -1592,20 +1602,14 @@ begin
|
|||||||
FConnections := TDBConnectionList.Create;
|
FConnections := TDBConnectionList.Create;
|
||||||
FConnections.OnNotify := ConnectionsNotify;}
|
FConnections.OnNotify := ConnectionsNotify;}
|
||||||
|
|
||||||
{FTreeRefreshInProgress := False;
|
FTreeRefreshInProgress := False;
|
||||||
FGridCopying := False;
|
FGridCopying := False;
|
||||||
FGridPasting := False;}
|
FGridPasting := False;
|
||||||
|
|
||||||
{FileEncodings := Explode(',', _('Auto detect (may fail)')+',ANSI,ASCII,Unicode,Unicode Big Endian,UTF-8,UTF-7,UTF-8-BOM');}
|
{FileEncodings := Explode(',', _('Auto detect (may fail)')+',ANSI,ASCII,Unicode,Unicode Big Endian,UTF-8,UTF-7,UTF-8-BOM');}
|
||||||
|
|
||||||
{// Detect timezone offset in seconds, once
|
// Detect timezone offset in seconds, once
|
||||||
case GetTimeZoneInformation(TZI) of
|
FTimeZoneOffset := GetLocalTimeOffset * 60;
|
||||||
TIME_ZONE_ID_STANDARD: FTimeZoneOffset := (TZI.Bias + TZI.StandardBias);
|
|
||||||
TIME_ZONE_ID_DAYLIGHT: FTimeZoneOffset := (TZI.Bias + TZI.DaylightBias);
|
|
||||||
TIME_ZONE_ID_UNKNOWN: FTimeZoneOffset := TZI.Bias;
|
|
||||||
else RaiseLastOSError;
|
|
||||||
end;
|
|
||||||
FTimeZoneOffset := FTimeZoneOffset * 60;}
|
|
||||||
|
|
||||||
// Set noderoot for query helpers box
|
// Set noderoot for query helpers box
|
||||||
{treeQueryHelpers.RootNodeCount := 7;}
|
{treeQueryHelpers.RootNodeCount := 7;}
|
||||||
@ -1632,14 +1636,19 @@ begin
|
|||||||
LogSQL(f_('Pixels per inch on current monitor: %d', [Monitor.PixelsPerInch]), lcDebug);
|
LogSQL(f_('Pixels per inch on current monitor: %d', [Monitor.PixelsPerInch]), lcDebug);
|
||||||
LogSQL(f_('Timezone offset: %d', [FTimeZoneOffset]), lcDebug);
|
LogSQL(f_('Timezone offset: %d', [FTimeZoneOffset]), lcDebug);
|
||||||
|
|
||||||
{Lib := TMySQLLib.Create(ExtractFilePath(Application.ExeName)+'libmariadb.dll', 'libmariadb.dll');
|
// Testwise load libmariadb on Linux and Windows
|
||||||
|
{$IfDef LINUX}
|
||||||
|
LibFile := 'libmariadb.so.3';
|
||||||
|
{$EndIf}
|
||||||
|
{$IfDef WINDOWS}
|
||||||
|
LibFile := 'libmariadb.dll';
|
||||||
|
{$EndIf}
|
||||||
|
Lib := TMySQLLib.Create(ExtractFilePath(Application.ExeName) + LibFile, LibFile);
|
||||||
try
|
try
|
||||||
test := Lib.mysql_get_client_info;
|
LogSQL(Lib.DllFile + ' v'+Lib.mysql_get_client_info() + ' loaded');
|
||||||
LogSQL(test);
|
|
||||||
//ShowMessage(String(Lib.mysql_get_client_info));
|
|
||||||
except on E:Exception do
|
except on E:Exception do
|
||||||
ShowMessage('Wrong error: '+E.Message);
|
ShowMessage(E.Message);
|
||||||
end;}
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user