refs #6491 refactor(order_filter): optimized
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
31c1add02b
commit
f4fabb9fff
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Added
|
### Added
|
||||||
- (Ticket -> Adelantar) Permite mover lineas sin generar negativos
|
- (Ticket -> Adelantar) Permite mover lineas sin generar negativos
|
||||||
- (Ticket -> Adelantar) Permite modificar la fecha de los tickets
|
- (Ticket -> Adelantar) Permite modificar la fecha de los tickets
|
||||||
|
- (Trabajadores -> Notificaciones) Nueva sección (lilium)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
@ -139,6 +139,8 @@ module.exports = Self => {
|
||||||
filter = mergeFilters(filter, {where});
|
filter = mergeFilters(filter, {where});
|
||||||
const stmts = [];
|
const stmts = [];
|
||||||
let stmt;
|
let stmt;
|
||||||
|
stmts.push(`SET @_optimizer_search_depth = @@optimizer_search_depth`);
|
||||||
|
stmts.push(`SET SESSION optimizer_search_depth = 0`);
|
||||||
|
|
||||||
stmt = new ParameterizedSQL(`
|
stmt = new ParameterizedSQL(`
|
||||||
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
|
CREATE OR REPLACE TEMPORARY TABLE tmp.filter
|
||||||
|
@ -195,6 +197,7 @@ module.exports = Self => {
|
||||||
stmt.merge(`GROUP BY id`);
|
stmt.merge(`GROUP BY id`);
|
||||||
stmt.merge(conn.makePagination(filter));
|
stmt.merge(conn.makePagination(filter));
|
||||||
stmts.push(stmt);
|
stmts.push(stmt);
|
||||||
|
stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`);
|
||||||
|
|
||||||
stmt = new ParameterizedSQL(`SELECT * FROM tmp.filter`);
|
stmt = new ParameterizedSQL(`SELECT * FROM tmp.filter`);
|
||||||
stmt.merge(conn.makeOrderBy(filter.order));
|
stmt.merge(conn.makeOrderBy(filter.order));
|
||||||
|
|
Loading…
Reference in New Issue