robocop
66aab208b0
Simplification.
2008-05-21 12:52:29 +00:00
asfernandes
d52dc96278
1) Move the new Node classes to appropriate files
...
2) Creation of StmtNode
3) Conversion of IN AUTONOMOUS TRANSACTION to InAutonomousTransactionNode (inherited from StmtNode) - it makes this feature almost self-contained
Please do a boot build or at least run blr_table.
2008-05-19 13:47:48 +00:00
asfernandes
7072385162
Typo
2008-05-15 16:02:33 +00:00
asfernandes
6c7170463a
Follow the standard and do not allow binary strings with odd number of characters
2008-05-15 15:27:43 +00:00
hvlad
0d27b88752
Commented out never reduced rule.
2008-05-15 11:43:56 +00:00
alexpeshkoff
27a97e2a6a
1. Modified syntax of ALTER ROLE command according to Dmitry's request.
...
2. Avoid any use of predefined NT group name "Domain Admins".
3. Fixed DYN code generation for USER operations.
***** WARNING *****
After this commit all previous backups of 2.5 databases with turned on
admins mapping become unrestorable. ODS is not changed.
2008-05-14 11:24:45 +00:00
asfernandes
28d5b99afc
Misc
2008-04-16 16:02:01 +00:00
hvlad
a8a0a39248
Fixed CORE-1837 : Procedure text is stored truncated in system tables if any variable have default value
2008-04-15 19:45:19 +00:00
asfernandes
77e97a47c0
Feature requests CORE-1737 and CORE-1803:
...
1) ALTER CHARACTER SET <charset> SET DEFAULT COLLATION <collation>
2) CREATE DATABASE ... [ DEFAULT CHARACTER SET <charset> [ COLLATION <collation> ] ]
2008-04-15 02:18:38 +00:00
asfernandes
79f8d2ceef
Misc
2008-04-15 00:57:19 +00:00
asfernandes
f66f7b28f5
1) Fix another possible invalid memory access in parse.y and the memcpy problem reported by valgrind
...
2) Misc
2008-04-14 15:22:52 +00:00
robocop
caa5f285c4
Minor cleanup.
2008-04-14 14:26:44 +00:00
asfernandes
e97cccd79d
Hope this fix a problem detected by valgrind
2008-04-14 13:35:15 +00:00
robocop
d54a9f7ef6
- Let BIN_AND, BIN_OR and BIN_XOR take two params as minimum.
...
- Implement BIN_NOT.
2008-04-14 11:09:16 +00:00
hvlad
f0899a7256
Make INTO clause of new EXECUTE STATEMENT consistent with other statements - move it at last position. By agreement in fb-devel.
2008-04-12 21:12:29 +00:00
asfernandes
0e8febd6e3
Misc
2008-04-10 02:35:30 +00:00
hvlad
fe3f8c184b
New EXECUTE STATEMENT with support of external data source implementation
2008-04-09 20:18:47 +00:00
dimitr
29229a10a6
Simplify the optional default value parsing and processing. This also fixes CORE-1512.
2008-04-04 16:53:29 +00:00
dimitr
08c5783ab2
Misc.
2008-04-03 11:02:11 +00:00
dimitr
13f5cc92e1
Major cleanup of the old-style blk and allocator-based blk_type.
2008-03-19 16:09:00 +00:00
robocop
55e17e46d7
- Made some constructor explicit and discovered that for adding one byte to a string, a temporary string was being created on the fly. Unacceptable in loops.
...
- Disabled constructor from hell for now. I wasn't the only one confused about the nature of the only argument: only looking at the signature one realizes it's a byte's value, not the initial length.
2008-03-13 10:38:39 +00:00
dimitr
99caa91b85
DSQL integration into the engine.
2008-02-28 13:48:16 +00:00
asfernandes
4b58bb06f1
Feature CORE-1760 - Support hex numeric and string literals
2008-02-27 16:00:31 +00:00
dimitr
c7db4d6a64
Get rid of DsqlMemoryPool.
2008-02-20 15:24:21 +00:00
hvlad
0c51514806
Frontport fix for bug CORE-1724 : Common table expressions cannot be used in computed columns and quantified predicates (IN / ANY / ALL)
2008-02-07 14:10:25 +00:00
asfernandes
f19d9ec09b
Improvement CORE-1453 - Allow usage of functions in LIST delimiter parameter
2008-02-05 14:33:42 +00:00
asfernandes
607ef7d9fa
Encapsulate the parser and make it thread safe
2008-02-03 19:16:12 +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
dimitr
74e8bba437
The merge is being fixed.
2008-01-16 11:51:42 +00:00
dimitr
eac5ac337b
The merge continued.
2008-01-16 06:52:43 +00:00
asfernandes
4e426d0739
Commit forgotten change
2007-11-26 09:57:19 +00:00
asfernandes
54b36766c0
Misc
2007-11-17 00:38:16 +00:00
paulbeach
7602a29b94
HPUX Port
2007-11-12 14:26:44 +00:00
alexpeshkoff
e4271ba6fa
Fixed CORE-1501: Wrong access to SLONG data in dsql_nod
2007-10-17 14:35:31 +00:00
asfernandes
bad4ef9667
Fixed CORE-1497 - New builtin function DATEADD() implements wrong choice of keywords for expanded syntax
2007-10-04 15:23:22 +00:00
asfernandes
d8dde42d07
Fixed CORE-1490 - New builtin function DATEDIFF() implements wrong choice of keywords for expanded syntax
2007-10-02 15:37:38 +00:00
dimitr
4284e1ee34
Resolved CORE-1386.
2007-08-27 10:50:00 +00:00
asfernandes
6331db3ee4
Correction
2007-08-02 00:51:15 +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
hvlad
322a31eeda
Implement RECREATE GLOBAL TEMPORARY TABLE
2007-07-29 08:15:22 +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
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
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
asfernandes
03e856b6f7
Use UNION ALL instead of UNION
2007-05-08 15:50:48 +00:00
asfernandes
b5fab19683
Misc
2007-05-08 02:31:11 +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
b06deea4c6
CORE-1226: Allow RETURNING in INSERT...SELECT, UPDATE and DELETE
2007-04-24 15:22:05 +00:00
asfernandes
166fc0b865
Misc
2007-04-13 01:37:44 +00:00
asfernandes
8c7076b67f
Port of Yaffil builtin functions
2007-04-12 15:56:34 +00:00
dimitr
54d1d0a3d3
Let's always initialize node arguments. Thanks to Claudio and David Rushby.
2007-01-29 03:17:21 +00:00
asfernandes
cec7eaa8b6
Some changes based on Claudio's comments
2007-01-21 15:35:35 +00:00
asfernandes
aca179f398
Full domain support and NOT NULL in PSQL
2007-01-17 01:19:01 +00:00
asfernandes
7dcab61744
Be standard compliant and allow "AS" between the table name and alias in UPDATE, DELETE and MERGE
2007-01-01 14:13:35 +00:00
asfernandes
7dd5d15b17
Allow table alias on INTO part of MERGE
2006-12-31 20:55:16 +00:00
asfernandes
5e818bd4a9
Rename REPLACE to UPDATE OR INSERT
2006-11-26 15:40:10 +00:00
asfernandes
d0dec479f2
Remove "MESSAGE" keyword
2006-11-20 12:37:15 +00:00
robocop
7a46dc7247
Misc.
2006-11-10 08:12:07 +00:00
asfernandes
570b6cd4b4
1) CORE-645 and CORE-745: Database triggers
...
2) CORE-711: Make syntax for "CREATE TRIGGER" compliant with SQL2003
2006-11-05 18:30:36 +00:00
hvlad
58d381edd7
1. Remove blr_src_info code as it is prevents database downgrade from ODS 11.1
...
2. Put debug information (mapping between blr offset and source line\column and names of local variables) into new blob field RDB$DEBUG_INFO
This is first step to implement native SQL debugger i believe
2006-10-30 20:58:06 +00:00
dimitr
651607f5a9
Done CORE-863.
2006-10-24 16:45:43 +00:00
robocop
1e7814b7ca
Misc: more mnemonic for nodes' argument positions.
2006-10-07 09:30:43 +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
addb91948c
Misc
2006-09-14 02:27:59 +00:00
asfernandes
a40b7b8ae5
MERGE statement
2006-09-14 02:05:32 +00:00
asfernandes
55ec30965d
REPLACE statement
2006-09-03 01:09:23 +00:00
asfernandes
b7af27215e
Allow usage of domains in PSQL (with TYPE OF syntax)
2006-08-19 02:52:39 +00:00
asfernandes
6c707c12a1
Misc
2006-08-08 02:42:10 +00:00
asfernandes
e538061c38
Implementation of CREATE/DROP COLLATION and ISQL show/extraction of collations
2006-08-07 16:39:21 +00:00
asfernandes
069e46b050
RECURSIVE is reserved in SQL2003
2006-08-02 00:53:01 +00:00
hvlad
b20aa92714
Common table expressions implementation
2006-08-01 20:37:58 +00:00
dimitr
bbaea14abe
Misc.
2006-07-23 11:14:43 +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
asfernandes
1a0df78e29
Allow the use of COLLATE in parameters (input and output) and variables in PSQL - feature request (CORE-684) COLLATE IN STORED PROCEDURES, OR IN PARAMETERS
2006-06-26 20:58:13 +00:00
robocop
1813e5a124
Fix bug noticed by Dmitry Yemanov: sometimes, special characters are detected and rejected. Other times, anything that follows them is silenty ignored. Unacceptable. We were accesing an array out of bounds.
...
update customers set city = 1<SC> where 1 = 0;
In this case, SC was a strange character in the range 127..255 (for example, 238) and I had to use Windows' chcp 1251 and isql's set names 1251 to see the problem.
2006-06-07 05:39:46 +00:00
dimitr
9881681557
Complete one of my previous commits.
2006-06-01 09:48:02 +00:00
asfernandes
d76fde6496
GLOBAL is reserved word in SQL2003. Move from non_reserved_word to keyword_or_column.
2006-05-26 00:59:17 +00:00
robocop
1571fef42c
Introduce the new v2.1 keywords as non-reserved words. Someone with the new build system (btyacc) please regenerate the files.
2006-05-25 07:05:35 +00:00
asfernandes
24d936cd70
Misc
2006-05-22 01:29:06 +00:00
hvlad
701f2cbda4
Global temporary tables implementation
2006-05-21 22:07:35 +00:00
dimitr
8b45562f81
The DSQL code of the LIST function. Unstable yet.
2006-04-24 17:24:26 +00:00
robocop
e54dedb70c
Misc.
2006-04-20 01:23:10 +00:00
dimitr
cfefbee57a
Removed the lexer hacks from the parser.
2006-04-19 11:32:37 +00:00
robocop
770fd53775
Fix SF Bug# 1408079 and also the same problem with unterminated comment blocks /* ...
2006-01-25 08:40:39 +00:00
hvlad
7c1372ee30
Again fix issue with parser and not correctly stored source for
...
CURRENT_TIME\CURRENT_TIMESTAMP in procedure parameters
default values. Reported by Martijn Tonies
2006-01-20 13:31:26 +00:00
hvlad
c333e74b4c
1. Correct end_default_opt rule
...
2. Fix wrong error reporting found by Claudio
2005-12-04 12:18:51 +00:00
hvlad
217fd7e959
Second attempt to fix issue with parser and not correctly stored source
...
for DEFAULT CURRENT_TIME\DEFAULT CURRENT_TIMESTAMP
2005-11-29 16:09:02 +00:00
hvlad
a174b8336f
Fixed issue with parser and not correctly stored source
...
for DEFAULT CURRENT_TIME\DEFAULT CURRENT_TIMESTAMP
2005-11-21 17:57:20 +00:00
robocop
d1373b1555
Fix clash with winbase.h on IGNORE.
2005-11-18 04:39:47 +00:00
robocop
90174410a2
Let Ivan Prenosil test his beloved transaction options.
2005-11-17 04:22:10 +00:00
dimitr
5e8af7b048
Implemented RECREATE TRIGGER.
2005-10-29 09:15:37 +00:00
dimitr
85388cd3c7
1) Fixed check constraints
...
2) A bit simplified generation of check option triggers
3) Cleanup of unused parser stuff
2005-10-26 18:21:32 +00:00
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