mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-01-22 21:43:06 +01:00
50 lines
1.3 KiB
Python
50 lines
1.3 KiB
Python
#coding:utf-8
|
|
#
|
|
# id: bugs.core_3690
|
|
# title: Wrong warning message for ambiguous query
|
|
# decription: NB: dialect 1 allows such queries for backward compatibility reasons
|
|
# tracker_id: CORE-3690
|
|
# min_versions: ['2.5.3']
|
|
# versions: 2.5.3
|
|
# qmid: None
|
|
|
|
import pytest
|
|
from firebird.qa import db_factory, isql_act, Action
|
|
|
|
# version: 2.5.3
|
|
# resources: None
|
|
|
|
substitutions_1 = []
|
|
|
|
init_script_1 = """"""
|
|
|
|
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
|
|
|
|
test_script_1 = """
|
|
set list on;
|
|
select m.mon$sql_dialect from mon$database m;
|
|
select 0*rdb$relation_id as id from rdb$database,rdb$database;
|
|
"""
|
|
|
|
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
|
|
|
expected_stdout_1 = """
|
|
MON$SQL_DIALECT 3
|
|
"""
|
|
expected_stderr_1 = """
|
|
Statement failed, SQLSTATE = 42702
|
|
Dynamic SQL Error
|
|
-SQL error code = -204
|
|
-Ambiguous field name between table RDB$DATABASE and table RDB$DATABASE
|
|
-RDB$RELATION_ID
|
|
"""
|
|
|
|
@pytest.mark.version('>=2.5.3')
|
|
def test_1(act_1: Action):
|
|
act_1.expected_stdout = expected_stdout_1
|
|
act_1.expected_stderr = expected_stderr_1
|
|
act_1.execute()
|
|
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
|
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
|
|