FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.23k stars 213 forks source link

Database validation should skip/ignore VIEWS, EXTERNAL and GTT tables [CORE4962] #5253

Open firebird-automations opened 8 years ago

firebird-automations commented 8 years ago

Submitted by: @pavel-zotov

Attachments: online-validation-checks-views-and-external-table.fbk.7z

Unpack attached .7z and restore database from .fbk Then run:

$fb_home/bin/fbsvcmgr service_mgr action_validate dbname <restored-database-name.fdb>

- with redirection to some log.

In that log one may see following lines:

17:03:08.61 Relation 137 (EXT_STOPTEST) 17:03:08.61 Relation 137 (EXT_STOPTEST) is ok . . . 17:03:08.65 Relation 191 (V_QDISTR_SOURCE) 17:03:08.65 Relation 191 (V_QDISTR_SOURCE) is ok

17:03:08.65 Relation 192 (V_QSTORNED_SOURCE) 17:03:08.65 Relation 192 (V_QSTORNED_SOURCE) is ok

First relation is external table. Second and third - VIEWS with DDL like: 'select * from T1 union all select * from T2 union all ...'. Validation should skip such kinds of DB objects.

PS. Also (IMHO) validation should always skip checking GTT because their data will be stored in unknown places - AFAIK, this is so at least for CS.

firebird-automations commented 8 years ago
Modified by: @pavel-zotov Attachment: online\-validation\-checks\-views\-and\-external\-table\.fbk\.7z \[ 12822 \]
firebird-automations commented 8 years ago

Commented by: @hvlad

What exact problem do you see ?

firebird-automations commented 8 years ago

Commented by: @pavel-zotov

Ony one, minor: these lines can confuse those DBA who expect to see report about only *tables* and no anything else. So, this ticket rather should be marked as 'improvement' than 'bug'.

firebird-automations commented 8 years ago
Modified by: @pavel-zotov issuetype: Bug \[ 1 \] =\> Improvement \[ 4 \]
firebird-automations commented 8 years ago

Commented by: Sean Leyne (seanleyne)

Edited "Summary" to improve language.

firebird-automations commented 8 years ago
Modified by: Sean Leyne (seanleyne) summary: Online validation can take in account VIEWS and EXTERNAL table =\> Database validation should skip/ignore VIEWS, EXTERNAL and GTT tables
firebird-automations commented 8 years ago

Commented by: Claudio Valderrama C. (robocop)

It's unlikely that the engine will validate external tables and views, so they should be skipped.