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

218 Commits

Author SHA1 Message Date
asfernandes
de802194c4 Fixed (as possible) CORE-4160 - The parameterized exception does not accept not ASCII characters as parameter. 2013-08-19 15:31:00 +00:00
dimitr
54aabd005f Fixed regression appeared in test functional.view.create_07. 2013-07-16 10:25:28 +00:00
dimitr
95bf7c51da Misc adjustments. 2013-07-16 05:05:47 +00:00
dimitr
8eca48585c Fixed assertion/crash appeared in test bugs.core_1910. 2013-07-11 06:00:59 +00:00
dimitr
81466c3768 1) Fixed XCP_MESSAGE_LENGTH to represent the real max length. We have the column defined as VARCHAR(1023), so there's no need to subtract the overhead.
2) Slightly refactored the message buffer management.
3) Fixed the buffer overrun in the release build.
2013-07-10 11:44:39 +00:00
dimitr
cb1975f13c Attempted to fix a possible crash due to the wrong request pointer remaining in tdbb after sub-request execution. While being there, cleaned up some redundant code. 2013-06-19 06:26:57 +00:00
asfernandes
fc16bb34e4 Fixed crash when calling unimplemented packaged procedures. 2013-05-13 01:48:57 +00:00
asfernandes
e0567463bf Revert external routines to request-based (*) code, but now using a totally different internal approach.
* This is not ideal IMO, but much more easier to currently support stack traces, and domain's defaults and validations.
2013-04-11 15:44:17 +00:00
asfernandes
d0c79a4508 Cleanup. 2013-03-31 18:23:54 +00:00
asfernandes
871c073279 Refactor. 2013-03-31 15:55:01 +00:00
dimitr
15e4367810 Small refactoring. 2013-03-17 17:35:53 +00:00
alexpeshkoff
5c0cec6d9f Fixed CORE-3360: update ... returning ... raises -551 (no perm to update) for a column present only in the returning clause 2013-03-11 15:43:33 +00:00
asfernandes
6de58d0ccb Cleanup. 2013-03-08 15:31:25 +00:00
dimitr
86f4b02ef3 1) Cleanup and renaming in the SCL code.
2) Reimplemented the USAGE privilege as a separate one.
3) Added USAGE permission checks for generators/sequences and exceptions.
4) Supported USAGE in GRANT/REVOKE for all object types.
5) Refactored SET GENERATOR and ALTER SEQUENCE as true DDL. blr_set_generator is supported only for backward compatibility, it's not generated by DSQL anymore.
6) Added START WITH clause for [RE]CREATE SEQUENCE and CREATE OR ALTER SEQUENCE.
7) Fixed a number of related errors.
2013-03-07 13:59:03 +00:00
asfernandes
48fd751c6e Fixing FB_MESSAGE macro and external functions and procedures.
Isolate external routines them from request-based ones.
2013-03-04 01:42:58 +00:00
alexpeshkoff
fc12495d0e Modified IStatement interface in our API:
1. Never allocate empty statement - always use att->prepare() to create statement interface
2. Separated IStatement into 2 parts - statement itself and resultset.
3. Added stmt->openCursor() (and att->openCursor() for unprepared statements) to create IResultSet.
4. Always use IMessageMetadata (former IParametersMetadata) to pass message fromat info from client,
   therefore avoiding need in BLR generation in client applications.
