mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Bugfix: (regression) Format()'ing the query caused % operators in filters to break.
This commit is contained in:
@ -1355,8 +1355,6 @@ begin
|
|||||||
if Filter <> '' then sl_query.Add('WHERE ' + Filter);
|
if Filter <> '' then sl_query.Add('WHERE ' + Filter);
|
||||||
// Apply custom ORDER BY if detected in registry
|
// Apply custom ORDER BY if detected in registry
|
||||||
if sorting <> '' then sl_query.Add( sorting );
|
if sorting <> '' then sl_query.Add( sorting );
|
||||||
// Apply LIMIT
|
|
||||||
sl_query.Add('LIMIT %d, %d');
|
|
||||||
DataGridCurrentQuery := sl_query.Text;
|
DataGridCurrentQuery := sl_query.Text;
|
||||||
|
|
||||||
SetLength(FDataGridResult.Rows, DataGrid.RootNodeCount);
|
SetLength(FDataGridResult.Rows, DataGrid.RootNodeCount);
|
||||||
@ -5484,7 +5482,7 @@ begin
|
|||||||
start := Node.Index - (Node.Index mod GridMaxRows);
|
start := Node.Index - (Node.Index mod GridMaxRows);
|
||||||
limit := DataGrid.RootNodeCount - start;
|
limit := DataGrid.RootNodeCount - start;
|
||||||
if limit > GridMaxRows then limit := GridMaxRows;
|
if limit > GridMaxRows then limit := GridMaxRows;
|
||||||
query := Format(DataGridCurrentQuery, [start, limit]);
|
query := DataGridCurrentQuery + Format(' LIMIT %d, %d', [start, limit]);
|
||||||
|
|
||||||
// start query
|
// start query
|
||||||
MainForm.ShowStatus('Retrieving data...');
|
MainForm.ShowStatus('Retrieving data...');
|
||||||
|
Reference in New Issue
Block a user