8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-27 18:03:04 +01:00
Commit Graph

454 Commits

Author SHA1 Message Date
dimitr
99caa91b85 DSQL integration into the engine. 2008-02-28 13:48:16 +00:00
dimitr
c7db4d6a64 Get rid of DsqlMemoryPool. 2008-02-20 15:24:21 +00:00
asfernandes
ed51d0728b DSQL sync. changes 2008-02-01 20:18:11 +00:00
alexpeshkoff
39896cb955 Fixed CORE-1671: atexit() calls in client libraries cause segfaults
and CORE-1079: Every attach of fbclient/fbembed library leaks 64KB of memory

To do it:
- created new template GlobalPtr, controlling access to destructors of global objects.
- applied it to global objects.

Also some related cleanup.
2008-01-23 15:52:40 +00:00
asfernandes
05b90fa684 Eliminate some warnings 2008-01-16 14:37:26 +00:00
dimitr
eac5ac337b The merge continued. 2008-01-16 06:52:43 +00:00
alexpeshkoff
0a1e5de41c Applied patch from Dmitry Kovalenko - some constness in DSQL 2007-12-11 15:17:35 +00:00
asfernandes
ad13b126d1 Misc 2007-11-30 00:35:44 +00:00
hvlad
c2800e66e8 Implement CORE-1625 : Implement new setting to relax strict SQL standard's alias checking rules 2007-11-29 17:53:38 +00:00
asfernandes
d8ab6f4b23 Fixed CORE-1624 - MERGE not correctly worked with parameters in MATCHING clause 2007-11-29 15:15:23 +00:00
hvlad
2b47bbe55b Revert files back after wrong commit 2007-11-19 00:21:18 +00:00
hvlad
86f1141328 Execute statement with support of external data source 2007-11-18 22:59:20 +00:00
asfernandes
5d22a267ea Fixed warning - thanks to Dmitry 2007-11-16 13:47:14 +00:00
alexpeshkoff
407cf7e1d8 Changes suggested by Claudio and Adriano. Further cleanup 2007-10-19 11:51:58 +00:00
alexpeshkoff
e4271ba6fa Fixed CORE-1501: Wrong access to SLONG data in dsql_nod 2007-10-17 14:35:31 +00:00
asfernandes
944108171e Use const in SysFunction as suggested by Dmitry Kovalenko 2007-10-12 20:25:04 +00:00
asfernandes
d51c478a2c More complete fix for CORE-1451 2007-09-27 16:04:51 +00:00
asfernandes
63de95f1d9 Fixed CORE-1451 - Using RDB$DB_KEY in where section while selecting from a procedure crashes the server 2007-09-27 15:52:47 +00:00
asfernandes
b5a23c12d1 Improvements:
1) CORE-1387 - Add MILLISECONDS handling to EXTRACT, DATEADD and DATEDIFF functions
2) CORE-663 - EXTRACT(WEEK FROM DATE)
2007-07-31 01:22:59 +00:00
asfernandes
64f80d1914 Fixed CORE-1379 - Invalid parameter type when using it in CHAR_LENGTH function 2007-07-25 15:46:08 +00:00
hvlad
671e59e993 Fixed bug CORE-1373 : Incorrect result of recursive CTE query when recursive member's SELECT list contains expression using self-referenced fields 2007-07-21 21:28:56 +00:00
hvlad
77a5e7498c Improve implementation of nod_src_info to avoid generation of additional blr_begin\blr_end pair 2007-06-29 10:22:50 +00:00
asfernandes
564c2887a2 Second part of fix for CORE-1313, fixed the issue with RDB$DB_KEY and derived tables 2007-06-15 00:41:12 +00:00
asfernandes
ea48ea8b3f Fixed CORE-1313 - RDB$DB_KEY not supported in merge command 2007-06-14 02:15:36 +00:00
robocop
0c819f0520 Misc and VC6 compilation workaround. 2007-06-12 08:29:36 +00:00
asfernandes
f8c2d590a0 Rollback fix for CORE-1245 and CORE-1246 and defer to better times, as each change causes regressions 2007-06-09 19:31:10 +00:00
asfernandes
f4be0d2421 Fixed CORE-1315 - Data type unknown, for most functions ported from Yaffil 2007-06-09 19:18:21 +00:00
robocop
d191a665d3 Misc. 2007-06-09 09:04:59 +00:00
asfernandes
595a185dd3 Rework fix for CORE-1245 to fix:
CORE-1246 - Incorrect column values with outer joins and derived tables,
CORE-1306 - Indices not used for views
2007-06-08 02:20:00 +00:00
asfernandes
c67afcb4ee Improvement CORE-1277 - Automatic transliteration of text blobs 2007-05-22 02:14:20 +00:00
asfernandes
3d246aff00 Rollback fix for CORE-1246 - Incorrect column values with outer joins and derived tables, that broke recursive-CTE and uses scarse contexts 2007-05-18 01:17:27 +00:00
robocop
b7446d9c64 Misc. 2007-05-16 06:53:47 +00:00
asfernandes
1a427efe19 Changed UPDATE OR INSERT to check existence of records with IS NOT DISTINCT 2007-05-13 14:06:41 +00:00
asfernandes
bf895341ef Fixed CORE-1256 - Table columns hide destination variables of RETURNING INTO, and others problems recent introduced 2007-05-13 01:37:54 +00:00
asfernandes
d27a1bdd51 Fixed CORE-1246 - Incorrect column values with outer joins and derived tables 2007-05-06 21:30:38 +00:00
asfernandes
20b25e8c61 Fixed ambiguity problem in NATURAL/USING join and derived tables 2007-05-06 16:45:49 +00:00
asfernandes
c08581d727 Fixed CORE-1244 - Server crash on select * from <recursive CTE> 2007-05-05 03:17:52 +00:00
robocop
52f1b15e0c Misc. 2007-05-02 06:57:18 +00:00
asfernandes
c5cf6ea6b8 Implementation of CORE-1235: NATURAL JOIN and JOIN...USING 2007-04-29 19:04:26 +00:00
asfernandes
676b447138 Misc 2007-04-25 02:26:33 +00:00
asfernandes
b06deea4c6 CORE-1226: Allow RETURNING in INSERT...SELECT, UPDATE and DELETE 2007-04-24 15:22:05 +00:00
dimitr
4eed77897a Done CORE-1213. 2007-04-18 17:29:00 +00:00
robocop
422d659fcb Misc. 2007-04-15 11:25:23 +00:00
asfernandes
8c7076b67f Port of Yaffil builtin functions 2007-04-12 15:56:34 +00:00
alexpeshkoff
f0d465bf34 Fixed gcc warnings, general (un)signed usage cleanup 2007-04-11 09:28:50 +00:00
alexpeshkoff
6e735f7c53 Misc + gcc warning hunting 2007-04-09 16:15:29 +00:00
robocop
f7817e5baa Totally misc. 2007-03-31 06:50:01 +00:00
dimitr
cfd18fdedd Fixed CORE-1183. 2007-03-28 09:47:55 +00:00
dimitr
27e2ee9be7 Small improvement partially related to CORE-1181. It allows to keep the field name if the cast source is an aggregated column. 2007-03-28 09:27:54 +00:00
dimitr
a32435b66d Fixed CORE-1175. 2007-03-22 12:53:58 +00:00
robocop
194c5ec36a Misc (some spaces mixed with tabs). 2007-03-11 03:13:18 +00:00
asfernandes
6fef59af74 Fixed CORE-1156 - Prepare fails when having a parameter in a DSQL statement before a sub query 2007-03-06 15:54:34 +00:00
asfernandes
179eb4f012 No need to generated a outer join if WHEN NOT MATCHED is not present in MERGE 2007-01-26 10:16:31 +00:00
asfernandes
5e818bd4a9 Rename REPLACE to UPDATE OR INSERT 2006-11-26 15:40:10 +00:00
robocop
7f2b0cd25d Fix typos in recent messages. 2006-11-10 08:10:56 +00:00
hvlad
05b028628f Replace few hardcoded error messages by new error codes 2006-11-05 10:54:46 +00:00
asfernandes
4197a8be70 Fixed a bug when the connection charset is multibyte, appeared after recent changes to CsConvert class. 2006-11-02 22:37:19 +00:00
dimitr
651607f5a9 Done CORE-863. 2006-10-24 16:45:43 +00:00
asfernandes
e57edcaa5c Misc 2006-10-20 18:49:23 +00:00
robocop
1b9068c0bf Disable the duplicate field check for sort.
(But keep the check for max items at 255.)
2006-10-19 05:12:28 +00:00
robocop
a270d9c440 Put into the msg file several hardcoded messages marked by Arno to be localized. 2006-10-17 06:03:21 +00:00
asfernandes
6f9092fe35 Misc 2006-10-08 01:57:21 +00:00
robocop
2b27f56428 - Give meaningful message when reaching max group items (255), reported by David Schnepper.
- Misc: more mnemonics for nodes' argument positions.
- Experimental: try to detect conflicting sort options on the same field.
2006-10-07 09:40:59 +00:00
robocop
e0badaed04 Solve problem reported by Bill Oliver in fb-devel: we should complain when someone tries to sort on more than 255 items. 2006-09-30 09:10:28 +00:00
asfernandes
f2e24565f0 Allow only one of WHEN MATCHED and WHEN NOT MATCHED in MERGE as the SQL spec 2006-09-17 01:41:24 +00:00
asfernandes
9b5ae679c3 Fixed problem with REPLACE and WHEN blocks 2006-09-16 15:53:51 +00:00
asfernandes
bafe7ee53c Misc 2006-09-15 01:54:50 +00:00
asfernandes
19c8da717c Be more simple as suggested by Claudio 2006-09-14 11:44:11 +00:00
asfernandes
a40b7b8ae5 MERGE statement 2006-09-14 02:05:32 +00:00
asfernandes
f47711602e Fix the problem with CAST and parameters reported by Maycon Ferraça in fb-devel 2006-09-13 12:59:53 +00:00
dimitr
daa96c44e9 Fixed GCC-based builds. 2006-09-07 11:46:43 +00:00
asfernandes
9d4e6c7199 Misc 2006-09-06 02:43:37 +00:00
robocop
c9e311f45d Misc. 2006-09-05 08:17:26 +00:00
asfernandes
55ec30965d REPLACE statement 2006-09-03 01:09:23 +00:00
aafemt
c662ea7d9e Warnings 2006-08-17 12:08:49 +00:00
robocop
471d052e82 Misc. 2006-08-13 06:46:16 +00:00
asfernandes
e538061c38 Implementation of CREATE/DROP COLLATION and ISQL show/extraction of collations 2006-08-07 16:39:21 +00:00
asfernandes
df38d56bb5 Misc 2006-08-06 18:03:22 +00:00
hvlad
7d1693ae39 Corrected logic of removing recursive members from joins in recursive CTE 2006-08-05 21:56:04 +00:00
dimitr
3231829cf8 Ported fix for CORE-855 to HEAD. 2006-08-04 04:32:27 +00:00
asfernandes
9fc1ccbba5 Misc 2006-08-02 01:22:11 +00:00
hvlad
b20aa92714 Common table expressions implementation 2006-08-01 20:37:58 +00:00
robocop
bcf2cb8701 1.- COALESCE/CASE and VIA (subqueries) allowed breach in computed field checks (no array and no blob).
2.- Misc: since gbak allows not only to backup metadata only but to restore metadata only (even from a full backup), changed the help message.
2006-07-30 02:59:29 +00:00
asfernandes
ea0435247a Misc 2006-07-18 02:45:35 +00:00
dimitr
d5b27fdb17 1) Fixed CORE-831.
2) Solved CORE-779 (partially intermixed with another changes that will be committed tomorrow).
2006-07-17 12:44:18 +00:00
hvlad
fac53c8177 Added blr_src_info. Error call stack now contains not only
procedures\triggers names but line\column numbers also.
Thanks to Eugeney Putilin for idea
2006-07-04 14:44:43 +00:00
dimitr
78c23ca592 Some preparation for RETURNING in UPDATE/DELETE.
To be completed in v3.0.
2006-05-31 18:02:34 +00:00
dimitr
006d5871b0 Restored my previous solution. The final decision is that NOT IN cannot be index-optimized reliably. 2006-05-24 13:19:33 +00:00
alexpeshkoff
b056a118b5 1. Avoid use of STL
2. Reworked exceptions to make status_exception always hold correct status vector
3. Avoid use of RTTI
2006-05-19 15:17:02 +00:00
robocop
1cd8eb20da Cope with old compilers. 2006-05-18 06:26:15 +00:00
dimitr
e3646a03d2 Fixed the regression reported by Adriano. 2006-05-17 04:33:44 +00:00
asfernandes
abc1a41b6d Misc 2006-05-17 02:43:12 +00:00
dimitr
4976c7d29d Committed the correct UPDATE behaviour. Disabled so far. 2006-05-16 09:09:18 +00:00
dimitr
8b45562f81 The DSQL code of the LIST function. Unstable yet. 2006-04-24 17:24:26 +00:00
hvlad
5f105d2154 Make input parameters of EXECUTE BLOCK statement nullable 2006-03-29 09:41:48 +00:00
arnobrinkman
ce6eeb13c7 Fix node compare function for derived fields.
Fixes field test-item #1449377.
2006-03-14 10:57:11 +00:00
asfernandes
32f770b760 Fix incorrect malformed string error, reported by Richard Wesley 2006-03-10 00:08:44 +00:00
dimitr
958b1fea85 Fixed bug in RETURNING INTO code. 2006-03-07 14:42:19 +00:00
dimitr
5ac952b661 There's no need to transform NOT ANY to ALL, as NOT ANY effectively uses indices. 2006-02-15 13:35:53 +00:00
arnobrinkman
a52a8f5c66 Fix incorrect "Ambiguous field name error" reported by Ivan Prenosil:
SELECT
    (SELECT RDB$FIELD_NAME   FROM RDB$RELATION_FIELDS
      WHERE RDB$FIELD_SOURCE = RDB$FIELDS.RDB$FIELD_NAME)
  FROM RDB$FIELDS
 WHERE RDB$FIELD_NAME NOT IN
    (SELECT RDB$FIELD_SOURCE FROM RDB$RELATION_FIELDS)