2013-02-17 12:08:53 +00:00
asfernandes
fb01fe56fc Fix SELECT FOR UPDATE problem related to r57615 change. 2013-02-09 01:51:27 +00:00
asfernandes
66ba00e124 Misc. 2013-02-08 01:48:28 +00:00
dimitr
a7a6a45ec2 Misc adjustments. 2013-01-24 07:05:34 +00:00
asfernandes
970677e8de Get rid of dsql_str and fix metadata strings. 2012-12-25 17:34:50 +00:00
asfernandes
9b72aa53bc Misc. 2012-12-19 00:56:57 +00:00
dimitr
fd24c3e3e0 Yet another complementary bugfix for CORE-4004. 2012-12-12 07:48:34 +00:00
dimitr
3971e49b30 Another bunch of changes for CORE-4004: Sometimes long-running operations cannot be interrupted by asynchronous shutdown / cancellation requests. The looper nodes should never ignore req_unwind and transform it to something else.
Review and testing would be appreciated, especially in regard to EXE_assignment.
2012-12-06 12:09:11 +00:00
asfernandes
1cfac2b169 Refactor dsql_fld, TypeClause and ParameterClause. Eliminate some warnings. 2012-12-05 02:07:37 +00:00
dimitr
60d8b9fd37 Additional fixes for CORE-3981 (Sub-optimal predicate checking while selecting from a view) that also resolve the regression CORE-3986 (GSEC couldn't change user password after fix for CORE-3981). 2012-11-20 10:39:37 +00:00
asfernandes
a31f48a6a2 Misc. 2012-11-19 23:32:44 +00:00
dimitr
74db9507c2 Fixed CORE-3979: Server crashes while unwinding changes in an autonomous transaction. 2012-11-17 15:31:21 +00:00
asfernandes
62ac6e3b31 Fixed CORE-3966 - Creating a stored procedure with an "update or insert" statement with MATCHING fails. 2012-11-04 02:28:33 +00:00
asfernandes
b7d87a6cfa Misc. 2012-10-16 00:51:42 +00:00
hvlad
513ce5e1ce Additional patch for improvement CORE-3362 : Cursors should ignore changes made by the same statement.
- SubQueryNode (sub-select's) and RseBoolNode (exists(), in\any\all) now knows if it is a part of some outer select (ForNode) or it is a standalone statement. 
- VIO\get_undo_data was reworked to better fit undo-log implementation, corresponding changes in VIO_chase_record_version also done
- AV in VIO\get_undo_data was fixed
2012-09-24 14:26:33 +00:00
asfernandes
594bea6af3 Fixed CORE-3893 - Cannot restore tpcc database in FB 3.0. 2012-07-20 02:41:58 +00:00
dimitr
19eaa2f355 Wiped out the legacy compatibility option. 2012-07-11 12:54:08 +00:00
asfernandes
07747144f7 Unify DSQL/JRD sub-nodes. 2012-05-03 16:43:29 +00:00
asfernandes
a2b389f1db Getting rid of dsql_nod. 2012-04-25 01:42:47 +00:00
robocop
70d5ebdfdf - Got rid of the fixed array that kept the stream count in the first element and 255 streams after it.
- Changed streams from UCHAR to ULONG as Dmitry wanted
- Got rid of some redundant flags to indicate BLR level
- Misc changes (for example, converted to test for DBB_read_only in Database to a function)
- BLR v6 is left commented (waiting for a better solution to appear, if any exists)
- This change is not going to raise the engine limits until a solution is found to express more than 255 streams in BLR.
2012-04-12 09:02:13 +00:00
asfernandes
2f3d4918da Refactored nod_rows. 2012-04-07 04:21:46 +00:00
asfernandes
617ef670ed Refactored nod_select_expr, nod_with and nod_list (union). 2012-04-07 03:03:28 +00:00
asfernandes
38083d12dc Refactored nod_field_name, nod_var_name, nod_array and nod_collate. 2012-03-25 01:08:55 +00:00
asfernandes
3e81925010 Refactor DDL nodes removing references to non-value/-rse dsql_nod. 2012-03-18 21:37:13 +00:00
asfernandes
dd46c387fb Misc. 2012-03-17 02:26:59 +00:00
dimitr
0ea7ae11f3 Fixed CORE-3092: ROW_COUNT is not cleared before the singleton INSERT statement, 2012-03-15 10:40:45 +00:00
alexpeshkoff
4e795f4047 Include platform definitions file common.h in firebird.h. Use OS-specific ThreadId instead artificial FB_THREAD_ID, avoiding unneeded casts in the code. This should fix BSD and MAC ports. 2012-03-01 08:55:43 +00:00
asfernandes
8f46d9300e 1) Make a new kind of Node (TransactionNode).
2) Make main parser statement return requests instead of nodes.
3) Some related cleanup (ddlData, ddlScratch).
4) Added dsqlPass to dsql_req and children, to get rid of ugly logic in prepareStatement.
2012-02-25 19:56:37 +00:00
dimitr
c879beaa21 Fixed the assert/crash when using the cursors at runtime. 2012-02-23 15:39:57 +00:00
asfernandes
b522566474 Remove legacy statements residuals. 2012-02-20 02:02:04 +00:00
robocop
5d2a0118c0 I don't see the point in creating temporary strings in these cases. 2012-02-15 03:43:06 +00:00
asfernandes
6b5a322e8b Refactor SELECT. 2012-02-10 03:06:57 +00:00
asfernandes
9a85f4f48b Refactor SET TRANSACTION command. 2012-02-06 20:10:50 +00:00
robocop
21cd78a0fd Cleanup: unused functions, parameters & variables. 2012-01-24 03:37:43 +00:00
asfernandes
e2f2a24151 Fixed CORE-3737 - EXECUTE BLOCK parameters definitions are not respected and may cause wrong behavior related to character sets. 2012-01-19 17:30:58 +00:00
robocop
e2914070b9 Misc. 2012-01-19 04:54:39 +00:00
asfernandes
9564611f90 Improvement CORE-3343 - RETURNING clause is not supported in positioned (WHERE CURRENT OF) UPDATE and DELETE statements. 2012-01-06 14:33:01 +00:00
dimitr
08cff42833 Let's avoid duplication of shared constants. 2011-12-22 08:07:17 +00:00
asfernandes
56400c594a Rename methods to match error constants as per Claudio request. 2011-11-10 14:35:40 +00:00
asfernandes
906ea4729e Misc. 2011-10-27 01:04:14 +00:00
asfernandes
372d48c97b Improvement CORE-3639 - Allow the use of multiple WHEN MATCHED / NOT MATCHED clauses in MERGE, as per the SQL 2008 specification.
Also updated MERGE and RETURNING docs, and fixed a bug with MERGE WHEN MATCHED DELETE and RETURNING.
2011-10-23 01:31:11 +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
c9a5a513d0 Mark sub procedure scratch as a procedure. 2011-10-03 15:52:14 +00:00
asfernandes
5ae632cf0b Feature CORE-1288 - Sub Procedures.
They're very simple for now. No access to parent variables nor to call neighbour procedures.

