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

2362 Commits

Author SHA1 Message Date
hvlad
0e9ff225b8 Fixed bug CORE-4005 : wrong error message with recursive CTE 2013-07-19 12:09:29 +00:00
asfernandes
0ca870699d Fixed reintrodution of CORE-2660 noted by Dmitry. 2013-07-16 16:18:22 +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
20d9fd1d76 Fixed regression appeared in test bugs.core_1715. 2013-07-16 03:53:58 +00:00
asfernandes
7863b0d80a Fixed problem with COALESCE and IIF seen by Dmitry. Reintroduce the implicit casts removed in v3. 2013-07-13 20:50:58 +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
d11d3be507 Sync'ed with v2.5 and fixed wrong stream comparison checks. 2013-07-07 16:11:28 +00:00
asfernandes
9f6618e719 Fixed CORE-4140 - EXECUTE BLOCK's TYPE OF parameters with NONE charset may have be transformed to the connection charset. 2013-07-05 02:09:18 +00:00
asfernandes
169a645313 Fixed CORE-4126 - gbak -r fails in restoring all stored procedures/functions in packages. 2013-06-23 18:22:03 +00:00
mapopa
5fbaaecae7 eliminate error: use 'template' keyword to treat 'as' as a dependent template name http://stackoverflow.com/a/3786481/66242 2013-06-20 09:16:38 +00:00
dimitr
ecfe07ab72 A somewhat hackery solution that allows ISQL to work with SET GENERATOR as it expects. It fixes the issue reported by Philippe in fb-devel. 2013-06-20 08:04:04 +00:00
dimitr
3ba9ad4cc1 A few corrections, mostly regarding new-style vs legacy UDFs. 2013-06-19 09:14:01 +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
dimitr
0c9a9fdf4c Made the ALTER SEQUENCE RESTART behavior standard compliant. 2013-06-18 18:22:31 +00:00
asfernandes
768b79c361 Improvements and corrections to message builder and UDR. 2013-06-18 15:50:48 +00:00
asfernandes
60d0269c92 Fixed CORE-4119 - Metadata source becomes wrong after twice transliteration to the metadata charset. 2013-06-16 23:05:41 +00:00
dimitr
f73ca8885d Fixed regression CORE-4108: Server crashes when executing sql query "delete from mytable order by id desc rows 2". 2013-05-30 08:20:53 +00:00
robocop
99c21b988d Misc. 2013-05-21 21:46:28 +00:00
asfernandes
75e6bb9329 Added ALTER GENERATOR (as ALTER SEQUENCE) for consistency with the others SEQUENCE/GENERATOR commands. 2013-05-14 15:43:43 +00:00
asfernandes
637d8dfff1 Fixed problem with LEAVE and CONTINUE syntaxes. 2013-05-14 01:06:04 +00:00
asfernandes
6e4fbfdba7 Changed package routines syntax to not need (nor accept) a semi-colon after "END". 2013-05-13 01:49:34 +00:00
asfernandes
fc16bb34e4 Fixed crash when calling unimplemented packaged procedures. 2013-05-13 01:48:57 +00:00
asfernandes
d3b75f3aee Fixed crash with CORE-3694 test-case. 2013-05-07 16:02:28 +00:00
asfernandes
821dbb4977 Fixed CORE-4083 - Full outer join in derived table with coalesce (iif). 2013-05-05 22:59:39 +00:00
asfernandes
51565beebd Added FROM FIRST/LAST clause to NTH_VALUE (CORE-3621). 2013-04-24 15:31:13 +00:00
asfernandes
93924e08f5 Cleanup. 2013-04-11 16:04:25 +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
0d403112c5 Fixed CORE-4081 - Built-in functions and subselect no longer supported in "update or insert" value list. 2013-04-11 01:17:37 +00:00
asfernandes
d0c79a4508 Cleanup. 2013-03-31 18:23:54 +00:00
asfernandes
871c073279 Refactor. 2013-03-31 15:55:01 +00:00
asfernandes
b7667cb859 Make it work as before, although I think openCursor should fail with DDL statements.
Please check CursorTest.cpp (ddlFetch) in fbstuff.
2013-03-29 23:25:43 +00:00
asfernandes
bce4462d85 Fixed CORE-4071 - external function declaration with "returns parameter" crashes the server. 2013-03-27 16:09:18 +00:00
asfernandes
d7c58ad709 Fixed CORE-4070 - NOT-NULL-column can be used as primary key and filled with NULL-values. 2013-03-27 15:54:13 +00:00
asfernandes
40b07432b4 Fixed problem reported in fb-devel: FB3 and SQL_NULL. 2013-03-25 01:25:01 +00:00
asfernandes
931bf2ad90 Fixed problem reported in fb-devel: FB3 vs FB2.5: Different result for SUBSTRING('test' FROM 1 FOR NULL). 2013-03-24 15:55:08 +00:00
dimitr
2001352060 Misc. 2013-03-24 06:38:32 +00:00
asfernandes
1652cf93d7 Fixed CORE-4067 - Problem with "CREATE DATABASE ... COLLATION ..." and 1 dialect. 2013-03-23 20:41:17 +00:00
asfernandes
a412ef75bf Misc. 2013-03-17 20:36:56 +00:00
dimitr
15e4367810 Small refactoring. 2013-03-17 17:35:53 +00:00
asfernandes
b1644df1c8 Fixed CORE-4061 - isql does not insert boolean values correctly, always shown as False. 2013-03-13 02:15:38 +00:00
dimitr
478857711e Correction. 2013-03-12 10:26:33 +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
dimitr
17e5249a71 Misc syntax adjustments suggested by Adriano. 2013-03-10 07:03:17 +00:00
asfernandes
6de58d0ccb Cleanup. 2013-03-08 15:31:25 +00:00
asfernandes
bd237461db Misc. 2013-03-08 02:37:40 +00:00
asfernandes
6716fe1989 Correction. 2013-03-07 15:41:52 +00:00
asfernandes
809508145c Make line numbers of processed y-file matches parser.y lines. 2013-03-07 15:29:44 +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
asfernandes
b254fb11c7 Revert change of messages to void* in DSQL internals. 2013-02-24 16:26:00 +00:00
asfernandes
53d4d58113 Change message buffers type to void*. It adds some casts, but avoid them in users' code. 2013-02-23 03:09:17 +00:00
alexpeshkoff
5ecced8462 Better names for statement's flags 2013-02-22 07:24:46 +00:00
alexpeshkoff
ba9413b26a Add IStatement::getFlags() to help user make a solution what to do with SQL statement 2013-02-19 11:20:49 +00:00
asfernandes
ddc4d4eac3 Misc. 2013-02-17 23:06:40 +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
2ca8ca20db Misc. 2013-02-11 01:57:15 +00:00
asfernandes
fb01fe56fc Fix SELECT FOR UPDATE problem related to r57615 change. 2013-02-09 01:51:27 +00:00
asfernandes
7b3386ee2b Misc. 2013-02-08 01:50:37 +00:00
asfernandes
ac14501c6a Parse BLR messages using BlrReader (and without duplicate code) to avoid segfaults with truncated or invalid data. 2013-02-08 01:48:49 +00:00
asfernandes
66ba00e124 Misc. 2013-02-08 01:48:28 +00:00
dimitr
093462e82f Fixed inconsistency in the debug info version. 2013-01-29 15:09:34 +00:00
asfernandes
dc8e42e9bb Migrate external triggers to the new message-based style. 2013-01-29 01:21:32 +00:00
dimitr
358b173fee More work towards unlimited SQL/BLR lengths. 2013-01-25 12:34:19 +00:00
dimitr
6609d160b6 Slightly improved the condition for the Adriano's backward compatibility workaround, this optimizes METD_move() into a plain memcpy() for strings with an explicitly declared charset. 2013-01-24 16:52:13 +00:00
dimitr
a7a6a45ec2 Misc adjustments. 2013-01-24 07:05:34 +00:00
asfernandes
e8c7ca3e0f Fixed truncated error message for wrong CREATE COLLATION. 2013-01-20 19:55:52 +00:00
asfernandes
42cbecab05 Fixed a problem with CREATE COLLATION. 2013-01-20 15:11:57 +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
asfernandes
eb00918b00 Misc. 2012-12-10 15:46:51 +00:00
asfernandes
a5e986a78d Move code from parse.y to Parser.cpp. 2012-12-10 14:42:56 +00:00
asfernandes
d5f3e9f1fb Get rid of g_field hack. 2012-12-10 02:09:28 +00:00
asfernandes
da61724a53 Fixed CORE-4006 - Using a result from a procedure in a substring expression leads to server crash. 2012-12-07 01:22:02 +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
0bb4e7739c Get rid of g_field_name hack. 2012-12-05 14:31:35 +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
dimitr
606ae96e9f A more generic solution for CORE-1245: Incorrect column values with outer joins and views. It also fixes CORE-3981: Sub-optimal predicate checking while selecting from a view. 2012-11-14 08:24:18 +00:00
asfernandes
62161af59b Misc. 2012-11-11 18:19:33 +00:00
asfernandes
745a457f69 Fixed CORE-3973 - Original table name and column name and owner missing from SQLDA for aliased column in grouped query. 2012-11-07 15:46:54 +00:00
asfernandes
b7193e8edb Refactor duplicated code. 2012-11-07 15:46:13 +00:00
asfernandes
c15552e21a Fixed CORE-3965 - Creating a procedure containing "case when" expression leads to a server crash. 2012-11-07 00:43: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
c0b11f52ff Improvement CORE-3972 - Allow the selection of SQL_INT64, SQL_DATE and SQL_TIME in dialect 1.
Fix for CORE-3964 - It is not possible to create a ddl-trigger with "any DDL statement" clause.
2012-11-04 00:17:50 +00:00
dimitr
3dd0507b96 Wiped out the code that never worked due to the missing support for native quads. 2012-11-01 01:36:27 +00:00
asfernandes
a1b17ce0a5 Small cleanup on COMMENT ON constants. 2012-10-18 15:49:15 +00:00
asfernandes
b7d87a6cfa Misc. 2012-10-16 00:51:42 +00:00
robocop
a4c260dbdc Misc. 2012-09-30 01:50:41 +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
d684e4a2f5 Fixed assert reported by Vlad more some related problem. 2012-09-24 01:40:44 +00:00
asfernandes
a8483163ee Fixed CORE-3929 - Error "attempted update of read-only column" when trying select minvalue from list with more than 255 elements. 2012-09-20 15:53:04 +00:00
asfernandes
81609a77d7 Cleanup. 2012-09-18 16:01:58 +00:00
asfernandes
1e918da7b6 Fixed database default charset being ignored. 2012-09-13 15:55:12 +00:00
asfernandes
22fef2016a Feature CORE-3291 - New pseudocolumn to get number of transaction that created this record version. 2012-08-28 01:02:56 +00:00
asfernandes
a059a4cd6f Improvement CORE-3546 - Aliases for the RETURNING clause. 2012-08-21 15:38:15 +00:00
asfernandes
50253e0b26 Fixed CORE-3902 - Derived fields may not be optimized via an index. 2012-08-21 00:45:39 +00:00
asfernandes
62f81ca4bc Fix segfault while checking for trace of failed statement compilation. (happens with CORE-3794 testcase) 2012-08-10 15:40:27 +00:00
robocop
f601bbdb8b Misc. 2012-08-08 02:20:30 +00:00
asfernandes
3556fe5f0b Fixed CORE-3899 - row_number(), rank() and dense_rank() return BIGINT datatype in dialect 1. 2012-07-31 12:23:16 +00:00
asfernandes
94a9c6dad0 Fixed CORE-3894 - Wrong numbers in error message for decreasing char/varchar columns. 2012-07-22 01:42:19 +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
b31f4d9b94 Frontport UUID fixes (CORE-3238 and CORE-3887). 2012-07-11 01:56:37 +00:00
asfernandes
bfcd129c95 Fixed CORE-3874 - Computed column appears in non-existant rows of left join. 2012-06-23 16:08:30 +00:00
asfernandes
e8d1710d95 Warning. 2012-06-06 14:50:53 +00:00
asfernandes
1dcad0fe90 Misc. 2012-06-03 03:00:24 +00:00
alexpeshkoff
2a01e4bcf9 Implemented CORE-3861: Make it possible to encrypt database
Also some cleanups, the most important are:                                                                                                                   
- meaningful ctor on Jrd::Lock, helping to avoid code dup                                                                                                     
- avoid unneeded h-file dependencies, making boot build engine dependent
2012-05-31 16:53:42 +00:00
asfernandes
26c868b61f Fix/misc. 2012-05-26 21:18:17 +00:00
asfernandes
07557dc297 Misc. 2012-05-26 18:05:56 +00:00
asfernandes
5580857d73 Fixed problems with views WITH CHECK OPTION. Also change its triggers as asked for opinions in fb-devel. 2012-05-20 19:28:52 +00:00
robocop
844b15bd13 Misc and style. 2012-05-20 10:00:52 +00:00
robocop
642d506cd9 Change txn numbers to unsigned and commit after Vlad's review. If the compile-time checks (to ensure enough room for the new txn type) are too ugly, they may be deleted. 2012-05-19 12:04:37 +00:00
dimitr
0aede9b650 Front-ported extra fixes for CORE-3557. 2012-05-17 09:04:23 +00:00
asfernandes
d50019f50d More checks for CORE-3672. 2012-05-14 15:45:43 +00:00
asfernandes
9886cf8afc Disable blr_stmt_expr (re-enabled with CORE-3812 changes) and implement blr conversion for DECODE. 2012-05-11 16:13:05 +00:00
asfernandes
c90e3a8267 Fixed problem with CORE-3672 and parameters. 2012-05-11 13:58:59 +00:00
asfernandes
86d787b83e Fixed CORE-3672 - Computed index by substring function for long columns. 2012-05-10 16:05:18 +00:00
asfernandes
9575304592 Fixed the problem reported a while ago in fb-devel by Thomas Steinmaurer ("Fb 3 and RDB$MECHANISM values for SP/SF parameters"). 2012-05-07 15:25:46 +00:00
asfernandes
db30902bad Misc - seen by Claudio. 2012-05-05 19:16:21 +00:00
asfernandes
ed9ec009ba Fix CORE-2697 again after refactoring problems. 2012-05-05 15:38:13 +00:00
asfernandes
fd9324c5cf Fixed problems with plans introduced in old refactorings. 2012-05-04 17:01:06 +00:00
asfernandes
2b0eea972a Make usage of dsqlChildNodes consistent. 2012-05-04 15:32:49 +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
dimitr
8d50e30e90 Additional fix for CORE-3807. Otherwise, _utf8 'A' is considered equal to _win1251 'ABCD' etc. The original code didn't check for charsets/collations but IMHO this was wrong. 2012-04-13 09:11:31 +00:00
hvlad
df9c16dc80 Allow DEBUG build to work with pre-FB3 BLR code.
For example, it is impossible to restore database and to run script from CORE-3812.
Thanks to Dmitry for explanation.
2012-04-12 12:50:37 +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
hvlad
24d152138d Refactoring of runtime statistics and related classes:
- moved relation's counters into RuntimeStatistics.h 
- renamed RuntimeStatistics::bumpValue to RuntimeStatistics::bumpRelValue and thread_db::bumpStats to thread_db::bumpRelStats to make things more clear  
- removed not obvious cast in VIO_bump_count
- removed dependency of RuntimeStatistics.h from ntrace.h
2012-04-11 09:38:19 +00:00
robocop
afcbd0054e Misc. 2012-04-10 02:37:34 +00:00
robocop
80ca53c094 Misc. 2012-04-10 01:52:05 +00:00
asfernandes
f098e9a3d8 Refactored nod_order. 2012-04-08 04:15:09 +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
fa861b6e95 Misc. 2012-04-05 18:28:44 +00:00
dimitr
dad891ef3e Fixed my yesterday's commit. 2012-04-05 09:54:23 +00:00
dimitr
525149c8b4 Fixed CORE-3807: Error "Invalid expression in the select list" can be unexpectedly raised if a string literal is used inside a GROUP BY clause in a multi-byte connection. 2012-04-04 11:00:51 +00:00
hvlad
abf65b9e5c Fixed issue reported by Thomas Steinmaurer in fb-devel : trace often put in log line
Statement 0, <unknown, bug?>
2012-03-30 13:48:54 +00:00
hvlad
d8eb4166a4 Fixed bug CORE-3801 : Warnings could be put twice in status-vector 2012-03-29 13:56:21 +00:00
dimitr
a1c5800f64 Fixed compilation. 2012-03-26 15:28:13 +00:00
alexpeshkoff
42b20880df Correction - thanks to Claudio 2012-03-26 09:01:48 +00:00
asfernandes
f138ebc356 Correction. 2012-03-26 01:03:58 +00:00
asfernandes
fc2527be96 Make column_select a SubQueryNode instead of nod_select_expr directly. 2012-03-25 18:21:21 +00:00
asfernandes
38083d12dc Refactored nod_field_name, nod_var_name, nod_array and nod_collate. 2012-03-25 01:08:55 +00:00
alexpeshkoff
a89f9b7735 Fixed CORE-3782: Password encoding 2012-03-23 17:44:17 +00:00
asfernandes
b4ef002042 Fix a parser conflict. 2012-03-18 22:22:43 +00:00
asfernandes
456af220a8 Refactor nod_def_index. 2012-03-18 22:22:14 +00:00
asfernandes
3e81925010 Refactor DDL nodes removing references to non-value/-rse dsql_nod. 2012-03-18 21:37:13 +00:00
asfernandes
a0194aeaf3 Simplificate CastNode. There is no need for a format there. 2012-03-17 16:06:05 +00:00
asfernandes
dd46c387fb Misc. 2012-03-17 02:26:59 +00:00
dimitr
8780116b38 Fixed CORE-1992: bad BLR -- invalid stream for union select. 2012-03-15 12:10:11 +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
dimitr
7c14588baf Fixed CORE-3569: CHAR(32767) present in XSQLVAR with length 32765. The JRD part of the patch is not strictly required, as it's used exclusively for VARCHARs right now, but let's be protected for the unpredictable future. 2012-03-14 17:38:32 +00:00
asfernandes
1758b1fdbe Misc. 2012-03-10 15:37:52 +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
2522f8fc94 Correction. 2012-02-29 15:24:50 +00:00
asfernandes
435666cea5 Misc. 2012-02-26 14:27:27 +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
asfernandes
1039b3115f Patch by Alex to fix some bug in restore. 2012-02-25 13:53:49 +00:00
dimitr
c879beaa21 Fixed the assert/crash when using the cursors at runtime. 2012-02-23 15:39:57 +00:00
robocop
b29cdc92b3 Kill variable shadowing. 2012-02-23 07:17:12 +00:00
robocop
1c3fa15b79 Misc. 2012-02-22 01:29:35 +00:00
asfernandes
b522566474 Remove legacy statements residuals. 2012-02-20 02:02:04 +00:00
asfernandes
df31dac958 Refactor GRANT and REVOKE commands. This eliminates the DYN subsystem. 2012-02-19 02:17:27 +00:00
robocop
0b5ee78cb7 Make more members of blb private. 2012-02-15 07:13:41 +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
robocop
eed418a89e Make blb resemble more a class: private data members, convert some functions into methods, add methods with code that was in other files, etc. 2012-02-15 03:34:21 +00:00
asfernandes
6b5a322e8b Refactor SELECT. 2012-02-10 03:06:57 +00:00
asfernandes
ae1563fa2e Cleanup. 2012-02-10 03:06:22 +00:00
robocop
186c817caa Playing with fire: converting some static functions into member functions. I tried to check every change I did. 2012-02-07 03:17:52 +00:00
asfernandes
54986a0b0b Misc. 2012-02-06 21:50:49 +00:00
asfernandes
9a85f4f48b Refactor SET TRANSACTION command. 2012-02-06 20:10:50 +00:00
asfernandes
cf0cf42288 Refactor COMMIT and ROLLBACK commands. 2012-02-06 20:10:07 +00:00
asfernandes
27bb1f8bc1 1) Removed READ/WRITE BLOB sql commands. 2) Refactored request operations to fix server crashes. 2012-02-03 19:01:36 +00:00
asfernandes
e51ddc7a38 Misc. 2012-01-29 02:53:44 +00:00
asfernandes
819da0f942 Fixed problem with default collation. 2012-01-25 17:46:44 +00:00
robocop
21cd78a0fd Cleanup: unused functions, parameters & variables. 2012-01-24 03:37:43 +00:00
asfernandes
ed3d7ed720 Misc. 2012-01-20 01:42:03 +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
5ad1da3891 Simplification. 2012-01-19 05:42:04 +00:00
robocop
e2914070b9 Misc. 2012-01-19 04:54:39 +00:00
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
c5b605af3c Misc. 2012-01-09 00:49:25 +00:00
asfernandes
ac5713d843 Misc. 2012-01-09 00:08:58 +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
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
asfernandes
3c2e388571 Warning. 2011-12-28 01:20:11 +00:00
asfernandes
359f74e73a Misc. 2011-12-24 18:08:13 +00:00
asfernandes
958bca323a Misc. 2011-12-22 14:18:43 +00:00
dimitr
08cff42833 Let's avoid duplication of shared constants. 2011-12-22 08:07:17 +00:00
asfernandes
93b3c8933e Misc. 2011-12-21 00:51:28 +00:00
asfernandes
1bb24e6c08 Fixed CORE-3238 - Makes GEN_UUID return a compliant RFC-4122 binary UUID and introduce CHAR_TO_UUID2 and UUID_TO_CHAR2 to convert UUIDs from/to string also complying with the RFC. 2011-12-20 14:30:41 +00:00
hvlad
dd546a9d8a Fixed AV in trace when statement free event is traced and it is first traced event for a given statement (i.e. prepare\execution was not traced before).
Adriano, please review.
2011-12-19 10:01:02 +00:00
asfernandes
e94a79bec5 Misc. 2011-12-10 01:18:58 +00:00
dimitr
efa1adfec0 Correction related to CORE-927. 2011-12-06 18:09:15 +00:00
hvlad
c5cc0b113e Cleanup 2011-12-06 15:08:08 +00:00
asfernandes
d8a30e8094 Fixed CORE-3545 - Inconsistent domain's constraint validation in PSQL. 2011-12-06 14:24:10 +00:00
dimitr
8ffffb7f81 Fixed CORE-927: Grants don't work for procedures used inside views. 2011-12-06 13:09:51 +00:00
hvlad
6a8a920840 Fixed bug CORE-3690 : Wrong warning message for ambiguous query 2011-12-05 13:06:30 +00:00
asfernandes
965bf3f159 Fixed the problem with windowed functions in recursive CTEs, reported by Frank Ingermann in fb-devel.
This fix is complementary to the one done in CORE-3683.
2011-12-04 18:36:26 +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
19735c1e44 Misc. 2011-11-24 00:17:29 +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
4abaa3b3fb Misc. 2011-11-14 18:15:16 +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
fb030aa4a8 Cleanup for RECREATE commands. 2011-11-10 15:03:12 +00:00
asfernandes
45327bf06b Feature CORE-3018 - RECREATE SEQUENCE/GENERATOR. 2011-11-10 14:55:06 +00:00
asfernandes
56400c594a Rename methods to match error constants as per Claudio request. 2011-11-10 14:35:40 +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
9ae117e388 Fixed CORE-3611 - Wrong data while retrieving from CTEs (or derived tables) with same column names. 2011-10-27 23:53:15 +00:00
asfernandes
906ea4729e Misc. 2011-10-27 01:04:14 +00:00
asfernandes
4f1b4fe10f Correction. 2011-10-27 00:22:23 +00:00
asfernandes
cea1efd81b Feature CORE-3620 - Window function LAST_VALUE.
Feature CORE-3621 - Window function NTH_VALUE.
2011-10-25 15:04:17 +00:00
asfernandes
10496876fb Feature CORE-3619 - Windows function FIRST_VALUE. 2011-10-23 21:27:55 +00:00
asfernandes
9056e2b5a8 Misc. 2011-10-23 21:27:25 +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
7c1a04ea83 This check appears to do nothing good. Let the error always be thrown in DSQL. 2011-10-03 15:35:49 +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
01e6fd70ae Fixed PSQL functions problem (missing EOS). 2011-09-25 23:28:09 +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
robocop
59b3dc1c2b Misc. 2011-07-30 07:14:00 +00:00
asfernandes
03ae638440 Fixed the bug with NOT IN (list) reported by Ivan Prenosil in fb-devel. 2011-07-25 02:19:34 +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
asfernandes
42850d55b8 Misc. 2011-07-16 18:49:28 +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
ac96c3ae97 Front ported CORE-3554: Server crashes during prepare or throws incorrect parsing error if the remotely passed SQL query is empty. 2011-07-15 09:05:36 +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
dimitr
55b37f2648 Methinks this is a more correct logic than the one committed yesterday. Also, fixed the stream comparison for views. 2011-07-14 11:54:10 +00:00
dimitr
fbc944d4aa Poor man's attempt to fix the expression indices. In the old code, we didn't require node1->stream and node2->stream to be the same, we just needed node2->stream to be the one we considered for index matching. Different contexts don't necessarily mean different nodes, the relation could still be the same. 2011-07-13 14:50:37 +00:00
asfernandes
06430c488b Fixed problems in public headers. 2011-07-12 16:07:05 +00:00
asfernandes
cd7c8dee95 Use the BLR message definition of external procedures and functions. 2011-07-10 01:23:53 +00:00
alexpeshkoff
13e0341fea Use interface-based API in remote server. Use stable "next" pointers in yvalve. 2011-06-29 09:41:47 +00:00
asfernandes
a36147a943 Warning. 2011-06-25 18:13:25 +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
7ad98cd292 Work in progress on the external engines API changes. 2011-06-01 01:44:54 +00:00
asfernandes
dd0047e3b7 Fixed CORE-3475 - Parameters inside the CAST function are described as not nullable. 2011-05-27 15:29:20 +00:00
asfernandes
7c5b69403e Frontported changes of CORE-3491. 2011-05-27 02:05:27 +00:00
dimitr
ddb5264d94 Fixed CORE-3493: Adding a value to a timestamp below '16.11.1858 00:00:01' throws 'value exceeds the range for valid timestamp'. v2.1 wasn't really affected although the validation sequence was wrong. 2011-05-25 10:59:35 +00:00
asfernandes
0f39f04308 Fixed crash with nested unions, reported by Vlad.
SELECT 'a' FROM RDB$DATABASE
UNION ALL
SELECT X FROM
 (
   SELECT 'b' AS X FROM RDB$DATABASE
   UNION ALL
   SELECT 'c' FROM RDB$DATABASE
 ) AS T;
