#coding:utf-8 # # id: functional.basic.db.28 # title: Empty DB - RDB$TRIGGER_MESSAGES # decription: Check for correct content of RDB$TRIGGER_MESSAGES in empty database. # tracker_id: # min_versions: [] # versions: 3.0 # qmid: functional.basic.db.db_28 import pytest from firebird.qa import db_factory, isql_act, Action # version: 3.0 # resources: None substitutions_1 = [('RDB\\$TRIGGER_NAME[\\s]+RDB\\$TRIGGER.*', 'RDB\\$TRIGGER_NAME RDB\\$TRIGGER')] init_script_1 = """""" db_1 = db_factory(sql_dialect=3, init=init_script_1) test_script_1 = """ set list on; set count on; set blob all; select * from rdb$trigger_messages order by rdb$trigger_name, rdb$message_number; """ act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1) expected_stdout_1 = """ RDB$TRIGGER_NAME RDB$TRIGGER_1 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE existing_priv_mod RDB$TRIGGER_NAME RDB$TRIGGER_10 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE primary_key_ref RDB$TRIGGER_NAME RDB$TRIGGER_10 RDB$MESSAGE_NUMBER 2 RDB$MESSAGE primary_key_notnull RDB$TRIGGER_NAME RDB$TRIGGER_12 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE ref_cnstrnt_notfound RDB$TRIGGER_NAME RDB$TRIGGER_12 RDB$MESSAGE_NUMBER 2 RDB$MESSAGE foreign_key_notfound RDB$TRIGGER_NAME RDB$TRIGGER_13 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE ref_cnstrnt_update RDB$TRIGGER_NAME RDB$TRIGGER_14 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE check_cnstrnt_update RDB$TRIGGER_NAME RDB$TRIGGER_15 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE check_cnstrnt_del RDB$TRIGGER_NAME RDB$TRIGGER_17 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE integ_index_seg_del RDB$TRIGGER_NAME RDB$TRIGGER_18 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE integ_index_seg_mod RDB$TRIGGER_NAME RDB$TRIGGER_19 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE integ_index_del RDB$TRIGGER_NAME RDB$TRIGGER_2 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE systrig_update RDB$TRIGGER_NAME RDB$TRIGGER_20 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE integ_index_mod RDB$TRIGGER_NAME RDB$TRIGGER_20 RDB$MESSAGE_NUMBER 2 RDB$MESSAGE integ_index_deactivate RDB$TRIGGER_NAME RDB$TRIGGER_20 RDB$MESSAGE_NUMBER 3 RDB$MESSAGE integ_deactivate_primary RDB$TRIGGER_NAME RDB$TRIGGER_21 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE check_trig_del RDB$TRIGGER_NAME RDB$TRIGGER_22 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE check_trig_update RDB$TRIGGER_NAME RDB$TRIGGER_23 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE cnstrnt_fld_del RDB$TRIGGER_NAME RDB$TRIGGER_24 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE cnstrnt_fld_rename RDB$TRIGGER_NAME RDB$TRIGGER_24 RDB$MESSAGE_NUMBER 2 RDB$MESSAGE integ_index_seg_mod RDB$TRIGGER_NAME RDB$TRIGGER_25 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE rel_cnstrnt_update RDB$TRIGGER_NAME RDB$TRIGGER_26 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE constaint_on_view RDB$TRIGGER_NAME RDB$TRIGGER_26 RDB$MESSAGE_NUMBER 2 RDB$MESSAGE invld_cnstrnt_type RDB$TRIGGER_NAME RDB$TRIGGER_26 RDB$MESSAGE_NUMBER 3 RDB$MESSAGE primary_key_exists RDB$TRIGGER_NAME RDB$TRIGGER_3 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE systrig_update RDB$TRIGGER_NAME RDB$TRIGGER_31 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE no_write_user_priv RDB$TRIGGER_NAME RDB$TRIGGER_32 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE no_write_user_priv RDB$TRIGGER_NAME RDB$TRIGGER_33 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE no_write_user_priv RDB$TRIGGER_NAME RDB$TRIGGER_36 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE integ_index_seg_mod RDB$TRIGGER_NAME RDB$TRIGGER_9 RDB$MESSAGE_NUMBER 0 RDB$MESSAGE grant_obj_notfound RDB$TRIGGER_NAME RDB$TRIGGER_9 RDB$MESSAGE_NUMBER 1 RDB$MESSAGE grant_fld_notfound RDB$TRIGGER_NAME RDB$TRIGGER_9 RDB$MESSAGE_NUMBER 2 RDB$MESSAGE grant_nopriv RDB$TRIGGER_NAME RDB$TRIGGER_9 RDB$MESSAGE_NUMBER 3 RDB$MESSAGE nonsql_security_rel RDB$TRIGGER_NAME RDB$TRIGGER_9 RDB$MESSAGE_NUMBER 4 RDB$MESSAGE nonsql_security_fld RDB$TRIGGER_NAME RDB$TRIGGER_9 RDB$MESSAGE_NUMBER 5 RDB$MESSAGE grant_nopriv_on_base Records affected: 35 """ @pytest.mark.version('>=3.0') def test_28_1(act_1: Action): act_1.expected_stdout = expected_stdout_1 act_1.execute() assert act_1.clean_expected_stdout == act_1.clean_stdout