2006-01-22 19:14:27 +00:00
alexpeshkoff
fb6757bbed fixed gcc warning(s) 2006-01-16 16:31:15 +00:00
asfernandes
608a594696 Fixed problem causing collation lost in sqlsubtype when using dynamic charset - reported by Ivan Prenosil 2006-01-15 18:11:31 +00:00
dimitr
75fade8b0a Ported solution for SF #1371274 from Yaffil + minor cleanup. 2005-12-12 17:27:10 +00:00
dimitr
9e7ae46d1f Simplified code a bit. Fixed the crash with the usage of TRIM in aggregation. 2005-11-30 09:03:53 +00:00
arnobrinkman
ee9ac954ee Fix column-name problem with UNION and derived fields.
Problem found by Volker Rehn.
2005-11-28 23:06:53 +00:00
arnobrinkman
d1e0291152 Add missing nodes to sub-select detection 2005-11-26 16:15:47 +00:00
arnobrinkman
a381385af0 Fix problem with sub-queries/derived tables in the HAVING clause 2005-11-08 23:49:50 +00:00
dimitr
5e8af7b048 Implemented RECREATE TRIGGER. 2005-10-29 09:15:37 +00:00
arnobrinkman
a93df44449 Fix NEW/OLD context problem found by Dmitry 2005-10-25 20:42:29 +00:00
dimitr
868a5bb21f Better (and more honest) diagnostics. 2005-10-21 09:43:26 +00:00
robocop
e2dd9845b5 Totally misc. 2005-10-08 06:47:34 +00:00
robocop
7d304b0fbb Fix SF Bug #1292007
Move some hardcoded error texts to the msg database.
2005-10-06 06:08:10 +00:00
dimitr
e285db7acf Fixed the issue with zero-initialized status vector during prepare. 2005-09-14 19:06:28 +00:00
robocop
aab2d20725 - Get rid of DBB_v3 in DSQL and put a message just in case we find ODS<=7 (impossible in theory, since FB wouldn't open such db).
- Put mnemonics for two hardcoded error msgs I hijacked from DYN years ago. Now they are defined for the SQLERR facility.
2005-09-10 07:15:24 +00:00
robocop
36f8683511 Get rid of my old hack to solve a problem between John/Mark's FIRST/SKIP parameters type and dialect detection. The dialect is in the request. 2005-09-03 08:03:39 +00:00
robocop
057f098a28 - Misc.
- Detect a limit case with params and containing or starting.
2005-09-03 07:47:32 +00:00
dimitr
898cb02240 1) Made output parameter naming a common procedure instead of select-list private code.
2) Allowed value expressions in the RETURNING clause.
2005-09-02 05:30:16 +00:00
dimitr
faa8162a2b Fixed SEGV reported by Konstantin. 2005-08-25 12:37:26 +00:00
dimitr
0cd5e57eaa Added optional seconds precision to CURRENT_TIME and CURRENT_TIMESTAMP
as agreed with Ann and others times ago.
2005-08-24 09:42:14 +00:00
dimitr
8df5a70299 Rolled back my commit as a performance looser.
More precise savepoints handling is being investigated.
2005-08-24 06:21:47 +00:00
dimitr
9a489515b9 Fixed PSQL exception handling which never worked consistently. 2005-08-22 10:12:13 +00:00
asfernandes
0b1eb55d62 Fixed SF field-test #1249187 - 2.0a3: String literals dest. for large CHAR fields truncated 2005-08-21 15:52:30 +00:00
arnobrinkman
b900f56435 Allow outer reference in derived table to higher scope-levels 2005-08-16 21:19:17 +00:00
robocop
773b8035c1 Totally misc. 2005-08-04 04:03:01 +00:00
arnobrinkman
d41f73b112 Sigh, if i change something then i must do it right 2005-08-02 08:36:51 +00:00
arnobrinkman
ec541b28d5 Fix unreleased contexts problem with derived tables, found by Vlad. 2005-08-01 19:05:57 +00:00
arnobrinkman
e2a664a6a2 Fix and simplify PLAN alias lookup 2005-07-26 11:54:37 +00:00
arnobrinkman
22ac7c9cdc Fix derived table issues with NEW/OLD contexts (Triggers/check-constraints)
Also adjust IN predicate behaviour to derived table.
PLAN parsing for derived tables will be fixed later.
2005-07-25 14:43:28 +00:00
asfernandes
d524eec86f Fixed SF #1242379 - Collation changes VARCHAR's length 2005-07-22 02:08:14 +00:00
dimitr
1a3218625d Added DSQL support for ROLLBACK RETAIN. 2005-07-20 10:05:57 +00:00
arnobrinkman
21c839b45a Send annoying unemployed code out of the door 2005-07-13 20:07:13 +00:00
robocop
e28ed6b27c Try to indicate position of incomplete commands.
Some casts because statuses are fixed 32 quantities, not natural int types.
2005-06-16 05:11:08 +00:00
asfernandes
890494ac7c 1) Fixed SF #1016040 Missing external libraries causes engine exception
2) Use better error messages
2005-06-14 03:16:54 +00:00
dimitr
40b5c1d6bb RETURNING implementation. 2005-06-13 12:45:42 +00:00
asfernandes
4efb74fc51 Removed some compiler messages 2005-06-13 02:12:14 +00:00
asfernandes
3d93cdf69c Fix possible problems with larger columns sizes noted by Claudio 2005-06-10 02:03:08 +00:00
asfernandes
559ce29c51 1) Replace length_ to strlen as noted by Claudio and Dmitry
2) Change USHORT to ULONG in intl.cpp
2005-06-06 18:14:10 +00:00
dimitr
d9294d7938 Added new error message. 2005-06-06 13:37:31 +00:00
robocop
b8d1f00f94 - Corrections and changes to Adriano's commit, subject to his inspection.
- Solved an endless loop with trim and zero-length trim characters, etc.
- Some places are signaled with FB_COMPILER_MESSAGE for prompt attention.
2005-06-06 08:30:03 +00:00
asfernandes
59213efe7e Merge INTL branch into HEAD 2005-05-27 22:45:31 +00:00
arnobrinkman
1e539b16c1 fixed missed return, thanks to Claudio 2005-05-23 23:16:49 +00:00
robocop
3aaa840483 Misc. 2005-05-22 03:11:41 +00:00
robocop
b490df3a41 ALTER EXTERNAL FUNCTION: be able to change the entry_point or the module_name when the UDF cannot be dropped to correct the declaration because it's used in some view, procedure, trigger or check. 2005-05-22 02:42:17 +00:00
robocop
95d8b36260 Misc. 2005-05-19 23:41:17 +00:00
arnobrinkman
0132e696f2 Fix mapping problem when derived table was used as sub-query.
This was only possible since pass1_any() behaviour has been changed.
Normally a derived table cannot access fields outside the derived table context.
2005-05-18 18:55:57 +00:00
robocop
0285f6bf76 - Implement the proposed COMMENT keyword to allow descriptions in database objects. Subject to change or withdrawal.
- Enhance some messages. Reuse some msg numbers that were duplicate.
- Fix some issues found in Alex recent MetaName-related commits.
2005-05-17 07:17:25 +00:00
arnobrinkman
0f07677e46 Fix errors generated by IN-predicate due pass1_any() change 2005-05-04 19:38:47 +00:00
arnobrinkman
6a73b87b62 Fix bug SF #1191006 Using where params in SUM return incorrect results
parameters weren't checked on equality in node_match()
2005-05-04 09:53:37 +00:00
dimitr
e288d2ac49 Fixed bug found by Arno. 2005-05-04 08:44:35 +00:00
dimitr
27340d7daf 1) Fixed buggy behaviour of IN vs FIRST/SKIP.
2) Allowed UNIONs in ANY/ALL/IN subqueries.
Subject of Arno's review.
2005-05-02 12:41:02 +00:00