6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-22 13:33:07 +01:00

Added/Updated tests\bugs\core_3690_dialect_1_test.py: restored test that was missed during migration. Thanks to Anton Zuev.

This commit is contained in:
pavel-zotov 2023-03-10 19:09:36 +03:00
parent bc76b654c8
commit dd77299b70

View File

@ -0,0 +1,39 @@
#coding:utf-8
"""
ID: issue-4038
ISSUE: 4038
TITLE: Wrong warning message for ambiguous query
DESCRIPTION: SQL dialect 1 allows such queries for backward compatibility reasons
JIRA: CORE-3690
FBTEST: bugs.core_3690
"""
import pytest
from firebird.qa import *
db_1 = db_factory(sql_dialect=1)
test_script = """
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 = python_act('db_1')
expected_stdout_1 = """
MON$SQL_DIALECT 1
SQL warning code = 204
-Ambiguous field name between table RDB$DATABASE and table RDB$DATABASE
-RDB$RELATION_ID
ID 0
"""
@pytest.mark.version('>=3')
def test_dialect_1(act_1: Action):
act_1.expected_stdout = expected_stdout_1
act_1.isql(switches=['-q', '-sql_dialect', '1'], input=test_script, combine_output=True)
assert act_1.clean_stdout == act_1.clean_expected_stdout