2011-05-14 02:49:02 +00:00
dimitr
83a3f80572 Fixed CORE-3477: Passing non-existing SQL parameters always crash server. 2011-05-12 14:56:54 +00:00
hvlad
fef1f49c94 Shared page cache implementation 2011-05-09 10:15:19 +00:00
asfernandes
efbd651d7f Correction. 2011-04-29 15:16:53 +00:00
alexpeshkoff
256cb1e853 1. Use reference counted stable in global pool objects instead PublicHandle's validation.
2. Avoid massive segfaults when closing heavily loaded server.                                                                                 
3. Restored logic in YValve required for correct shutdown.                                                                                    
4. Do not change externally visible request body when preparing it.
2011-04-25 17:47:56 +00:00
asfernandes
d7127242c7 Improvement CORE-3446 - Allow conversion from/to BLOBs and others types in the API functions (XSQLVAR or blr messages). 2011-04-19 15:24:26 +00:00
asfernandes
c63493ffba Added metadata support to IStatement. 2011-04-14 01:03:43 +00:00
asfernandes
6aa9a77199 Generate DSQL internal dbkey/rec_version only for SELECT...FOR UPDATE. They do nothing for others commands. 2011-04-13 17:14:31 +00:00
asfernandes
13bc02b147 Correction for cursor-based UPDATE/DELETE. 2011-04-13 16:57:58 +00:00
alexpeshkoff
437d841cfa Rolled back my commit using IBlrMessage interface. Replaced with single plain structure FbMessage. 2011-04-13 12:41:40 +00:00
alexpeshkoff
7d1b48f122 Added more diagnostics in DEV_BUILD. If you find it reasonable, can be internationalized and added to release too. 2011-04-13 12:39:44 +00:00
asfernandes
04bb4ba305 Remove unused parameter and rename a constant. 2011-04-09 20:00:00 +00:00
alexpeshkoff
9a4689d3e9 Use interface IBlrMessage instead passing C++ class pointer to API interface's functions 2011-04-08 16:43:05 +00:00
alexpeshkoff
4c3f87d6bd Continued renaming interfaces. Added comments 2011-04-08 15:18:50 +00:00
alexpeshkoff
5c88e478f6 Use better names for a number of objects according to Vlad's suggestion 2011-04-07 17:16:00 +00:00
dimitr
8809493e98 Fixed incorrect type evaluation for unions.
Example:
SELECT NULL AS PRICE FROM rdb$database
union all
SELECT 1.0 AS PRICE FROM rdb$database
2011-04-05 14:23:15 +00:00
dimitr
8f517dcbeb One more part of the fix for CORE-3340. 2011-04-05 05:49:40 +00:00
asfernandes
c081b763b2 Fixed CORE-2606 - Multibyte CHAR value requested as VARCHAR is returned with padded spaces. 2011-04-05 00:31:58 +00:00
asfernandes
03ce334e2b Misc 2011-04-04 13:37:47 +00:00
asfernandes
1a9f678844 Rework on the SQLDA support. 2011-04-02 19:39:27 +00:00
robocop
ddef541fc9 Misc, style, etc. 2011-04-02 04:51:27 +00:00
robocop
9d980c7e88 Misc, style, etc. 2011-04-02 04:24:20 +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
c977df2141 Fixed CORE-3421 - AV with "UPDATE OR INSERT". 2011-03-31 14:26:59 +00:00
asfernandes
51f68bd9ac Fixed CORE-3423 - Wrong RDB$PARAMETER_MECHANISM. 2011-03-31 14:26:31 +00:00
alexpeshkoff
9ef53b65e0 Remove reference counting where not appropriate 2011-03-31 13:44:22 +00:00
hvlad
e532b564fe Fixed issue reported by Claudio privately 2011-03-31 10:28:36 +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
ed740ba832 Misc 2011-03-21 22:51:48 +00:00
asfernandes
c863db6e6d Removed commented out Sqlda support and rename methods removing the word 'messsage'. 2011-03-20 19:15:55 +00:00
asfernandes
34fd6866bc Remove unused message types. 2011-03-20 19:15:13 +00:00
asfernandes
2ce201f4ae Use MessageBuffer in executeMessage and fetchMessage. 2011-03-20 19:14:03 +00:00
asfernandes
e4658d76c3 Misc 2011-03-20 16:24:46 +00:00
asfernandes
c12c710348 Simplification 2011-03-18 15:24:25 +00:00
hvlad
6b7e763f9b Fixed bug CORE-3389 : isc_dsql_exec_immed2 with zero transaction handle could lead to a BUGCHECK(147).
While HEAD is not affected directly by this exact test case i see no harm to repeat the fix there too.
2011-03-16 21:08:32 +00:00
asfernandes
d67b091ee5 Misc 2011-03-11 00:58:55 +00:00
dimitr
82b595ae7e Misc adjustments. 2011-03-10 08:13:02 +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
7f056af8ec Fixed problem reported by Dmitry about values in DECLARE not being assigned to variables. 2011-03-07 20:56:17 +00:00
dimitr
311b8ffd78 Cleanup. 2011-03-07 19:41:46 +00:00
asfernandes
029d0e89a8 Replace parser hacks by correct btyacc's token position handling.
This fixes some problems introduced in 3.0 related to backtrackings.
It also fixes some non-precise line/column information in some commands (FOR ... DO <command>) and
stored SQL text prefixed with spaces (in views, for example).
2011-03-07 18:40:04 +00:00
asfernandes
e94a471688 Misc 2011-03-07 03:15:33 +00:00