Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to add comment to mapping ('COMMENT ON MAPPING ... IS ...') #7046

Closed
pavel-zotov opened this issue Nov 16, 2021 · 5 comments
Closed

Comments

@pavel-zotov
Copy link

Ticket was created after discussion with Alex.
Currently following script:

create or alter mapping lmap using plugin srp from user foo to user ltost;
comment on mapping lmap is 'test mapping,  do not delete';

-- issues:

Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 1, column 12.
mapping.
@AlexPeshkoff
Copy link
Member

No backporting supposed for this issue - it requires new ODS, at least minor (i.e. 13.1 in FB5).

@pavel-zotov
Copy link
Author

It seems that comment to MAPPING is not shown when we extract metadata as script vis 'isql -x'.

set bail on;
shell del c:\temp\tmp4test.fdb 2>nul;
create database 'localhost:c:\temp\tmp4test.fdb' user SYSDBA password 'masterkey';
commit;
show version;

recreate table test_tab(id int);
comment on table test_tab is 'Cu sea invenire appellantur.';

create or alter mapping test_map using plugin Srp from any user to user;
commit;
comment on mapping test_map is 'Lorem ipsum dolor sit amet.';
commit;

ISQL -X for database that is used in this script will show (at least on 5.0.0.958):

SET SQL DIALECT 3; 

/* CREATE DATABASE 'localhost:c:\temp\tmp4test.fdb' PAGE_SIZE 8192 DEFAULT CHARACTER SET NONE; */


COMMIT WORK;

/* Table: TEST_TAB, Owner: SYSDBA */
CREATE TABLE TEST_TAB (ID INTEGER);

/* Mapping security objects for this database */
CREATE MAPPING TEST_MAP USING PLUGIN SRP FROM ANY "USER" TO USER ;

/* Comments for database objects. */
COMMENT ON TABLE        TEST_TAB IS 'Cu sea invenire appellantur.';

(where is 'Lorem ipsum' here ?)

@pavel-zotov
Copy link
Author

QA: test will be adjusted after issue about visibility of comments to mapping in 'isql -x' result will be fixed.

@mrotteveel
Copy link
Member

Shouldn't this be reopened while this finding is pending?

@AlexPeshkoff AlexPeshkoff reopened this Mar 17, 2023
AlexPeshkoff added a commit that referenced this issue Jun 21, 2023
…N MAPPING ... IS ...'); show and extract comments on mappings in isql
@pavel-zotov
Copy link
Author

QA: added check to see comments on mapping in extracted metadata. Text of comment intentionally was replaced to non-ascii.

@mrotteveel mrotteveel changed the title Make ability to add comment to mapping ('COMMENT ON MAPPING ... IS ...') Add ability to add comment to mapping ('COMMENT ON MAPPING ... IS ...') Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants