6
0
mirror of https://github.com/FirebirdSQL/firebird-qa.git synced 2025-01-23 14:03:06 +01:00
firebird-qa/tests/bugs/core_2635_test.py

73 lines
1.5 KiB
Python
Raw Normal View History

2021-04-26 20:07:00 +02:00
#coding:utf-8
#
# id: bugs.core_2635
# title: Unique index with a lot of NULL keys can be corrupted at level 1
# decription:
# tracker_id: CORE-2635
# min_versions: ['2.1.4', '2.0.6', '2.5']
# versions: 2.5
# qmid: None
import pytest
from firebird.qa import db_factory, isql_act, Action
# version: 2.5
# resources: None
substitutions_1 = []
init_script_1 = """set term ^;
recreate table t (id int, sss varchar(255)) ^
create unique descending index t_id_desc on t (id) ^
create unique ascending index t_id_asc on t (id) ^
create unique descending index t_id_sss_desc on t (id, sss) ^
create unique ascending index t_id_sss_asc on t (id, sss) ^
commit ^
execute block as
declare n int = 0;
begin
while (n < 10000) do
begin
insert into t values (:n, :n);
n = n + 1;
end
n = 0;
while (n < 10000) do
begin
insert into t values (null, null);
n = n + 1;
end
end ^
commit ^
execute block as
declare n int = 5000;
begin
while (n > 0) do
begin
n = n - 1;
update t set id = null, sss = null where id = :n;
end
end ^
commit ^
"""
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
# test_script_1
#---
# db_conn.close()
# runProgram('gfix',['-validate','-full','-no_update','-user',user_name,'-password',user_password,dsn])
#---
#act_1 = python_act('db_1', test_script_1, substitutions=substitutions_1)
@pytest.mark.version('>=2.5')
@pytest.mark.xfail
2021-04-28 12:42:11 +02:00
def test_1(db_1):
2021-04-26 20:07:00 +02:00
pytest.fail("Test not IMPLEMENTED")