2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
"""
|
2022-01-18 20:45:21 +01:00
|
|
|
ID: issue-388
|
2022-01-18 11:45:40 +01:00
|
|
|
ISSUE: 388
|
|
|
|
TITLE: Sequence of commands crash server
|
|
|
|
DESCRIPTION:
|
2022-01-18 20:45:21 +01:00
|
|
|
JIRA: CORE-63
|
2022-02-02 15:46:19 +01:00
|
|
|
FBTEST: bugs.core_0063
|
2022-01-18 11:45:40 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
import pytest
|
|
|
|
from firebird.qa import *
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
db = db_factory(charset='WIN1252')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
test_script = """
|
2021-04-26 20:07:00 +02:00
|
|
|
set bail on;
|
|
|
|
|
|
|
|
create domain d_descricao_30000_nn as varchar(30000) not null collate win_ptbr;
|
|
|
|
create table movimento( complemento d_descricao_30000_nn );
|
|
|
|
|
|
|
|
insert into movimento values ('');
|
|
|
|
insert into movimento values ('1234567890');
|
|
|
|
insert into movimento values ('');
|
|
|
|
|
|
|
|
create domain d_text_blob as blob sub_type text collate win_ptbr;
|
|
|
|
|
|
|
|
alter table movimento add complemento2 d_text_blob;
|
|
|
|
|
|
|
|
update movimento set complemento2 = complemento;
|
|
|
|
|
|
|
|
alter table movimento drop complemento, add complemento d_text_blob;
|
|
|
|
|
|
|
|
drop domain d_descricao_30000_nn;
|
|
|
|
|
|
|
|
update movimento set complemento = complemento2;
|
|
|
|
set list on;
|
|
|
|
select 'OK' as result from rdb$database;
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
act = isql_act('db', test_script)
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
expected_stdout = """
|
2021-04-26 20:07:00 +02:00
|
|
|
RESULT OK
|
2021-12-22 20:23:11 +01:00
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-18 11:45:40 +01:00
|
|
|
@pytest.mark.version('>=3')
|
|
|
|
def test_1(act: Action):
|
|
|
|
act.expected_stdout = expected_stdout
|
|
|
|
act.execute()
|
|
|
|
assert act.clean_stdout == act.clean_expected_stdout
|
2021-04-26 20:07:00 +02:00
|
|
|
|