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

241 Commits

Author SHA1 Message Date
asfernandes
d66783ae3c Misc. 2012-01-16 20:33:52 +00:00
alexpeshkoff
35e6c1ff04 Fixed CORE-3599: Possible drop role RDB$ADMIN 2012-01-13 08:23:20 +00:00
dimitr
0e41945307 1) Made the functions logic in sync with the procedures one.
2) Simplified the privileges creation code.
2012-01-09 09:48:14 +00:00
asfernandes
c44c548f8c Corrections and cleanup. 2012-01-09 00:08:33 +00:00
dimitr
69cede6f1a Refactored CREATE/ALTER USER. Untested at runtime. 2012-01-08 18:33:59 +00:00
dimitr
e956e2e6c0 1) Restricted ALTER/DROP permissions to the object owners only. Now this applies to domains, charsets, collations, generators and exceptions. This fixes CORE-304: Metadata security hole - any user can alter/drop generators and exceptions.
2) Opened the gates to implement the standard USAGE privilege (CORE-2884). SQL support and validation logic are still to be developed.
3) Added the grant option to the owner permissions for packages, procedures and functions.
4) Misc cleanup and refactoring.
2012-01-08 14:05:29 +00:00
asfernandes
59acf81405 Misc. 2011-11-28 00:57:11 +00:00
asfernandes
016ddf41dc Refactored CREATE FILTER and CREATE INDEX. 2011-11-27 19:08:06 +00:00
asfernandes
b956356922 DDL refactor: ALTER EXTERNAL FUNCTION, ALTER INDEX, SET STATISTICS, CREATE SHADOW, ALTER ROLE, CREATE/ALTER DATABASE. 2011-11-22 16:33:25 +00:00
asfernandes
2013038d7f Correction. 2011-11-14 18:15:44 +00:00
asfernandes
0de4423b02 Misc. 2011-11-14 18:06:44 +00:00
asfernandes
193f9379b9 Refactor DDL commands: DROP INDEX, DROP FILTER, DROP SHADOW, CREATE/DROP ROLE and DROP USER. 2011-11-13 21:32:12 +00:00
asfernandes
45327bf06b Feature CORE-3018 - RECREATE SEQUENCE/GENERATOR. 2011-11-10 14:55:06 +00:00
asfernandes
e090671523 Apply CORE-3114 patch (Attempt to drop non-existing generator produces bad error) with some modifications. 2011-11-09 15:30:00 +00:00
hvlad
0ed1fadf25 Additional fix for CORE-3557 : AV in engine when preparing query against dropping table
Also fixed CORE-3579 : Can't drop table when computed field depends on later created another field
2011-11-08 16:46:40 +00:00
asfernandes
ba36a29f9d 1) Refactored legacy (UDF) function creation.
2) Extend ISQL' SHOW FUNCTION to take packages and parameter's datatype of non-legacy functions into account.
2011-11-08 14:54:48 +00:00
asfernandes
c627005a89 Feature CORE-3626 - Subfunctions in PSQL and EXECUTE BLOCK.
Tests at http://firebird.cvs.sourceforge.net/viewvc/firebird/fbtcs/GTCS/tests/FB_SQL_SUBFUNC_1.output.

