2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
"""
|
|
|
|
ID: issue-2532
|
|
|
|
ISSUE: 2532
|
|
|
|
TITLE: View over global temporary table
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-2098
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_2098
|
2022-01-21 18:49:26 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
init_script = """create global temporary table temptable (
|
2021-04-26 20:07:00 +02:00
|
|
|
id integer);
|
|
|
|
commit;
|
|
|
|
"""
|
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
db = db_factory(init=init_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
test_script = """recreate view tempview1
|
2021-04-26 20:07:00 +02:00
|
|
|
as
|
|
|
|
select
|
|
|
|
a.id as id
|
|
|
|
from
|
|
|
|
temptable a;
|
|
|
|
commit;
|
|
|
|
recreate view tempview2
|
|
|
|
as
|
|
|
|
select
|
|
|
|
a.id + 1 as id
|
|
|
|
from
|
|
|
|
temptable a;
|
|
|
|
commit;
|
|
|
|
"""
|
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-21 18:49:26 +01:00
|
|
|
@pytest.mark.version('>=3')
|
|
|
|
def test_1(act: Action):
|
2022-01-25 22:55:48 +01:00
|
|
|
act.execute()
|