mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
* Avoid calling TDBConnection.ClearDbObjects() on active database after copying table. Instead, call actRefresh which takes care of a probably opened table object in the table editor.
* Check for table existence via SELECT on IS.TABLES, avoid usage and refresh of db objects here also. * Fixes issue #3250.
This commit is contained in:
@ -237,7 +237,8 @@ type
|
||||
spDbObjectsTable, spDbObjectsCreateCol, spDbObjectsUpdateCol, spDbObjectsTypeCol,
|
||||
spEmptyTable, spRenameTable, spCurrentUserHost,
|
||||
spAddColumn, spChangeColumn,
|
||||
spSessionVariables, spGlobalVariables);
|
||||
spSessionVariables, spGlobalVariables,
|
||||
spISTableSchemaCol);
|
||||
|
||||
TDBConnection = class(TComponent)
|
||||
private
|
||||
@ -1355,6 +1356,7 @@ begin
|
||||
FSQLSpecifities[spChangeColumn] := 'CHANGE COLUMN %s %s';
|
||||
FSQLSpecifities[spSessionVariables] := 'SHOW VARIABLES';
|
||||
FSQLSpecifities[spGlobalVariables] := 'SHOW GLOBAL VARIABLES';
|
||||
FSQLSpecifities[spISTableSchemaCol] := 'TABLE_SCHEMA';
|
||||
end;
|
||||
ngMSSQL: begin
|
||||
FSQLSpecifities[spEmptyTable] := 'DELETE FROM ';
|
||||
@ -1364,6 +1366,7 @@ begin
|
||||
FSQLSpecifities[spChangeColumn] := 'ALTER COLUMN %s %s';
|
||||
FSQLSpecifities[spSessionVariables] := 'SELECT '+QuoteIdent('comment')+', '+QuoteIdent('value')+' FROM '+QuoteIdent('master')+'.'+QuoteIdent('dbo')+'.'+QuoteIdent('syscurconfigs')+' ORDER BY '+QuoteIdent('comment');
|
||||
FSQLSpecifities[spGlobalVariables] := FSQLSpecifities[spSessionVariables];
|
||||
FSQLSpecifities[spISTableSchemaCol] := 'TABLE_CATALOG';
|
||||
end;
|
||||
|
||||
end;
|
||||
|
Reference in New Issue
Block a user