2021-12-30 19:43:52 +01:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
|
|
|
ID: issue-3386
|
|
|
|
ISSUE: 3386
|
2022-02-02 15:46:19 +01:00
|
|
|
TITLE: recreate table T with PK or UK is impossible after duplicate typing w/o commit
|
|
|
|
when ISQL is launched in AUTODDL=OFF mode
|
2022-01-27 20:08:36 +01:00
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-3529
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.gh_3886
|
2022-01-27 20:08:36 +01:00
|
|
|
"""
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
db = db_factory()
|
2021-12-30 19:43:52 +01:00
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
test_script = """
|
2021-12-30 19:43:52 +01:00
|
|
|
set autoddl off;
|
|
|
|
recreate table t(id int primary key);
|
|
|
|
recreate table t(id int primary key);
|
2022-01-27 20:08:36 +01:00
|
|
|
commit;
|
2021-12-30 19:43:52 +01:00
|
|
|
commit; -- yes, 2nd time.
|
|
|
|
exit;
|
|
|
|
"""
|
|
|
|
|
2022-01-27 20:08:36 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-12-30 19:43:52 +01:00
|
|
|
|
|
|
|
@pytest.mark.version('>=3.0.8')
|
2022-01-27 20:08:36 +01:00
|
|
|
def test_1(act: Action):
|
|
|
|
act.execute()
|