Skip to content

Commit

Permalink
[CBRD-24564] reflect reuse-oid option in error message prining at vie…
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondykk9 authored Nov 27, 2022
1 parent 9b7daf7 commit 590885a
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 5 deletions.
1 change: 1 addition & 0 deletions msg/de_DE.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Isolation Pegelwert in MVCC muss 'read committed', 'repeatable read' oder 'serializable'.
81 '%1$s' ist ein 'auto_increment' Objekt, das nicht erlaubt als serielle verändert werden wird.
82 Ungültiger JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** Ungültiges Cache ***
Expand Down
1 change: 1 addition & 0 deletions msg/en_US.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Isolation level value in MVCC must be 'read committed', 'repeatable read' or 'serializable'.
81 '%1$s' is an 'auto_increment' object, which is not allowed to be altered as a serial.
82 Invalid JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** invalid cache ***
Expand Down
1 change: 1 addition & 0 deletions msg/en_US/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Isolation level value in MVCC must be 'read committed', 'repeatable read' or 'serializable'.
81 '%1$s' is an 'auto_increment' object, which is not allowed to be altered as a serial.
82 Invalid JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** invalid cache ***
Expand Down
1 change: 1 addition & 0 deletions msg/es_ES.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 El valor del nivel de aislamiento en MVCC debe ser 'read committed', 'readable read' o 'serializable'.
81 '%1$s' es un objeto 'auto_increment', que no se puede alterar como serial.
82 JSON inválido: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** Cache no valida. ***
Expand Down
1 change: 1 addition & 0 deletions msg/fr_FR.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 La valeur de niveau d'isolement dans MVCC doit être 'read committed', 'repeatable read' ou 'serializable'.
81 '%1$s' est un objet 'auto_increment', qui n'est pas autorisé à être modifié comme 'serial'.
82 JSON invalide: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** cache invalide ***
Expand Down
1 change: 1 addition & 0 deletions msg/it_IT.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Valore del livello isolation in MVCC deve essere 'read committed', 'repeatable read' o 'serializable'.
81 '%1$s' è un 'auto_increment' oggetto, che non può essere modificato come un seriale.
82 JSON non valido: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** cache non valido ***
Expand Down
1 change: 1 addition & 0 deletions msg/ja_JP.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 MVCCで分離レベルの値は、「read committed」、「repeatable read」または「serializable」でなければなりません。
81 「%1$s」は「auto_increment」オブジェクトです。これはシリアルように変更することが許可されていません。
82 Invalid JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** 正しくないキャッシュ ***
Expand Down
1 change: 1 addition & 0 deletions msg/km_KH.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Isolation level value in MVCC must be 'read committed', 'repeatable read' or 'serializable'.
81 '%1$s' is an 'auto_increment' object, which is not allowed to be altered as a serial.
82 Invalid JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** invalid cache ***
Expand Down
1 change: 1 addition & 0 deletions msg/ko_KR.euckr/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Ʈ����� �ݸ����� 'read committed', 'repeatable read', 'serializable' ���� �ϳ����� �մϴ�.
81 '%1$s'�� auto_increment ��ü�μ� serial ��üó�� ������ �� �����ϴ�.
82 ��ȿ���� ���� JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** �߸��� ij�� ***
Expand Down
1 change: 1 addition & 0 deletions msg/ko_KR.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 트랜잭션 격리도는 'read committed', 'repeatable read', 'serializable' 중의 하나여야 합니다.
81 '%1$s'은 auto_increment 객체로서 serial 객체처럼 변경할 수 없습니다.
82 유효하지 않은 JSON: '%1$s'.
83 Vclass %1$s is not updatable. Please check if any of its related classes are marked as REUSE_OID.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** 잘못된 캐시 ***
Expand Down
1 change: 1 addition & 0 deletions msg/ro_RO.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Nivelul de izolare MVCC trebuie să fie 'read committed', 'repeatable read' sau'serializable'.
81 '%1$s' este un obiect 'auto_increment', care nu poate fi modificat ca serial.
82 JSON invalid: '%1$s'.
83 Vclass %1$s is not updatable because the vclass has some reuse_oid table. Please check it.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** cache invalid ***
Expand Down
1 change: 1 addition & 0 deletions msg/tr_TR.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2011,6 +2011,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 MVCC tecrit seviye değerlerini 'read committed', 'repeatable read' ya da 'serializable' olması gerekir.
81 '%1$s' bir 'auto_increment' nesne olduğunu, seri olarak değiştirilebilir izin verilmez.
82 Geçersiz JSON: '%1$s'.
83 Vclass %1$s is not updatable because the vclass has some reuse_oid table. Please check it.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** geçersiz önbellek ***
Expand Down
1 change: 1 addition & 0 deletions msg/vi_VN.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2018,6 +2018,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 Isolation level value in MVCC must be 'read committed', 'repeatable read' or 'serializable'.
81 '%1$s' is an 'auto_increment' object, which is not allowed to be altered as a serial.
82 Invalid JSON: '%1$s'.
83 Vclass %1$s is not updatable because the vclass has some reuse_oid table. Please check it.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** invalid cache ***
Expand Down
1 change: 1 addition & 0 deletions msg/zh_CN.utf8/cubrid.msg
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,7 @@ $set 9 MSGCAT_SET_PARSER_RUNTIME
80 MVCC中的隔离级别值必须是 'read committed', 'repeatable read' 或 'serializable'.
81 '%1$s' 是一个 'auto_increment' 对象, 不允许改变成一个序列.
82 无效的JSON: '%1$s'.
83 Vclass %1$s is not updatable because the vclass has some reuse_oid table. Please check it.