Tests at http://firebird.cvs.sourceforge.net/viewvc/firebird/fbtcs/GTCS/tests/FB_SQL_SUBPROC_1.output.
2011-10-02 22:11:41 +00:00
asfernandes
65ec2b5151 Fixed the padding of external procedure messages. Also removed obsolete checks in the touched code. 2011-08-28 18:31:44 +00:00
asfernandes
93aa34bddb Fixed the INSERT INTO ... SELECT bug reported by Ivan Prenosil in fb-devel. 2011-07-25 01:40:29 +00:00
dimitr
8f517dcbeb One more part of the fix for CORE-3340. 2011-04-05 05:49:40 +00:00
asfernandes
03ce334e2b Misc 2011-04-04 13:37:47 +00:00
robocop
ddef541fc9 Misc, style, etc. 2011-04-02 04:51:27 +00:00
asfernandes
c977df2141 Fixed CORE-3421 - AV with "UPDATE OR INSERT". 2011-03-31 14:26:59 +00:00
asfernandes
d67b091ee5 Misc 2011-03-11 00:58:55 +00:00
hvlad
60dc5dd571 Additional patch for CORE-3362 : Cursors should ignore changes made by the same statement
Better (i hope) fix for implicit cursors stability in PSQL
2011-03-08 09:05:28 +00:00
asfernandes
9dd82235f7 Replace some nod_list by array of nodes and change implementation of nod_returning to ReturningClause. 2011-03-07 03:15:07 +00:00
asfernandes
604bb0d769 Misc 2011-03-06 17:18:04 +00:00
asfernandes
5ffa89e0c7 Reference DML statements in DSQL with StmtNode instead of dsql_nod. 2011-03-06 02:48:34 +00:00
dimitr
d68affa114 More complex fix for CORE-3374: Server may crash or corrupt data if SELECT WITH LOCK is issued against records not in the latest format. It involves upgrading the record to the current format, like UPDATE does. 2011-03-05 17:33:01 +00:00
asfernandes
8d6c054d87 Refactored nod_src_info. 2011-03-05 02:47:22 +00:00
asfernandes
1c6e990926 Refactor DSQL INSERT, UPDATE, DELETE, MERGE, UPDATE OR INSERT and assignment statements. 2011-03-04 01:47:49 +00:00
hvlad
69df3d720f Additional patch for CORE-3362 : Cursors should ignore changes made by the same statement
Statements with more that one cursors should not create savepoint for the first cursor
2011-03-02 09:43:13 +00:00
hvlad
4cb57947fd Additional patch for CORE-3362 : Cursors should ignore changes made by the same statement 2011-02-28 10:11:37 +00:00
asfernandes
0e58483989 Refactor nod_cursor. 2011-02-26 21:51:45 +00:00
asfernandes
74a6076b50 Replace some blr_block by blr_begin, as before. 2011-02-26 01:10:26 +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
0ab05bd41c Refactor nod_start_savepoint and nod_end_savepoint. 2011-02-22 16:06:08 +00:00
asfernandes
dca1961a82 Refactor nod_while. 2011-02-22 15:30:06 +00:00
asfernandes
db4390bf9f Refactor SET GENERATOR / ALTER SEQUENCE. 2011-02-22 01:57:51 +00:00
asfernandes
0a6e338392 Refactoring nod_list and nod_block statements. 2011-02-22 00:51:56 +00:00
dimitr
7a405a4eea Fixed CORE-3058: New generators are created with wrong value when more than 32K generators was previously created. 2011-02-17 06:05:16 +00:00
asfernandes
305b989cf8 Fixed hang found with CORE-3340 test-case. 2011-02-09 21:26:18 +00:00
dimitr
679367a35f Misc. 2011-02-09 10:57:32 +00:00
asfernandes
1388655673 Fixed CORE-3255 - The server could crash using views with GROUP BY. 2011-02-06 21:59:20 +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
ccaaca7c72 Misc 2011-01-29 17:24:29 +00:00
dimitr
d037cc2ef0 More work on enlarging the message buffers. To be continued. 2011-01-28 18:51:23 +00:00
dimitr
e0f5a68da0 More work on enlarging the message buffers. To be continued. 2011-01-28 18:50:27 +00:00
asfernandes
23ae9f62e8 Refactor DSQL's BREAK, LEAVE and CONTINUE. 2011-01-22 21:32:29 +00:00
asfernandes
ffb28dfc3d Misc 2011-01-22 17:15:52 +00:00
alexpeshkoff
fc41c54a62 warnings 2011-01-21 17:16:13 +00:00
hvlad
8e4755b20f Front ported fix for bug CORE-3282 : EXECUTE STATEMENT parses the SQL text using wrong charset 2011-01-21 10:03:17 +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
0b1fa97b4a Refactored the DSQL support of cursor statements, execute procedure and execute statement 2010-12-23 18:42:06 +00:00
asfernandes
c268c1f25c Fixed CORE-2204 - Constraints on SP output parameters are checked even when the SP returns zero rows 2010-12-05 16:49:24 +00:00
asfernandes
5e95a16141 Use the impure space of string variable in a consistently (first or subsequent request execution) and optimized (no double allocation) way 2010-12-05 14:44:28 +00:00