Also did:
- Refactor to share more code/data between procedures and functions.
- Fixed some PSQL functions problems.
2011-10-16 20:36:07 +00:00
asfernandes
01e6fd70ae Fixed PSQL functions problem (missing EOS). 2011-09-25 23:28:09 +00:00
robocop
59b3dc1c2b Misc. 2011-07-30 07:14:00 +00:00
asfernandes
87a81a5002 Correct the lookup of unspecified parameters wrt packages. 2011-07-16 18:46:58 +00:00
dimitr
d9e4c3eac0 Completed some missing parts of the PSQL functions implementation. Adriano, please review. 2011-07-15 11:52:16 +00:00
dimitr
d455d15bfe Implemented COMMENT for function arguments. 2011-07-15 08:54:00 +00:00
dimitr
ffa0c84d97 Added the missing RDB$SYSTEM_FLAG and RDB$DESCRIPTION columns into RDB$FUNCTION_ARGUMENTS. 2011-07-14 15:27:25 +00:00
asfernandes
cd7c8dee95 Use the BLR message definition of external procedures and functions. 2011-07-10 01:23:53 +00:00
asfernandes
866b0c8d98 Misc. 2011-06-22 00:30:30 +00:00
asfernandes
17c249fc3d Complement fix for CORE-3140 - Preserve comments for parameters after altering procedures. 2011-06-17 12:39:25 +00:00
dimitr
4d91d6c564 Fixed the error handling broken after introducing system constraints. 2011-06-01 16:44:41 +00:00
asfernandes
7c5b69403e Frontported changes of CORE-3491. 2011-05-27 02:05:27 +00:00
asfernandes
efbd651d7f Correction. 2011-04-29 15:16:53 +00:00
asfernandes
8d8a8b5047 Fixed problem with position handling (see CORE-2797). 2011-04-01 18:39:41 +00:00
dimitr
cc6f90ddf8 Apply Adriano's yesterday fix to functions as well. 2011-04-01 05:26:55 +00:00
asfernandes
51f68bd9ac Fixed CORE-3423 - Wrong RDB$PARAMETER_MECHANISM. 2011-03-31 14:26:31 +00:00
asfernandes
aeefde32c0 Fixed CORE-3401 - Collation errors with [type of] <domain>, type of column. 2011-03-22 18:59:13 +00:00
asfernandes
5ffa89e0c7 Reference DML statements in DSQL with StmtNode instead of dsql_nod. 2011-03-06 02:48:34 +00:00
asfernandes
2096bd7239 Refactor DSQL exceptions: nod_on_error, nod_sqlcode, nod_gdscode, nod_exception and nod_default. 2011-02-25 02:52:51 +00:00
asfernandes
0a6e338392 Refactoring nod_list and nod_block statements. 2011-02-22 00:51:56 +00:00
asfernandes
dfe830af7c Added EVENT_TYPE and OBJECT_TYPE to DDL_TRIGGER context. Improvement suggested by Thomas Steinmaurer. 2011-02-20 01:08:48 +00:00
asfernandes
5573581488 Refactored nod_alias. 2011-02-17 14:25:56 +00:00
asfernandes
bf77761d84 Fixed CORE-3310 - RDB$GET_CONTEXT and between in view.
Fixed CORE-3338 - Some expression indexes with COALESCE, CASE and DECODE became inoperant.
Removed DSQL hidden variables expressions.
Refactored COALESCE, DECODE and (simple) CASE, using new BLR verbs.
Fixed v3 regression with UPDATE OR INSERT inside PROCEDURE/FUNCTION.
Fixed assert with DECODE/CASE with only test parameters and no values.
2011-02-06 18:13:12 +00:00
asfernandes
b0f702e7bd Another small refactor on variables in DSQL. 2011-01-31 14:47:41 +00:00
asfernandes
d7d3c4d8ab Refactor internals of DSQL variables. 2011-01-31 00:13:15 +00:00
asfernandes
f27d60369e Refactor nod_relation_name and nod_rel_proc_name. 2011-01-30 00:25:46 +00:00
asfernandes
123aa675ab Refactor nod_aggregate, nod_relation, nod_rse, nod_derived_table, nod_query_spec and nod_limit 2011-01-09 21:58:56 +00:00
asfernandes
4a9f98bed7 Refactor DSQL's nod_field 2010-12-19 21:42:32 +00:00
asfernandes
8af7ec0211 Refactored the support for blr_handler, blr_loop, blr_exec_sql, blr_exec_into, blr_exec_stmt,
blr_start_savepoint, blr_end_savepoint, blr_store, blr_store2, blr_erase, blr_modify,
blr_modify2, blr_exec_proc, blr_exec_proc2, blr_exec_pid, blr_dcl_cursor, blr_cursor_stmt,
blr_set_generator, blr_receive, blr_stall, blr_select, blr_block, blr_error_handler,
blr_label, blr_leave, blr_continue and the source info node.
2010-11-29 02:17:04 +00:00
asfernandes
3eb252ec5f Refactored DSQL nodes: nod_derived_field, nod_map, nod_dbkey and nod_rec_version.
Refactored JRD nodes: blr_field (JRD side only), blr_dbkey, blr_record_version and blr_stmt_expr.
2010-11-14 17:25:48 +00:00
dimitr
7eded400e8 Let's clearly distinguish between deterministic and invariant functions, they're not the same thing actually. Runtime optimization usage is to be re-considered, if necessary.
Warning: this includes an ODS change, please boot-build.
2010-11-13 15:03:44 +00:00
dimitr
b6752fe29b Fixed inability to alter the [[NOT] DETERMINISTIC] clause. 2010-11-13 08:54:36 +00:00
asfernandes
9086a900bb 1) Frontport fix for CORE-3222 - View with "WITH CHECK OPTION" doesn't like TRIM function in WHERE
2) Other related fix and cleanup
2010-11-11 00:05:49 +00:00
asfernandes
2b6106938e Refactor variables 2010-11-02 17:05:01 +00:00
asfernandes
51f4b27991 Simplify the internal "null replacement" logic 2010-11-01 00:42:12 +00:00
asfernandes
dde217e91f Make node creation more directly 2010-10-30 18:57:53 +00:00
asfernandes
c46f5cf800 Misc 2010-10-29 00:28:35 +00:00
asfernandes
097426ffc1 Fixed CORE-3140 - Preserve comments for parameters after altering procedures 2010-10-29 00:23:18 +00:00
asfernandes
3317eeeebc Refactor literal values. 2010-10-24 00:26:00 +00:00
asfernandes
16ff0c51ce Refactor NULL expression 2010-10-22 15:00:22 +00:00
asfernandes
43aeec0a64 Fixed CORE-3180 - ALTER VIEW with not matched columns in declaration and selection crashs the server 2010-10-17 14:22:53 +00:00
asfernandes
38ba5852ae Cleanup: remove blr_prot_mask and blr_lock_state support 2010-10-16 15:34:52 +00:00
alexpeshkoff
e05c1a825f Moved some more .h-files to common from jrd as Vlad suggested 2010-10-13 10:39:52 +00:00
alexpeshkoff
2dc25a44bb OSRI and new posix build 2010-10-12 08:02:57 +00:00
robocop
98a2c6822d Warnings. 2010-09-24 09:53:51 +00:00
asfernandes
477091ebcc Misc 2010-09-18 15:56:54 +00:00
asfernandes
57d222bb0a Fix problem with view WITH CHECK OPTION present since the introduction of ExprNode 2010-09-17 14:42:11 +00:00
asfernandes
c1b5abfdf2 1) Refactor all types of boolean nodes.
2) Remove the scratch from the nodes.
2010-09-17 03:15:32 +00:00
asfernandes
52a4c39f41 1) Separate DsqlCompilerScratch in its own files.
2) Move BlockNode functionality to it.
3) Move some related CTE functions to it.
2010-08-27 02:18:00 +00:00
asfernandes
4cb0195ee6 Misc 2010-08-10 15:20:20 +00:00
asfernandes
de5098b85d Misc 2010-08-10 00:37:26 +00:00
robocop
4677d74e9b Misc. 2010-08-09 11:50:12 +00:00
asfernandes
124e614654 Simplification 2010-08-05 00:47:06 +00:00
asfernandes
c27a73a1c2 Misc: "explicit" with more than one parameter is unnecessary 2010-08-04 02:22:09 +00:00
asfernandes
9e05b7f43b Corrections 2010-08-03 01:09:39 +00:00
asfernandes
2def39c746 Suggestions of Claudio 2010-08-02 15:58:29 +00:00
asfernandes
9c3eccef94 Create template for RECREATE commands 2010-08-02 15:47:36 +00:00
asfernandes
ad57aa29a1 Refactor CREATE/ALTER/CREATE OR ALTER/RECREATE VIEW and cleanup related to previously refactors 2010-08-02 02:22:26 +00:00
asfernandes
9a946aea74 Fix problem noticed by Claudio 2010-07-30 14:13:54 +00:00
asfernandes
3197757f00 Rename misleading TriStateType class name to Nullable 2010-07-29 00:20:53 +00:00
asfernandes
36f092fe0e Improvement CORE-3085 - Add clause ALTER DOMAIN <name> [NOT] NULL 2010-07-28 16:14:20 +00:00
asfernandes
0b7c21172a Refactor CREATE/ALTER/DROP/RECREATE TABLE and DROP VIEW commands 2010-07-26 02:37:57 +00:00
asfernandes
4db389758f Refactor CREATE/ALTER/CREATE OR ALTER/RECREATE/DROP EXCEPTION commands 2010-07-11 18:21:42 +00:00
robocop
ee99b63cc6 Misc. 2010-07-06 09:10:27 +00:00
asfernandes
20b0bbaf82 Refactor CREATE/ALTER/DROP DOMAIN 2010-07-06 00:49:33 +00:00
asfernandes
fc00a3d58d Cleanup 2010-06-26 02:50:07 +00:00
asfernandes
7851a943c3 Misc 2010-06-26 02:30:01 +00:00
asfernandes
f2c938d9fa Refactor CREATE/DROP COLLATION 2010-06-26 01:52:06 +00:00
asfernandes
75af3ccf65 Misc/cleanup 2010-06-22 00:53:35 +00:00
asfernandes
12079f5ece Created class BlrWriter and reorganization (move BLR generation from statement to scratch) 2010-06-17 01:18:40 +00:00
asfernandes
a9adf6d626 1) Refactor PSQL support in DSQL. This started as subprocedure implementation, but I'm now separating things.
2) Fix thrown of isc_bad_default_value
2010-06-15 16:07:58 +00:00
asfernandes
0c47a04538 1) Use RAII with the non-cached requests.
2) Change GPRE generated code to something that fits the future SMP-aware engine, replacing calls of "request = CMP_compile2(...)" by "request.compile(...)". Boot build required.
2010-04-19 22:49:18 +00:00
asfernandes
fc432dc572 Correction to my last commit 2010-03-21 02:27:54 +00:00
asfernandes
f2dcf72838 Fixed CORE-2923 - Problem with dependencies between a procedure and a view using that procedure. 2010-03-21 02:01:59 +00:00
asfernandes
e992be2595 Hope this fix the DDL problem reported by Ivan Prenosil 2010-03-06 19:10:48 +00:00
asfernandes
9c1bab1793 Feature CORE-1385 Identity columns - in its basic form 2010-01-13 19:14:15 +00:00
asfernandes
cdb6af0ba8 Misc 2010-01-10 17:35:11 +00:00
asfernandes
c3f9ef27e8 Refactor CREATE GENERATOR/SEQUENCE 2010-01-10 17:32:40 +00:00
asfernandes
37624273b6 Throw trigger creation exceptions like in previous versions 2010-01-10 16:39:56 +00:00
asfernandes
a2359fc3f2 Support for new types and support for getters in ResultSet 2010-01-03 20:56:39 +00:00
asfernandes
7ff112a901 Some syntactic sugar 2010-01-03 00:19:14 +00:00
robocop
a2f34c1dbc Put more strings into the msg db. 2010-01-02 09:42:09 +00:00
asfernandes
e13a0e3865 Misc 2010-01-01 20:23:52 +00:00
asfernandes
f7e2c38f14 1) Write the function return type as domain, like the parameters. 2) Fix storeGlobalField to always store RDB. 2009-12-31 14:58:12 +00:00
asfernandes
1cb7ba068e Try to collect function signatures like procedures. Not good yet. 2009-12-30 14:50:18 +00:00
asfernandes
29df794a24 Fixes and completions for packages 2009-12-29 15:27:58 +00:00
asfernandes
534b8c020e Misc 2009-12-25 19:29:58 +00:00
dimitr
2702907c88 We don't need an EOS slot for PSQL functions. 2009-12-25 11:16:20 +00:00
dimitr
e3a3594f12 Corrections. 2009-12-24 12:02:29 +00:00
robocop
cd4c00ab21 Misc. 2009-12-24 10:42:32 +00:00
dimitr
288956c8d0 Corrections. 2009-12-24 10:32:54 +00:00
asfernandes
d3ac9ac6cc More refactoring: name changes, accessors, consts, removed not good references (statement referencing scratch and metadata indirectly) 2009-12-23 00:57:08 +00:00
asfernandes
8968888820 Getters and setters for DsqlCompiledStatement and consts 2009-12-22 15:36:10 +00:00
asfernandes
dd6331f002 Some fixes; Misc. 2009-12-22 00:08:49 +00:00
dimitr
1f3694c903 Support for PSQL functions (only the DSQL part so far). Still work in progress. 2009-12-21 17:23:07 +00:00
asfernandes
985bc2db87 Separate the scratch, statement and request flags. Don't ask me why I didn't change them to bools. 2009-12-20 22:42:43 +00:00
asfernandes
488eb40fe0 Refactor DSQL, continuing the work I started in 2.5:
- Renamed CompiledStatement to DsqlCompilerScratch and removed inheritance to dsql_req.
- Introduced DsqlCompilerStatement, moving things from dsql_req - not completelly shareable yet.
- Make dsql_req reference a DsqlCompilerStatement. DsqlCompilerScratch may be discarded in the future.
- Replaced AlterCharSetNode usage by PreparedStatement for the default collation in database creation.
- Changed METD API.
2009-12-20 21:01:10 +00:00
asfernandes
0d0cecce90 Changed parameters to unsigned; Misc 2009-12-19 15:00:18 +00:00
asfernandes
e386c68e8e Misc 2009-12-17 23:59:07 +00:00
robocop
5f7d45be9b Make more error messages non-hardcoded. 2009-12-17 10:50:40 +00:00
robocop
12823de46d I'll put this code to test when I find a suitable syntax to push comments. 2009-12-16 09:34:25 +00:00
asfernandes
914ef4ca97 Front-port fix for CORE-2804 - Problems with COMMENT ON and strings using introducer (charset) 2009-12-14 15:16:55 +00:00
robocop
271560ff91 Make clearer that we are working with binary, untranslatable blobs. 2009-12-07 05:32:08 +00:00
asfernandes
fbcaf72adf Move and rename methods 2009-12-06 19:11:25 +00:00
asfernandes
43a6918fe3 Fix possible problem with the transliteration buffer size - thanks to Claudio 2009-12-06 13:51:03 +00:00
robocop
85540e5b0e Misc. 2009-12-06 11:21:18 +00:00
asfernandes
7a78601ef2 1) Use metadata character set in DSQL cache
2) Make exceptions in metadata charset and convert them to the client charset - this should fix CORE-2431
3) Support for "internal" (engine) DSQL statements and use in COMMENT ON
2009-12-05 14:21:52 +00:00
robocop
f955568fc9 The architect created ODS12 and saw it was good, then he said "thy shall be the only one among your race", dropped the older ones and sent the developers to the four corners of the cyberspace to convert the masses to ODS12. 2009-11-27 02:33:40 +00:00
alexpeshkoff
0767839ae5 Fixed CORE-2768: ALTERING OR DROPPING PROCEDURE which has type of domain parameter leads to attempt to delete that domain 2009-11-26 15:54:54 +00:00
asfernandes
200a63b1b4 Reduce usage of legacy (and unsafe) nodes related to PSQL parameters and variables.
Use btyacc feature "inherited attributes" (kind of parameters for non-terminals).
2009-11-21 20:42:27 +00:00
robocop
9ce4040042 Replace the now obsolete dbb_minor_original by dbb_minor_version. 2009-11-18 12:02:00 +00:00
asfernandes
4a3d198ade Misc 2009-10-31 01:46:06 +00:00
robocop
b304b96224 Misc. 2009-10-30 10:43:42 +00:00
asfernandes
1960c5ce64 Misc 2009-10-27 14:58:54 +00:00
asfernandes
55449dfb6a Misc 2009-10-27 14:50:15 +00:00
asfernandes
7cf7defc37 Misc 2009-10-24 18:38:25 +00:00
asfernandes
36b42645bc Fix problem detected by Dmitry, were RDB$PROCEDURE_PARAMETERS.RDB$COLLATION_ID was not being written 2009-10-23 15:13:34 +00:00
asfernandes
8e2abd22e4 Be consistent and run AFTER ddl-triggers before release the savepoint. Should not change functionality, as there is already a savepoint created by DYN. 2009-10-23 14:41:40 +00:00
asfernandes
dc5edd5aed Misc 2009-10-23 00:42:40 +00:00
asfernandes
ed0e0daeb3 - External Engines implementation.
- Plugins API.

