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

88 Commits

Author SHA1 Message Date
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
11b4fcf5b7 1) Make COALESCE/CASE output descriptor more SQL-standard.
Exception is that we allow mixing datatypes with (var)char (except blob), because all datatypes are convertable to character-type and because this functionallity was available from 1st day COALESCE is introduced inside Firebird.
2) Fix bug with expressions without fields inside aggregate-functions.
Example :
  SELECT
    (SELECT Count(1) FROM RDB$DATABASE)
  FROM
    RDB$RELATIONS
2003-08-25 23:35:30 +00:00
arnobrinkman
79c10074c0 Already fix COALESCE/CASE output-descriptor behaviour inside HEAD branch to conform with SQL-standard.
FB1.5_RELEASE will follow when error-message is added
2003-08-24 22:15:23 +00:00
arnobrinkman
9cf1f386fa fix bad behaviour with auto-union-cast 2003-08-24 15:22:11 +00:00
arnobrinkman
006070b331 added comment and nested derived table fix 2003-08-24 02:56:53 +00:00
arnobrinkman
c61cbdc5ca fix some derived tables problems 2003-08-24 02:36:46 +00:00
arnobrinkman
9b4b90d606 bugfix nested derived tables 2003-08-19 23:56:28 +00:00
arnobrinkman
05d343bda8 Oops missed something 2003-08-19 23:47:07 +00:00
arnobrinkman
506b858567 Added PLAN support for derived tables 2003-08-19 23:34:23 +00:00
arnobrinkman
f5002b3f5b Code clean-up and re-apply comments as suggested by Claudio V. 2003-08-18 21:37:47 +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
0d203a2c36 derived table support 2003-08-15 00:02:18 +00:00
arnobrinkman
77d9804ed0 Support all expressions directly in GROUP BY clause 2003-08-10 15:19:43 +00:00
arnobrinkman
f81b831315 2nd RC4 bugfix, but much better tracking of supported nested aggregates. 2003-07-29 00:29:17 +00:00
arnobrinkman
0df22b0b31 bugfix RC4: a higher context was supported with nested aggregates, but this isn't possible.
Only a lower context is possible with nested aggregates.
2003-07-28 19:22:56 +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
e9d8645824 Forbid pessimistic locks in queries with DISTINCT clause 2003-06-30 14:31:00 +00:00
skidder
c4727d695b Add checks to allow explicit pessimistic locks only in cases when we really support them 2003-06-29 20:36:52 +00:00
dimitr
b41fee4014 New error messages for:
- gbak
  - DSQL layer (aggregate tracking)
  - JRD layer (EXECUTE STATEMENT)
  - config stuff
2003-06-13 07:56:08 +00:00
dimitr
c1c723103f Disallowed explicit locking for aggregate queries.
The same should be done for stored procedure streams (joins require some work too).
2003-06-12 09:38:01 +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
43aaa45d42 Enabled BREAK/LEAVE and EXITcommands in non-system triggers. 2003-05-14 08:15:25 +00:00
skidder
f16736b802 Use explicit pessimistic locks only if WITH LOCK clause is specified 2003-05-11 19:32:41 +00:00
arnobrinkman
192ba388d4 1) bugfix RC1: Aggregates from a different parent_context where not allowed in the HAVING clause.
2) Enabled aggregate-functions from different parent_context (with lower scope_level) to be used inside another aggregate-function

Example:
SELECT
  MAX((SELECT COUNT(*) FROM RDB$RELATIONS))
FROM
  RDB$RELATIONS
2003-05-07 01:57:18 +00:00
arnobrinkman
962b5e21a3 fixed a typo and changed some comments 2003-05-04 22:02:42 +00:00
alexpeshkoff
8a6430c352 Fixed server crash in EXECUTE STATEMENT combined with exceptions handling block 2003-05-02 15:20:17 +00:00
arnobrinkman
a819ccb060 bugfix: stored procedure with input parameters and aggregate tracking/validating methods failed 2003-04-17 20:58:36 +00:00
arnobrinkman
975638783a bugfix: Parameters from stored procedures in a sub-select where not remaped to the good context in a aggregate query.
example:
SELECT
  (SELECT sp.x FROM SP_TEST(T1.ID) sp)
FROM
  Table1 T1
GROUP BY
  T1.ID
2003-04-16 22:49:41 +00:00
aafemt
b3436b5cd7 STATUS -> ISC_STATUS 2003-04-10 06:32:58 +00:00
brodsom
42ef1314ec DSQL warning fixes. 2003-04-08 00:31:20 +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
brodsom
2c329ec811 - Spli macro to avoid not used warnings
- Minor code formatting
2003-04-03 09:29:10 +00:00
arnobrinkman
f83a6084ed bugfix:
1) bug with sub-selects inside COALESCE function.
2) bug with parameter ordering.
2003-03-31 19:11:55 +00:00
arnobrinkman
b099026cdc corrected mistake in previous commit. 2003-03-10 23:30:53 +00:00
arnobrinkman
f1ca8aed80 bugfix: A bug left with using a aggregate sub-query inside a IN clause. 2003-03-10 21:38:22 +00:00
alexpeshkoff
878b0b6091 Fixed EXECUTE STATEMENT to support INTO clause 2003-03-01 19:19:23 +00:00
arnobrinkman
f890eca4ea bugfix: DISTINCT with sub-selects (context already in use (BLR error)). Distinct items are now correctly parsed and not just copied from the select-list. 2003-02-23 01:36:22 +00:00
hippoman
1cb0c17ace * Formated comments to make Doxygen Happy.. 2003-02-15 03:01:51 +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
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
arnobrinkman
bd7a1b6bed bugfix: wrong context was used with FieldX IN (sub-select) predicate.
Caused by me by an other bugfix SF BUG # [ 213859 ]
2003-01-30 22:14:02 +00:00
arnobrinkman
9b5c62d89c bugfix: It wasn't possible to use non-aggregate related-fields from a aggregate query inside an sub-query.
Example (this failed) :
SELECT
  Count(T1.F1),
  SUM((SELECT T2.F2 FROM Table2 T2 WHERE T2.F1 = T1.F1))
FROM
  Table1 T1
2003-01-30 13:30:15 +00:00
skidder
3622fc966f Fix intermittent bug in aggregate reference tracking 2003-01-17 12:47:19 +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
arnobrinkman
3dcc0600c8 bugfix: SF BUG # [ 213859 ] Subquery connected with 'IN' clause 2003-01-12 20:27:00 +00:00
arnobrinkman
411c18bbf2 bugfix on my latest commits 2003-01-12 16:29:59 +00:00
arnobrinkman
1b552b007e Introduce backwards compatibilty within aggregates.
Deepest field inside aggregate determine where an aggregate-context should belong too.
2003-01-11 02:49:13 +00:00
skidder
2975b16cce Allow arbitrary expressions in ORDER-BY clause 2003-01-09 16:50:24 +00:00
dimitr
9dc68b4a7b Fixed bug with BREAK and partially implemented labels and LEAVE statement. 2002-12-18 15:01:50 +00:00
dimitr
6e51db6e6e 1. Implemented ORDER BY clause in subqueries.
2. Disallowed FIRST/SKIP for views.
3. Allowed zero as valid argument for FIRST.
2002-12-03 18:04:36 +00:00