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

291 Commits

Author SHA1 Message Date
dimitr
75ac53eeb4 Temporarely rolled back to the previous end_trigger logic due to found issues.
Still looking for a proper solution.
2005-09-28 13:23:02 +00:00
dimitr
dead116ac8 Significant changes in the DDL source parsing (begin_*, end_* rules):
1) store WITH CHECK OPTION instead of WITH CHECK (views)
2) store DEFAULT <value> instead of <value> (procedure parameters)
3) attempt to fix the bug in end_trigger causing longer string to be stored (try e.g. DEFAULT CURRENT_TIME NOT NULL)
4) major cleanup of begin_trigger and indentation, simplified some parser rules
Now awaiting for the Claudio's attack :-)
2005-09-27 11:17:54 +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
2f4312b6c6 Added optional seconds precision to CURRENT_TIME and CURRENT_TIMESTAMP
as agreed with Ann and others times ago.
2005-08-24 09:22:40 +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
robocop
22742ccdd7 Tweak DYN to solve several issues:
- Allow to set and drop defaults for table's fields (as it has been possible with domains).
- Stop people from setting a default value for array types.
- Close checking holes that allowed people to change from scalar types to array types and vice/versa.
- Improve some error messages.
2005-08-14 05:48:20 +00:00
dimitr
50add99198 Fixed the NEXT VALUE FOR bug for dialect 3. Thanks to Claudio. 2005-07-27 05:36:43 +00:00
dimitr
1a3218625d Added DSQL support for ROLLBACK RETAIN. 2005-07-20 10:05:57 +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
dimitr
40b5c1d6bb RETURNING implementation. 2005-06-13 12:45:42 +00:00
robocop
3a8cd43a05 Please Dmitry and try to report the line/column of an incomplete statement. 2005-06-11 00:20:22 +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
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
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
1fc49649a0 Getting rid of commented code that belonged to the dead shared cache and/or WAL plus making COLLATION non-reserved word and having trivial special handling for COMMENT so it's recognized as token only if it's the first token. 2005-05-19 07:41:27 +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
robocop
d0115322ac Misc. 2005-04-18 03:24:34 +00:00
robocop
21af4a943a 1.- Disambiguate rules between READ BLOB/INSERT BLOB and metadata definitions involving blob fields.
2.- Fix the source of DSQL crash with READ BLOB.
3.- Fix (1) has the side effect of stopping invalid DDL like
create table t(b blob 0);
2005-03-31 06:20:29 +00:00
dimitr
d25fcdc0c4 Implemented RECREATE EXCEPTION and CREATE OR ALTER EXCEPTION. 2005-03-26 16:11:52 +00:00
dimitr
b8e5350158 Parser simplification and minor cleanup. 2005-03-26 13:32:29 +00:00
dimitr
37f3266bb0 Simplify code paths a bit. 2005-02-21 12:48:39 +00:00
hvlad
9b809e2193 Allow EXECUTE BLOCK to work with blob parameters. 2005-01-26 14:52:38 +00:00
dimitr
84e104e7b7 More compatibility modes for the parser. 2005-01-20 12:33:54 +00:00
robocop
72e54eb27d First attempt to fix SF Bug #512975.
Please let me know if the problem disappears or there's a bad side effect that I didn't detect.
2005-01-17 09:16:40 +00:00
robocop
b5317a413a Totally misc. 2004-12-31 10:41:43 +00:00
dimitr
ab51816298 Fixed issues spotted by Claudio. 2004-12-03 07:07:15 +00:00
dimitr
28ed1df100 1. Parser cleanup
2. SQL-99 synonyms for generators DDL/DML
3. Implemented REVOKE ADMIN OPTION FROM
2004-12-02 22:53:51 +00:00
skidder
e823628754 Dmitry asked me to add support for calling UDF routines ignoring return arguments so did I 2004-11-25 00:47:20 +00:00
robocop
d6535351a2 Misc: style. 2004-11-24 09:22:07 +00:00
skidder
c40eb08a27 Remove CURRENT_DATABASE keyword 2004-11-22 20:50:34 +00:00
dimitr
c1cab92cab 1) Reworked error reporting
2) Allowed positioned updates for explicit cursors
3) Fixed some possible server crashes
2004-11-17 14:50:33 +00:00
skidder
1e26d6c80d CURRENT_DATABASE implementation. Established identity may also be used for isc_info_db_id datum 2004-11-11 05:37:52 +00:00
robocop
5a33aeef91 Misc: extra semicolons do not help. :-) 2004-11-07 10:38:13 +00:00
dimitr
7506b3568c Changed non-standard WEEKDAY and YEARDAY extentions to become non-reserved words. 2004-10-27 12:14:54 +00:00
dimitr
42c929cfb1 Ported UPDATE/DELETE extentions from Yaffil. 2004-10-27 09:33:08 +00:00
dimitr
a9370eefa8 Replaced "==" with a SQL-99 compliant distinct predicate. 2004-10-17 08:47:15 +00:00
dimitr
cd413c9b8a Added the equivalence operator. The major index optimizations are done.
Notes:
1) Some optimizations will follow after more deep analysis.
2) The syntax "==" is not yet agreed on. I'd prefer it to be changed.
2004-10-14 18:54:54 +00:00
dimitr
a1bbad7ccf The entire RSE handling in the parser is slightly rewritten. New join syntax is introduced.
Notes:
1) Some features are disabled (via isc_wish_list) yet due to their incomplete implementation.
2) The parser may become unstable or cause regressions. It will be fixed ASAP.
2004-10-13 18:37:53 +00:00
robocop
a8da598248 Redundant casts. 2004-10-08 11:08:42 +00:00
robocop
ed17cfafbf Style:
if<space>(
for<space>(
switch<space>(
while<space>(
2004-10-04 08:15:00 +00:00
dimitr
9efeab8808 Fixed AV in the parser. 2004-10-03 11:39:03 +00:00
robocop
31ba754981 After talking to Ann, decided to disable several items:
- obsolete items like WAL and JOURNAL (cleaned in the past)
- crud from attempts never finished like the shared cache manager for Classic
- DSQL nodes that aren't used. This allowed freeing some keywords.
The functionality was disabled by commenting the code. No code has been deleted.
2004-10-03 04:49:04 +00:00
robocop
7dcb66a250 When you call va_start, call va_end, don't assume it does nothing because some platforms don't have code for it!
Changed some sprintf to SNPRINTF. Work in progress WRT wrapper for this function.
2004-09-25 10:28:09 +00:00
alexpeshkoff
5ba5453a30 fixed AV in DECLARE FILTER 2004-09-08 12:01:30 +00:00
dimitr
0256d424e1 Allowed UNION DISTINCT equal to just UNION (see chapter 7.13 of the SQL spec). 2004-09-06 19:17:16 +00:00
robocop
1994913da7 Bring DSQL up to date with UDF capabilities in the engine.
Introduce SCALAR_ARRAY token.
2004-08-27 04:52:32 +00:00
dimitr
e5ef9b2782 Ported IIF function from Yaffil.
Implemented as yet another abbrevation for CASE.
Added as a non-reserved keyword.
2004-08-19 11:19:48 +00:00
skidder
1460ac61db Fix one more serious issue noted by Valgrind. Views could be randomly using blr_singleton when defined 2004-08-18 00:02:24 +00:00
dimitr
c1407600f5 Allowed NULL to be a syntactical value. 2004-08-17 13:25:34 +00:00
alexpeshkoff
31039a254e next step preparing to allocate auto objects memory from appropriate pool 2004-08-16 12:28:43 +00:00
alexpeshkoff
1591a54e5e Thread cleanup:
1. Added macros to declare thread entrypoints
2. THD_mutex_* functions use Firebird::Mutex
3. Thread local storage use fb_tls.h
2004-06-08 13:41:08 +00:00
alexpeshkoff
9a34ce553c make bool (isEmpty/hasData) checks for string and stack safe 2004-05-27 16:26:52 +00:00
brodsom
75a0483d75 -Comment some common.h unused macros
-Replace VA_START macro with va_start function (it was already some places where it is not used)
2004-05-23 23:28:06 +00:00
brodsom
06f7148859 -Replace *_thread_data macros with inline functions 2004-05-22 14:23:10 +00:00
brodsom
68cb86b274 - Remove *_THREAD_DATA definitions from thd.h, are unneeded and conflicts with definitions in providers/services main headers (which need to use undef).
- Use different names for each service/provider *_THREAD_DATA macros.
2004-05-19 18:14:29 +00:00
eku
7009af2b13 Fixed compiler error: cannot convert dsql_nod**' to dsql_nod*' in initialization 2004-05-06 05:46:24 +00:00
skidder
8a4cb13eb2 Care about quirks of Windows platform 2004-05-03 01:53:24 +00:00
skidder
43cb0d1ce4 Y-Valve handle translation layer 2004-05-02 23:06:37 +00:00
alexpeshkoff
e362fdbef3 fixed number problems after lls to Stack conversion 2004-04-21 14:48:23 +00:00
alexpeshkoff
045e9dc8ec 1. removed any mentions of blk_pool() from engine (and method itself)
2. replaced 'struct lls' with 'template Stack'
2004-04-18 14:22:27 +00:00
robocop
59b235cea3 Small corrections 2004-04-10 00:25:22 +00:00
skidder
b80d4eb99d Fix counting of line numbers in DSQL parser when multi-line literals and identifiers are used 2004-04-02 03:24:25 +00:00
robocop
1824343930 Cleanup.
Fixed a linking error with MSVC6, too.
2004-03-28 09:10:30 +00:00
robocop
f58c769c37 Cleanup. In geeky words:
PandoraBox* pbox = reinterpret_cast<PandoraBox*>(&can_of_worms);
pbox->open();
pbox->flush();
Nickolay may want to undo my ods.h changes if gcc insists
in its crusade against non-PODs and poodles.
2004-03-18 05:56:06 +00:00
skidder
c64f31b712 Fix some warnings from GCC/Linux build. Some of them were subtle errors 2004-03-12 07:00:52 +00:00
robocop
663e3b16e7 Cleanup 2004-02-02 11:02:12 +00:00
dimitr
5deb857913 Removed obsolete EXECUTE VARCHAR syntax. 2004-01-31 13:35:37 +00:00
stryqx
501ba459c9 Change PAGE_SIZE to KW_PAGE_SIZE so as not to conflict with system define
on FreeBSD.
2004-01-26 07:06:37 +00:00
skidder
dc9d71a768 Use static bison parser stack and allocate it from thread stack 2004-01-23 06:35:26 +00:00
skidder
08eee5ebaa Further AMD64 fixes. Given this fixes you may start playing with databases using isql_static. 2004-01-21 07:18:30 +00:00
hvlad
d09206678b Added support for default parameters and EXECUTE BLOCK statement 2004-01-16 10:43:21 +00:00
robocop
06a4df3708 A requiem for JOURNAL and WAL.
Instructions in the list.
2004-01-06 10:33:18 +00:00
skidder
92576263ee Fix minor flaw in explicit nulls placement design. This change doesn't cause any
user-visible changes in engine behavior. Fix is critical for future development
in this area and needs to be backported in B1_5_Release.
2003-12-21 00:07:03 +00:00
brodsom
7844cc7cd4 Fix scope change that breaks posix build 2003-12-02 02:47:34 +00:00
robocop
9fafc348bf const correctness
vars in scope
minimal interface cleanup
small bug fixes
2003-11-28 06:48:34 +00:00
brodsom
04f3b01b9d -Remove unneeded win32 headers 2003-11-17 23:39:38 +00:00
eku
71fab4de17 Yacc doesn't like C++ comments in the language section. 2003-11-11 14:47:08 +00:00
robocop
f55c6f6f8c const correctness and cleanup 2003-11-10 09:16:38 +00:00
brodsom
43683ea52b Removing gdsold.h 2003-11-07 23:27:24 +00:00
dimitr
270dcf6aa0 Added ROWS clause. FIRST/SKIP remains allowed in unions, although I still think it doesn't have much sense. 2003-11-07 14:10:16 +00:00
brodsom
ff070a16a8 Replacing assert with fb_assert 2003-11-03 23:59:24 +00:00
dimitr
08a9f40b52 1. Reworked cursor management
2. Added explicit cursor statements
3. Slightly reworked LEAVE code
4. Lots of cleanup
2003-11-02 12:28:30 +00:00
robocop
8182b6cba2 const correctness and other tasks 2003-10-16 08:51:06 +00:00
brodsom
938e66eb2f Macro cleaning 2003-10-14 22:22:32 +00:00
aafemt
b5994fabad sym -> dsql_sym + some 'struct' cleanup 2003-10-01 10:58:07 +00:00
skidder
235db035ce Ok, i'm joining Firebird destruction team with my cleanup:
1. Bring trace DSQL, DYN and BLR trace logging up-to-date
2. Remove redundant CSB pointer dereferences in BLR parser and request compiler
3. Convert RIGHT JOIN to LEFT JOIN early during BLR parsing
4. Check BLR syntax for unititalized contexts usage
5. Some type-safety and const-correctness fixes
2003-09-28 21:36:05 +00:00
dimitr
f1cde7d613 Slightly reworked my labels implementation. 2003-09-28 11:12:03 +00:00
brodsom
9d5721473a Removing SHLIB_DEFS 2003-09-22 17:56:35 +00:00
brodsom
a2713837d2 Cleaning macros 2003-09-20 23:28:38 +00:00
arnobrinkman
71b17588d9 Added ORDER BY support on derived tables. (Suggested by Dmitry Yemanov) 2003-09-15 21:21:40 +00:00
dimitr
f7aa490111 The final part of my little PLAN enhancement. 2003-09-14 15:37:05 +00:00
brodsom
b46945d049 BOOLEAN cleaning 2003-09-12 01:41:03 +00:00
skidder
5761966226 Make Win32 version of engine compile 2003-09-08 21:44:44 +00:00
skidder
77b17de987 NBACKUP-related changes and some clean-up 2003-09-08 20:23:46 +00:00
brodsom
a4416db52a -Replace BOOLEAN, TRUE and FALSE 2003-09-04 21:26:15 +00:00
arnobrinkman
cdec93e466 missing line/column-numbers 2003-08-28 20:29:07 +00:00
brodsom
602c201989 -Remove NULL_PTR
-Remove unneeded NULL casts
-Remove (void) function return cast
2003-08-28 13:07:29 +00:00
aafemt
66c47aeb65 move debug and error handling stuffs away from dsql.h 2003-08-28 10:58:35 +00:00
dimitr
323bae2372 1. MAP renamed to DSQL_MAP
2. Minor cleanup
3. Fixed BREAK/LEAVE code to support FOR EXECUTE STATEMENT loops
4. Added support for loop labels and LEAVE <label> statement
5. Fixed SUBSTRING to support value expressions as its arguments
2003-08-26 07:13:33 +00:00
arnobrinkman
5f844f7428 added comment 2003-08-16 13:14:35 +00:00
arnobrinkman
9e82b6d20b Fixed ambiguous columnname problems with derived tables.
Added support for unnamed derived tables.
2003-08-16 00:36:54 +00:00
arnobrinkman
c12b4da4b1 added comment and fix derived table bug inside view, that couldn't use unions. 2003-08-15 14:38:33 +00:00
arnobrinkman
0d203a2c36 derived table support 2003-08-15 00:02:18 +00:00
arnobrinkman
e9953885e5 forgotten cleanup, thanks for your attention BLAS 2003-08-11 01:06:52 +00:00
arnobrinkman
77d9804ed0 Support all expressions directly in GROUP BY clause 2003-08-10 15:19:43 +00:00
arnobrinkman
0100d93cc9 Added optional AS keyword to table alias 2003-08-10 10:06:34 +00:00
brodsom
e3d16f06ab -Fix cast warnings.
-Remove unneeded casts
2003-08-09 21:57:50 +00:00
skidder
64c12e15c4 Make Windows happier. DIFFERENCE defined as a macro there 2003-08-06 20:21:40 +00:00
skidder
143f8d2443 Implementation of fast physical incremental backup 2003-08-06 16:30:49 +00:00
skidder
905670f5f9 Separate DSQL cursors management and explicit locks as suggested by Ivan Prenosil 2003-07-11 22:36:05 +00:00
skidder
659e44cc45 Fix problem in non-reserved Inserting/Updating/Deleting implementation found by Dmitry Emanov 2003-07-07 23:49:29 +00:00
dimitr
9bb1284b19 Correct the parser a bit. 2003-07-02 09:40:55 +00:00
brodsom
30ccb0a20b Solve macro conflicts on win 32 when using bison and msvc 2003-07-02 00:16:56 +00:00
dimitr
5eaf6394d1 Some savepoint-related changes:
1. release single savepoint
2. fixed exception handling
2003-06-26 10:44:16 +00:00
dimitr
2740167100 Fixed one more limitation in the parser. 2003-06-24 09:28:38 +00:00
skidder
213752d768 Oops. Part of my own RELEASE SAVEPOINT implementation leaked into to the previous commit 2003-06-15 22:26:04 +00:00
skidder
ee856f7729 Make INSERTING/UPDATING/DELETING non-reserved keywords. The patch causes compilation performance degradation for statements containing a lot of braces, but my testing indicated that this effect is surely unmeasurable for nesting level up to 250 2003-06-15 22:08:16 +00:00
dimitr
112c7022b6 Fixed (hopefully) savepoints implementation:
1) RELEASE SAVEPOINT statement is added
2) SAVEPOINT statement now re-establishes existing savepoint with the same name
3) all savepoint stuff is changed to use single BLR verb
2003-06-10 13:40:19 +00:00
dimitr
7ffbfc1fd1 Let's be GNU Bison 1.75 friendly. 2003-06-05 12:37:49 +00:00
skidder
e0eab37746 Fix server crash when SKIP syntax with braces used (SF 747567). Really strange, but problem does not affect Linux version. This is why it escaped my testing 2003-06-02 16:11:13 +00:00
skidder
d8bae3c569 Add comment 2003-05-24 15:18:35 +00:00
skidder
b9480b21e1 Make FIRST/SKIP keywords non-reserved 2003-05-23 16:55:40 +00:00
aafemt
b3436b5cd7 STATUS -> ISC_STATUS 2003-04-10 06:32:58 +00:00
dimitr
1205d8c4e5 Misprint. 2003-04-09 10:51:42 +00:00
dimitr
566516464c no message 2003-04-09 10:18:54 +00:00
dimitr
f9849a9534 Fixed migration rule in the parser which allows columns to be renamed. 2003-04-09 10:14:19 +00:00
dimitr
7d7cef5157 no message 2003-04-06 11:34:31 +00:00
dimitr
be5247dc1c 1. Cleanup
2. ROWS_AFFECTED is renamed to ROW_COUNT
(see SQL2002 specification)
3. CONNECTION_ID/TRANSACTION_ID are renamed to CURRENT_CONNECTION/CURRENT_TRANSACTION
(see SQL2002 recommendations for context functions)
4. Solved most of the shift/reduce conflicts and all reduce/reduce conflicts in the grammar
5. Fixed ambiguity in ORDER BY clause, when both the value and the clause itself could contain COLLATE word
(now explicit collation sequence of the value is used in the ordering logic)
6. Some of newly introduced tokens are made non-reserved
7. Added code to enable ORDER/GROUP BY ordinal when asterisk is used in the select list
(not sure which version it should go, so it's commented out so far)
2003-04-06 11:20:24 +00:00
eku
53367847f5 SVR4 yacc doesn't like C++ style comments! 2003-04-03 06:55:32 +00:00
brodsom
9784aedc80 - Update parser (with byacc 1.9) 2003-04-03 01:36:52 +00:00
brodsom
a399bf764d Changes to allow use of bison to create parse.cpp 2003-03-31 23:40:53 +00:00
alexpeshkoff
878b0b6091 Fixed EXECUTE STATEMENT to support INTO clause 2003-03-01 19:19:23 +00:00
dimitr
7d4444165b Cleanup. 2003-02-24 09:37:52 +00:00
skidder
aade54d330 Fixed bug with line number tracking introduced recently + some cleanup 2003-02-17 14:56:58 +00:00
hippoman
ad14320d0e * formated dsql.h comments to make Doxygen happy..
* changed DSQL_debug values as follow..
/*! \var unsigned DSQL_debug
    \brief Debug level

    0       No output
    1       Display output tree in PASS1_statment
    2       Display input tree in PASS1_statment
    4       Display ddl BLR
    8       Display BLR
    16      Display PASS1_rse input tree
    32      Display SQL input string
    64      Display BLR in dsql/prepare
    > 256   Display yacc parser output level = DSQL_level>>8
*/
2003-02-15 02:05:10 +00:00
eku
6b0df2eb51 Fixed "'SHARED' redefined" 2003-02-14 14:22:10 +00:00
dimitr
f833079b2f CONST -> const 2003-02-13 09:33:26 +00:00
tamlin
bc383ff498 A bit const correctness added and some reinterpret_casts removed.
Changed DSQL's str to actually hold char.
2003-02-12 19:28:13 +00:00
brodsom
ab6ba391f2 Change wrong define 2003-02-09 23:31:50 +00:00
brodsom
3a9b561a11 Remove JPN_ defines 2003-02-07 18:46:49 +00:00
dimitr
9ba418a493 Disallowed PLAN clause in views until it works. 2003-01-23 09:18:59 +00:00
dimitr
fd2f852e49 Cleanup. 2003-01-18 19:39:12 +00:00
dimitr
55ed1b6444 1. Reworked internal info stuff once more.
2. Added DSQL support for parametrized events.
3. Fixed bug with cursors in triggers.
4. Added support for runtime trigger action checks (INSERTING/UPDATING/DELETING).
5. Fixed bug with concatenation and trashed RDB$FIELD_LENGTH.
2003-01-15 12:00:33 +00:00
skidder
2975b16cce Allow arbitrary expressions in ORDER-BY clause 2003-01-09 16:50:24 +00:00
dimitr
411c994122 Now we understand single-line comments (--) in any position of the SQL statement. 2002-12-19 14:48:22 +00:00
dimitr
8842052537 Prepared parser to allow non-reserved words as valid symbol names. 2002-12-19 13:14:41 +00:00
dimitr
2861cbf063 no message 2002-12-19 08:57:53 +00:00
dimitr
9dc68b4a7b Fixed bug with BREAK and partially implemented labels and LEAVE statement. 2002-12-18 15:01:50 +00:00