Dmitry Yemanov
b2d03a0f51
More correct plan output for subqueries generated during NOT IN transformation
2025-01-10 11:19:54 +03:00
Dmitry Yemanov
96dbef9cb3
This should fix #8086 : IN predicate with string-type elements is evaluated wrongly against a numeric field
2024-05-02 14:35:25 +03:00
Vlad Khorsun
1d96c10fe9
Fixed bug #8087 : AV when preparing a query with IN list that contains both literals and sub-query
2024-04-17 22:36:09 +03:00
Dmitry Yemanov
8d601425b1
Solution for #7568 : Equivalence of boolean condition in partial index ( #7987 )
...
* Solution for #7568 : Equivalence of boolean condition in partial index
* Follow Adriano's correction
Co-authored-by: Adriano dos Santos Fernandes <529415+asfernandes@users.noreply.github.com>
* Exclude IS [NOT] and IS [NOT] DISTINCT FROM from the optimization
---------
Co-authored-by: Adriano dos Santos Fernandes <529415+asfernandes@users.noreply.github.com>
2024-02-02 13:07:28 +03:00
Vlad Khorsun
2031bd9b50
Missed 'break'
2023-11-16 13:36:17 +02:00
Vlad Khorsun
c95aaca16a
Fixed bug #7839 : Potential bug in BETWEEN Operator
2023-11-13 10:16:28 +02:00
Dmitry Yemanov
1d51ee19a5
Revert "Minor optimization for NOT IN with nulls inside the list: do not evaluate the remaining items after the first NULL is found"
...
This reverts commit c7d825b6d8
.
2023-10-14 19:04:38 +03:00
Dmitry Yemanov
c7d825b6d8
Minor optimization for NOT IN with nulls inside the list: do not evaluate the remaining items after the first NULL is found
2023-10-13 10:13:13 +03:00
Dmitry Yemanov
40445aa881
Fixed #7795 : NOT IN <list> returns incorrect result if NULLs are present inside the value list
2023-10-13 10:11:14 +03:00
Dmitry Yemanov
3065440386
This should fix #7760 : Parameters inside the IN list may cause a string truncation error
2023-09-26 14:00:19 +03:00
Adriano dos Santos Fernandes
f8ed006057
Ressurect TriState, replace Nullable<bool> by TriState, remove Nullable.
2023-09-18 20:38:33 -03:00
Dmitry Yemanov
f239ca161f
Surface internal optimization modes (all rows vs first rows) at the SQL and configuration levels ( #7405 )
...
* Surface internal optimization modes (all rows vs first rows) at the SQL and configuration levels.
* Add session-level control over the optimization strategy
* More informative name as suggested by Adriano
* Cost-based approach for the first-rows optimization mode
2023-09-13 21:21:12 +03:00
Dmitry Yemanov
5df6668c7b
Allow computable but non-invariant lists to be used for index lookup
2023-09-07 20:55:52 +03:00
Dmitry Yemanov
0493422c9f
Better processing and optimization if IN <list> predicates ( #7707 )
...
* WIP
* Original (circa 2022) implementation of the IN LIST optimization, with some post-fixes and minor adjustments
* Make it possible to optimize IN <list> for middle segments in compund indices
* Avoid modifying the retrieval structure at runtime, it may be shared among concurrent requests
* Simplify the code a little. Better cost calculation. Support both root-based and sibling-based list scans inside the same plan node.
* Removed the unneeded const casts and other changed as suggested by Adriano
2023-09-04 09:13:10 +03:00
Adriano dos Santos Fernandes
670d3513ca
Improvement #7688 - Profiler should not miss query's top-level access paths nodes.
continuous-integration/drone/push Build is passing
2023-07-29 23:51:15 -03:00
Adriano dos Santos Fernandes
29b1d829b4
Rename methods related to cursor/recsrc ids, removing "profile" from them.
2023-07-26 08:02:11 -03:00
Adriano dos Santos Fernandes
e05d8f7d15
Fix #7553 - Firebird 5 profiler error with subselects.
continuous-integration/drone/push Build encountered an error
2023-04-26 20:03:14 -03:00
Dmitry Yemanov
1c2470c4cc
Adjustments as per Adriano's comments
2023-01-04 12:08:11 +03:00
Dmitry Yemanov
36d011f731
Prettier plan output: distinguish between main queries and sub-queries, show cursor names/options, report line numbers
2023-01-02 13:40:29 +03:00
Adriano dos Santos Fernandes
5cc8a8f7fd
SKIP LOCKED clause for SELECT WITH LOCK, UPDATE and DELETE ( #7350 )
...
* SKIP LOCKED clause for SELECT WITH LOCK, UPDATE and DELETE.
* Misc.
* Change as Dmitry suggested and fix Windows build.
* Change order of LOCK to between SKIP and FIRST.
* Avoid refetch with READ COMMITTED transaction as suggested by Dmitry.
* Revert changes to TRA_wait and use tra_probe in vio/prepare_update
when skipping locked.
* Add to CHANGELOG.
2022-10-28 07:09:01 -03:00
Adriano dos Santos Fernandes
98f678d4ee
Rename class jrd_req to Request.
2022-02-13 10:51:30 -03:00
Dmitry Yemanov
19f2bfdd01
Refactored the optimizer. Better debug logging.
2022-02-09 10:20:16 +03:00
Dmitry Yemanov
ed0eb94ae9
Restore simpler signature for node methods
2021-10-12 20:17:17 +03:00
Adriano dos Santos Fernandes
24581bb7fe
Fix #6875 - Significant performance regression of SIMILAR TO and SUBSTRING(SIMILAR)
...
when pattern is taken from variable (rather than directly specified).
2021-07-02 11:22:59 -03:00
Adriano dos Santos Fernandes
8781146319
Fix #6854 - Crash occurs when use SIMILAR TO and compare string with pattern
...
that contains non-ascii character with suppressed exception handling
(or "Invalid SIMILAR TO pattern" raises otherwise).
2021-06-14 15:08:34 -03:00
Dmitry Yemanov
9f86d1ad4e
Ensure the cursor is closed after error
2020-11-04 09:35:21 +03:00
Dmitry Yemanov
d50aa0918d
Refactored PSQL savepoint envelopes. Made the savepoint undo logic consistent across the codebase. Added assertions to prevent releasing the savepoint that must be undone.
2020-09-25 11:15:31 +03:00
Dmitry Yemanov
82b2b2188e
Refactored the code backing DBKEY concatenation for views. Re-attempted to fix CORE-4985: Non-privileged user can implicitly count records in a restricted table.
2020-06-15 19:25:35 +03:00
Adriano dos Santos Fernandes
1951362a73
Improve allocation of request impure space, specially statements, to not waste alignment space (CORE-6330).
2020-06-11 14:28:11 -03:00
Adriano dos Santos Fernandes
734bca7a4f
Improve statement memory consumption removing the type from the nodes, adding as virtual method to the vtable.
2020-06-07 21:58:31 -03:00
Adriano dos Santos Fernandes
7806ad34df
Use std::initializer_list in RegisterNode to avoid multiple variable registration for each node.
2020-06-05 13:57:46 -03:00
Adriano dos Santos Fernandes
28e18749ff
WIP: Reimplementation of SIMILAR TO and SUBSTRING...SIMILAR using Google's re2 library.
...
This should fix:
CORE-4874
CORE-5664
CORE-3858
CORE-6088
CORE-3773
CORE-5931
CORE-6088
CORE-4893
2019-08-10 22:39:19 -03:00
Adriano dos Santos Fernandes
45d5e3aa7a
Refactor public include files ( #205 )
...
Refactor include files.
2019-06-03 11:45:00 -03:00
Dmitry Yemanov
4534a64791
Frontported and refactored PR #202 (CORE-5074)
2019-05-23 18:55:06 +03:00
Adriano dos Santos Fernandes
e438bdeb60
Fixed CORE-6033 - SUBSTRING(CURRENT_TIMESTAMP) does not work.
2019-03-22 12:45:06 -03:00
Dmitry Yemanov
8bb1ea9522
This workaround should fix MSVC12 build issues (ambiguous call to overloaded function for std::function and SomeNode* overloads)
2018-11-28 13:52:18 +03:00
Adriano dos Santos Fernandes
4ce50c0503
Fix CORE-5395 - Invalid data type for negation (minus operator).
2018-11-25 10:45:52 -02:00
Adriano dos Santos Fernandes
c5f8e6ca46
Avoid calls to JRD_get_thread_data.
2017-11-26 18:58:25 -02:00
Adriano dos Santos Fernandes
63a03dfc8f
Remove pool reference and children lists in each node.
...
Children lists will be created and destroyed on demand.
2017-11-26 18:58:25 -02:00
Adriano dos Santos Fernandes
d8fea3ec91
Avoid method calls in NULL objects.
...
It's undefined behavior even with non-virtual methods not accessing *this.
2017-06-09 17:10:46 +00:00
028248b194
Merged changes from master branch
2017-02-16 17:56:23 +03:00
Dmitry Yemanov
4f7843d5b5
Bugfix CORE-5414: Error restoring on FB 3.0 from FB 2.5: bugcheck 221 (cannot remap)
2017-01-05 21:32:44 +03:00
5aede150e3
Decimal floating point numbers - first draft
2016-11-11 17:59:55 +03:00
Adriano dos Santos Fernandes
8a4b7e3b79
Fixed CORE-5367 - Regression: (boolean) parameters as search condition no longer allowed.
2016-10-04 11:50:43 -03:00
Dmitry Yemanov
118a78e6e6
Bugfix CORE-5236: IN/ANY/ALL predicates may cause sub-optimal (late
...
filtering) execution of joins.
2016-07-09 01:14:50 +03:00
Adriano dos Santos Fernandes
d7eb6fe4d0
Fixed CORE-5167 - Allow implicit conversion between boolean and string.
2016-04-04 14:49:44 -03:00
asfernandes
152b6bdc01
Fixed CORE-5130 - Compiler issues message about "invalid request BLR" when attempt to compile wrong DDL of view with both subquery and "WITH CHECK OPTION" in its DDL.
2016-03-09 18:45:38 +00:00
hvlad
2dc879afca
This should fix known issues with MERGE and stable cursor (see CORE-3362).
...
Thanks to Dmitry for idea
2016-02-25 09:20:01 +00:00
alexpeshkoff
139331c7e3
Enhanced memory leaks search - changed FB_NEW to FB_NEW_POOL,
...
plain new to FB_NEW, making allocated with it blocks tagged with file/line.
Make related code slightly better readable.
2015-10-12 14:26:00 +00:00
dimitr
7857160480
Misc.
2015-10-08 13:24:21 +00:00