- Feature CORE-2700 - UDR (User Defined Routines) Engine - C++ API supporting functions, triggers and stored procedures.
- Feature CORE-2470 - Support for alternate format of strings literals.
- Feature CORE-2310 - DDL triggers.
- Feature CORE-2312 - PSQL Packages.
- Feature CORE-1209 - CONTINUE statement.
- Feature CORE-1180 - DDL syntax to change (not) nullable state of columns.
- Feature CORE-2090 - Support OVER () clause with current aggregate functions.

- Fixed CORE-2699 - Common table expression context could be used with parameters.

- Introduce ODS 12.0.

- Work in progress in type-safe parser.
- Refactor some DDL commands (procedures and triggers) from DYN to DdlNodes.
- Refactor virtual tables to use a class hierarchy instead of namespaces. This is basic thing, not based on the changes done in Vulcan. Window functions is based on this work.
- Refactor COMMENT ON and DROP FUNCTION from DYN to DdlNodes. COMMENT ON do not use GDML anymore, it uses DSQL with PreparedStatement class.
- Refactor EXECUTE BLOCK to StmtNodes.
- Refactor the IUDF to SysFunctions. That eliminates RDB$GET_CONTEXT and RDB$SET_CONTEXT from RDB$FUNCTIONS.
2009-10-21 00:42:38 +00:00
robocop
888000e21e Unused function params. 2009-04-26 10:24:44 +00:00
robocop
665c887e53 Style. 2009-01-05 08:48:32 +00:00
alexpeshkoff
5ac5869661 CORE-1964 - stop vararg mess when reporting errors. Use special class for it. More (ERR_post cleanup) to come. 2008-07-03 12:02:54 +00:00
asfernandes
d4bf9ab246 Split dsql_req into dsql_req and CompiledStatement. This should be my last refactoring to 2.5:
- dsql_req becomes a running request;
- CompiledStatement is derived from dsql_req. The compilation state previously in dsql_req comes to here;
- Rename many "request" parameters to "statement" where type is changed from dsql_req to CompiledStatement.
This changes makes easy the path to support compiled statement cache.
2008-05-24 03:19:52 +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