$set 11 MSGCAT_SET_AUTHORIZATION
1 *** 无效的缓存 ***
Expand Down
1 change: 1 addition & 0 deletions src/parser/parse_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1816,6 +1816,7 @@ struct view_cache_info
int number_of_attrs;
DB_AUTH authorization;
NESTED_VIEW_VERSION_INFO *nested_views;
bool has_reuse_oid_table;
};

struct parser_hint
Expand Down
1 change: 1 addition & 0 deletions src/parser/parser_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,4 +574,5 @@
#define MSGCAT_MVCC_RUNTIME_XACT_ISO_LVL_MSG MSGCAT_RUNTIME_NO(80)
#define MSGCAT_RUNTIME_INVALID_AUTO_INCREMENT_ALTER MSGCAT_RUNTIME_NO(81)
#define MSGCAT_RUNTIME_INVALID_JSON MSGCAT_RUNTIME_NO(82)
#define MSGCAT_RUNTIME_REUSE_OID_TABLE_NOT_UPDATABLE MSGCAT_RUNTIME_NO(83)
#endif /* _PARSER_MESSAGE_H_ */
23 changes: 18 additions & 5 deletions src/parser/view_transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ static PT_NODE *mq_rewrite_agg_names (PARSER_CONTEXT * parser, PT_NODE * node, v
static PT_NODE *mq_rewrite_agg_names_post (PARSER_CONTEXT * parser, PT_NODE * node, void *void_arg, int *continue_walk);
static bool mq_conditionally_add_objects (PARSER_CONTEXT * parser, PT_NODE * flat, DB_OBJECT *** classes, int *index,
int *max);
static PT_UPDATABILITY mq_updatable_local (PARSER_CONTEXT * parser, PT_NODE * statement, DB_OBJECT *** classes, int *i,
int *max);
static PT_UPDATABILITY mq_updatable_local (PARSER_CONTEXT * parser, PT_NODE * statement, DB_OBJECT *** classes, int *i);
static PT_NODE *mq_substitute_select_in_statement (PARSER_CONTEXT * parser, PT_NODE * statement, PT_NODE * query_spec,
PT_NODE * class_);
static PT_NODE *mq_substitute_select_for_inline_view (PARSER_CONTEXT * parser, PT_NODE * statement,
Expand Down Expand Up @@ -1155,6 +1154,10 @@ mq_updatable_local (PARSER_CONTEXT * parser, PT_NODE * statement, DB_OBJECT ***
if (sm_is_reuse_oid_class ((*classes)[i]) || sm_is_system_class ((*classes)[i]) > 0)
{
local = (PT_UPDATABILITY) (local & PT_NOT_UPDATABLE);
if (parser->view_cache)
{
parser->view_cache->has_reuse_oid_table = true;
}
break;
}
}
Expand Down Expand Up @@ -1207,6 +1210,7 @@ mq_updatable (PARSER_CONTEXT * parser, PT_NODE * statement)
PT_UPDATABILITY updatable;
int num_classes = 0;
int max = MAX_STACK_OBJECTS;

DB_OBJECT *class_stack_array[MAX_STACK_OBJECTS];
DB_OBJECT **classes = class_stack_array;

Expand Down Expand Up @@ -11717,9 +11721,18 @@ mq_fetch_subqueries_for_update_local (PARSER_CONTEXT * parser, PT_NODE * class_,
if (!query_cache->view_cache->vquery_for_update
&& (!query_cache->view_cache->vquery_for_partial_update || (fetch_as != PT_PARTIAL_SELECT)) && parser)
{
PT_ERRORmf (parser, class_, MSGCAT_SET_PARSER_RUNTIME, MSGCAT_RUNTIME_VCLASS_NOT_UPDATABLE,
/* use function to get name. class_->info.name.original is not always set. */
db_get_class_name (class_object));
if (query_cache->view_cache->has_reuse_oid_table)
{
PT_ERRORmf (parser, class_, MSGCAT_SET_PARSER_RUNTIME, MSGCAT_RUNTIME_REUSE_OID_TABLE_NOT_UPDATABLE,
/* use function to get name. class_->info.name.original is not always set. */
db_get_class_name (class_object));
}
else
{
PT_ERRORmf (parser, class_, MSGCAT_SET_PARSER_RUNTIME, MSGCAT_RUNTIME_VCLASS_NOT_UPDATABLE,
/* use function to get name. class_->info.name.original is not always set. */
db_get_class_name (class_object));
}
}
if (fetch_as == PT_INVERTED_ASSIGNMENTS)
{
Expand Down

0 comments on commit 590885a

Please sign in to comment.