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

193 Commits

Author SHA1 Message Date
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
asfernandes
83d74dc2b4 Rework on line/column info support to make it faster 2010-12-05 00:55:54 +00:00
asfernandes
9c42d4e5af Finish the statements refactor in the engine. Get rid of jrd_nod. 2010-12-04 22:15:03 +00:00
asfernandes
bcbc1ed46e Move some previously static functions to StmtNodes.cpp 2010-11-29 14:54:07 +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
a3064848d6 Make ExprNodes and RecordSourceNodes reference others directly instead of via jrd_nod.
Store ValueExprNodes instead of jrd_nod in the metadata cache.
Make RecordSourceNode child of ExprNode as they share most operations.
Get rid of the JRD visitors in favor of direct calls.
Convert assignments statement lists created inside expressions to separate source and targets ValuesExprNodes.
2010-11-21 03:47:29 +00:00
asfernandes
4dea3a42a1 Remove dependency of jrd_nod in ExprNode 2010-11-14 22:31:42 +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
alexpeshkoff
e05c1a825f Moved some more .h-files to common from jrd as Vlad suggested 2010-10-13 10:39:52 +00:00
dimitr
0a34f7c97a Fixed one of the problems with PSQL functions reported by Vlad privately. 2010-09-27 12:29:49 +00:00
asfernandes
b49391c8d0 Misc 2010-09-25 23:08:18 +00:00
robocop
98a2c6822d Warnings. 2010-09-24 09:53:51 +00:00
asfernandes
9b8171d5c1 1) Refactor nod_value_if.
2) Created ExprNode::expressionEqual method to replace a new big and ugly switch.
3) Make boolean referencers use BoolExprNode instead of jrd_nod, except nod_validate for now. This includes BinaryBoolNode and NotBoolNode working without jrd_nod references.
4) Rework in the impure allocation code (replace "csb_impure += ..." by CMP_impure calls).
2010-09-20 16:07:50 +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
48d83b8fef Refactor nod_rse, nod_relation, nod_procedure, nod_union, nod_aggregate and nod_window. 2010-08-24 03:25:01 +00:00
asfernandes
8657f4b599 Better internal handling of dependencies 2010-08-11 02:59:33 +00:00
asfernandes
dadc0f560c Const correction for EVL, EXE and they subsystems. Adjustments to CMP and OPT. 2010-08-09 15:48:51 +00:00
robocop
4edd547b17 Misc. 2010-06-30 08:55:16 +00:00
asfernandes
75af3ccf65 Misc/cleanup 2010-06-22 00:53:35 +00:00
asfernandes
6249162c4e Fixed CORE-3047 - Wrong logic is used to resolve EXECUTE BLOCK parameters collations 2010-06-20 03:11:05 +00:00
asfernandes
12079f5ece Created class BlrWriter and reorganization (move BLR generation from statement to scratch) 2010-06-17 01:18:40 +00:00
alexpeshkoff
a9446e6740 Fixed segfault during DEV_BUILD 2010-06-16 12:44:43 +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
22e99e49ce Improvement CORE-3020 - Add clause RETURNING ... INTO ... to MERGE statement 2010-06-10 02:03:03 +00:00