mirror of
https://github.com/FirebirdSQL/firebird-qa.git
synced 2025-02-02 02:40:42 +01:00
refactoring and other changes
This commit is contained in:
parent
ec75b37214
commit
62202b87c7
@ -23,7 +23,7 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
test_script_1 = """
|
||||
recreate table t1(id int);
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
|
@ -40,5 +40,5 @@ user_1 = user_factory('db_1', name='tmp$c0001', password='123')
|
||||
def test_1(act_1: Action, user_1: User):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0002
|
||||
# title: Incorrect value returned with execute statement calculation
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0002
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -44,17 +44,17 @@ test_script_1 = """
|
||||
commit;
|
||||
|
||||
select * from teste;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
RETORNO 57.75
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0010
|
||||
# title: Navigation vs IS NULL vs compound index
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0010
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -34,18 +34,18 @@ test_script_1 = """
|
||||
from t
|
||||
where f1 is null
|
||||
order by f1, f2;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
F1 <null>
|
||||
F2 2
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -105,7 +105,7 @@ test_script_1 = """
|
||||
set list on;
|
||||
set count on;
|
||||
|
||||
select
|
||||
select
|
||||
ulzid, datum, broj_racuna, dobid, dobavljac, napid, nacin_placanja, datumprispeca
|
||||
,cast(vrednost as numeric(10,2)) as vrednost
|
||||
,cast(rvrednost as numeric(10,2)) as rvrednost
|
||||
@ -119,19 +119,19 @@ test_script_1 = """
|
||||
select
|
||||
ulzid, artid, artikal, kolicina,
|
||||
cast(cena as numeric(12,2)) as cena,
|
||||
rabat,
|
||||
rabat,
|
||||
cast(ukupno as numeric(12,2)) as ukupno,
|
||||
vratio
|
||||
from ulaz_detalji;
|
||||
|
||||
select
|
||||
select
|
||||
ulzid, datum, broj_racuna, dobid, dobavljac, napid, nacin_placanja, datumprispeca
|
||||
,cast(vrednost as numeric(10,2)) as vrednost
|
||||
,cast(rvrednost as numeric(10,2)) as rvrednost
|
||||
,status
|
||||
from ulaz_master;
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -177,11 +177,11 @@ expected_stdout_1 = """
|
||||
STATUS 0
|
||||
|
||||
Records affected: 1
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,18 +2,18 @@
|
||||
#
|
||||
# id: bugs.core_0037
|
||||
# title: Navigation vs IS NULL vs compound index
|
||||
# decription:
|
||||
# decription:
|
||||
# 24.01.2019. Added separate code for running on FB 4.0+.
|
||||
# UDF usage is deprecated in FB 4+, see: ".../doc/README.incompatibilities.3to4.txt".
|
||||
# Functions div, frac, dow, sdow, getExactTimestampUTC and isLeapYear got safe replacement
|
||||
# Functions div, frac, dow, sdow, getExactTimestampUTC and isLeapYear got safe replacement
|
||||
# in UDR library "udf_compat", see it in folder: ../plugins/udr/
|
||||
# Checked on:
|
||||
# 2.5.9.27126: OK, 0.656s.
|
||||
# 3.0.5.33086: OK, 1.422s.
|
||||
# 4.0.0.1172: OK, 4.109s.
|
||||
# 4.0.0.1340: OK, 2.297s.
|
||||
# 4.0.0.1378: OK, 2.204s.
|
||||
#
|
||||
# 4.0.0.1378: OK, 2.204s.
|
||||
#
|
||||
# tracker_id: CORE-0037
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 4.0
|
||||
@ -82,20 +82,20 @@ test_script_1 = """
|
||||
|
||||
select x.*, y.*, UDR40_frac( mod(t2f1,100) / 100.000)
|
||||
from v1 x, v2 y
|
||||
where x.t1f1 = y.t2f2
|
||||
where x.t1f1 = y.t2f2
|
||||
and UDR40_frac( mod(t2f1,100) / 100.000) < 0.03
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
Records affected: 0
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=4.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0053
|
||||
# title: FIRST 1 vs ORDER DESC vs explicit plan (ODS11)
|
||||
# decription:
|
||||
# decription:
|
||||
# Test uses pre-created database which has several procedures for analyzing performance by with the help of MON$ tables.
|
||||
# Performance results are gathered in the table STAT_LOG, each odd run will save mon$ counters with "-" sign and next
|
||||
# (even) run will save them with "+" -- see SP_GATHER_STAT.
|
||||
@ -10,25 +10,25 @@
|
||||
# difference between them means performance expenses which we want to evaluate).
|
||||
# NOTE. Before each new measure we have to set generator G_GATHER_STAT to zero in order to make it produce proper values
|
||||
# starting with 1 (odd --> NEGATIVE sign for counters). This is done in SP_TRUNCATE_STAT.
|
||||
#
|
||||
#
|
||||
# :::::::::::::::::::::::::::::::::::::::: NB ::::::::::::::::::::::::::::::::::::
|
||||
# 18.08.2020. FB 4.x has incompatible behaviour with all previous versions since build 4.0.0.2131 (06-aug-2020):
|
||||
# statement 'alter sequence <seq_name> restart with 0' changes rdb$generators.rdb$initial_value to -1 thus next call
|
||||
# gen_id(<seq_name>,1) will return 0 (ZERO!) rather than 1.
|
||||
# gen_id(<seq_name>,1) will return 0 (ZERO!) rather than 1.
|
||||
# See also CORE-6084 and its fix: https://github.com/FirebirdSQL/firebird/commit/23dc0c6297825b2e9006f4d5a2c488702091033d
|
||||
# ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
||||
# This is considered as *expected* and is noted in doc/README.incompatibilities.3to4.txt
|
||||
#
|
||||
#
|
||||
# Because of this, it was decided to change code of SP_TRUNCATE_STAT: instead of 'alter sequence restart...' we do
|
||||
# reset like this: c = gen_id(g_gather_stat, -gen_id(g_gather_stat, 0));
|
||||
#
|
||||
#
|
||||
# Checked on:
|
||||
# 4.0.0.2164 SS: 2.511s.
|
||||
# 4.0.0.2164 CS: 2.533s.
|
||||
# 3.0.7.33356 SS: 1.495s.
|
||||
# 3.0.7.33356 CS: 2.865s.
|
||||
# 2.5.9.27150 SC: 0.730s.
|
||||
#
|
||||
#
|
||||
# tracker_id: CORE-0053
|
||||
# min_versions: ['2.5.1']
|
||||
# versions: 2.5.1
|
||||
@ -52,7 +52,7 @@ test_script_1 = """
|
||||
create or alter procedure gendata as begin end;
|
||||
recreate table test (F1 integer, F2 date);
|
||||
commit;
|
||||
|
||||
|
||||
set term ^;
|
||||
create or alter procedure GenData as
|
||||
declare i integer;
|
||||
@ -66,7 +66,7 @@ test_script_1 = """
|
||||
^
|
||||
set term ;^
|
||||
commit;
|
||||
|
||||
|
||||
execute procedure gendata;
|
||||
commit;
|
||||
|
||||
@ -77,7 +77,7 @@ test_script_1 = """
|
||||
commit;
|
||||
|
||||
-- #################### MEASURE-1 #################
|
||||
|
||||
|
||||
execute procedure sp_gather_stat; ------- catch statistics BEFORE measured statement(s)
|
||||
commit;
|
||||
|
||||
@ -91,13 +91,13 @@ test_script_1 = """
|
||||
|
||||
execute procedure sp_gather_stat; ------- catch statistics BEFORE measured statement(s)
|
||||
commit;
|
||||
|
||||
|
||||
-- #################### MEASURE-2 #################
|
||||
|
||||
|
||||
execute procedure sp_gather_stat; ------- catch statistics BEFORE measured statement(s)
|
||||
commit;
|
||||
|
||||
|
||||
set plan on;
|
||||
select first 1 f1
|
||||
from test t
|
||||
@ -112,15 +112,15 @@ test_script_1 = """
|
||||
-- #################### ANALYZING RESULTS #################
|
||||
|
||||
set list on;
|
||||
select
|
||||
select
|
||||
iif( idx_1 / idx_2 > max_ratio, 'PLAN (T ORDER <idx_name>) is slow! Ratio > ' || max_ratio,
|
||||
iif( idx_2 / idx_1 > max_ratio, 'PLAN (T ORDER <idx_name> INDEX(<idx_name>)) is slow! Ratio > '|| max_ratio,
|
||||
'PERFORMANCE IS THE SAME.'
|
||||
)
|
||||
) result
|
||||
from (
|
||||
select
|
||||
cast(min(idx_1) as double precision) as idx_1,
|
||||
select
|
||||
cast(min(idx_1) as double precision) as idx_1,
|
||||
cast( min(idx_2) as double precision) as idx_2,
|
||||
3.00 as max_ratio
|
||||
from (
|
||||
@ -130,7 +130,7 @@ test_script_1 = """
|
||||
);
|
||||
-- Difference of indexed reads that is reported by MON$ tables:
|
||||
-- on 2.5 = {5, 5}, on 3.0 = {5, 3} ==> ratio 3.00 should be always enough.
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -140,11 +140,11 @@ expected_stdout_1 = """
|
||||
PLAN (T ORDER TEST_F1_F2 INDEX (TEST_F1_F2))
|
||||
F1 17
|
||||
RESULT PERFORMANCE IS THE SAME.
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5.1')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0058
|
||||
# title: WHERE CURRENT OF doesn't work
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0058
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -22,7 +22,7 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
test_script_1 = """
|
||||
-- NB: changed expected value of SQLSTATE to actual. See comment in git:
|
||||
-- "Prevent stack trace (line/column info) from overriding the real error's SQLSTATE", 30-apr-2016
|
||||
-- "Prevent stack trace (line/column info) from overriding the real error's SQLSTATE", 30-apr-2016
|
||||
-- https://github.com/FirebirdSQL/firebird/commit/d1d8b36a07d4f11d98d2c8ec16fb8ec073da442b // FB 4.0
|
||||
-- https://github.com/FirebirdSQL/firebird/commit/849bfac745bc9158e9ef7990f5d52913f8b72f02 // FB 3.0
|
||||
-- https://github.com/FirebirdSQL/firebird/commit/b9d4142c4ed1fdf9b7c633edc7b2425f7b93eed0 // FB 2.5
|
||||
@ -36,13 +36,13 @@ test_script_1 = """
|
||||
commit;
|
||||
|
||||
set term ^;
|
||||
create procedure test_upd(d integer) as
|
||||
create procedure test_upd(d integer) as
|
||||
declare c cursor for (
|
||||
select a from test
|
||||
);
|
||||
begin
|
||||
open c;
|
||||
update test set a = a + :d
|
||||
update test set a = a + :d
|
||||
where current of c;
|
||||
close c;
|
||||
end
|
||||
@ -51,7 +51,7 @@ test_script_1 = """
|
||||
commit;
|
||||
|
||||
execute procedure test_upd (2);
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -59,11 +59,11 @@ expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 22000
|
||||
no current record for fetch operation
|
||||
-At procedure 'TEST_UPD'
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0059
|
||||
# title: Automatic not null in PK columns incomplete
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0059
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -27,7 +27,7 @@ test_script_1 = """
|
||||
insert into test(a,b) values(1,null);
|
||||
insert into test(a,b,c) values(1,1,null);
|
||||
insert into test default values;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -40,11 +40,11 @@ expected_stderr_1 = """
|
||||
validation error for column "TEST"."C", value "*** null ***"
|
||||
Statement failed, SQLSTATE = 23000
|
||||
validation error for column "TEST"."A", value "*** null ***"
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0063
|
||||
# title: Sequence of commands crash FB server
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0063
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -43,17 +43,17 @@ test_script_1 = """
|
||||
update movimento set complemento = complemento2;
|
||||
set list on;
|
||||
select 'OK' as result from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
RESULT OK
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0070
|
||||
# title: Expression index regression since 2.0a3
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0070
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -30,17 +30,17 @@ test_script_1 = """
|
||||
|
||||
set planonly;
|
||||
select * from t1 where upper(col1) = '1';
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
PLAN (T1 INDEX (IDX1))
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0076
|
||||
# title: Invalid ROW_COUNT variable value after DELETE
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0076
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -22,7 +22,7 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
test_script_1 = """
|
||||
create or alter procedure test_del as begin end;
|
||||
|
||||
|
||||
recreate table test (
|
||||
a integer not null,
|
||||
constraint test_pk primary key (a)
|
||||
@ -38,10 +38,10 @@ test_script_1 = """
|
||||
insert into test (a) values (9);
|
||||
insert into test (a) values (10);
|
||||
commit;
|
||||
|
||||
|
||||
set list on;
|
||||
select count(*) as cnt from test where a between 4 and 7;
|
||||
|
||||
|
||||
set term ^;
|
||||
create or alter procedure test_del (l integer, r integer) returns (rc integer) as
|
||||
begin
|
||||
@ -53,7 +53,7 @@ test_script_1 = """
|
||||
set term ;^
|
||||
execute procedure test_del (4, 7);
|
||||
select * from test;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -66,11 +66,11 @@ expected_stdout_1 = """
|
||||
A 8
|
||||
A 9
|
||||
A 10
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0085
|
||||
# title: Query with not in (select) returns wrong result
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0085
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -35,17 +35,17 @@ test_script_1 = """
|
||||
suspend;
|
||||
end^
|
||||
set term ;^
|
||||
|
||||
|
||||
recreate table frrates1 (
|
||||
frrates1 integer not null,
|
||||
packages integer,
|
||||
primary key(frrates1)
|
||||
);
|
||||
commit;
|
||||
|
||||
|
||||
create index idx_frrates1_packages on frrates1 (packages);
|
||||
commit;
|
||||
|
||||
|
||||
recreate table schedpkgs1 (
|
||||
schedpkgs1 integer not null,
|
||||
schedule integer,
|
||||
@ -53,33 +53,33 @@ test_script_1 = """
|
||||
primary key (schedpkgs1)
|
||||
);
|
||||
commit;
|
||||
|
||||
|
||||
create index idx_schedpkgs1_schedule on schedpkgs1 (schedule);
|
||||
commit;
|
||||
|
||||
|
||||
insert into frrates1 (frrates1, packages) values (11, 1);
|
||||
insert into frrates1 (frrates1, packages) values (12, 2);
|
||||
/* second record is essential (must exist in tst1) */
|
||||
commit;
|
||||
|
||||
|
||||
insert into schedpkgs1 (schedpkgs1, schedule, frrates1) values(21, 16651,11);
|
||||
insert into schedpkgs1 (schedpkgs1, schedule, frrates1) values(22, 16651,null);
|
||||
insert into schedpkgs1 (schedpkgs1, schedule, frrates1) values(22, 16651,null);
|
||||
/* important null value */
|
||||
commit;
|
||||
|
||||
|
||||
set count on;
|
||||
set list on;
|
||||
|
||||
|
||||
-- sub-query to be used later in sub-select,
|
||||
-- correctly uses frrates1 primary key index fr index (rdb$primary121),
|
||||
-- correctly returns (1)
|
||||
|
||||
|
||||
select fr.packages
|
||||
from schedpkgs1 sp
|
||||
join frrates1 fr on fr.frrates1=sp.frrates1
|
||||
where sp.schedule = 16651;
|
||||
|
||||
|
||||
-- 1. results from stored procedure (1, 2),
|
||||
-- filtered out by sub-select query (1),
|
||||
-- expected results -- (2),
|
||||
@ -88,7 +88,7 @@ test_script_1 = """
|
||||
-- problem -- fb1.5.3/2.0rc2 does not return anything,
|
||||
-- problem -- fb1.5.3/2.0rc2 uses wrong frrates1
|
||||
-- index fr index (idx_frrates1_packages)
|
||||
|
||||
|
||||
select packages
|
||||
from tst1
|
||||
where packages not in (select fr.packages
|
||||
@ -96,11 +96,11 @@ test_script_1 = """
|
||||
join frrates1 fr on
|
||||
fr.frrates1=sp.frrates1
|
||||
where sp.schedule = 16651);
|
||||
|
||||
|
||||
-- 2a. adding additional filter in sub-select query
|
||||
-- 'fr.packages>0' fb1.5.3 still uses questionable frrates1 index fr
|
||||
-- index (idx_frrates1_packages) but results are as expected (2)
|
||||
|
||||
|
||||
select packages
|
||||
from tst1
|
||||
where packages not in (select fr.packages
|
||||
@ -109,10 +109,10 @@ test_script_1 = """
|
||||
fr.frrates1=sp.frrates1
|
||||
where sp.schedule = 16651
|
||||
and fr.packages>0);
|
||||
|
||||
|
||||
-- 2b. replacing "not in" with "<> any" will return
|
||||
-- expected result and uses expected indices
|
||||
|
||||
|
||||
select t.packages
|
||||
from tst1 t
|
||||
where t.packages <> all (select fr.packages
|
||||
@ -120,12 +120,12 @@ test_script_1 = """
|
||||
join frrates1 fr on
|
||||
fr.frrates1=sp.frrates1
|
||||
where sp.schedule = 16651);
|
||||
|
||||
|
||||
-- 3. using table instead of stored procedure in main
|
||||
-- query, both ib5.6 and fb1.5.3 uses questionable frrates1
|
||||
-- index fr index (idx_frrates1_packages),
|
||||
-- and results are wrong, i.e. does not return (2)
|
||||
|
||||
|
||||
select f2.packages
|
||||
from frrates1 f2
|
||||
where f2.packages not in
|
||||
@ -136,8 +136,8 @@ test_script_1 = """
|
||||
fr.frrates1=sp.frrates1
|
||||
where sp.schedule = 16651
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
-- 4a. adding the same additional filter
|
||||
-- 'fr.packages>0' in sub-select query,
|
||||
-- incorrect results in ib5.6 (no results) (fr index
|
||||
@ -145,8 +145,8 @@ test_script_1 = """
|
||||
-- correct results in fb1.5.3 (returns 2)
|
||||
-- fb1.5.3 still uses questionable frrates1 index fr
|
||||
-- index (idx_frrates1_packages)
|
||||
|
||||
|
||||
|
||||
|
||||
select f2.packages
|
||||
from frrates1 f2
|
||||
where f2.packages not in
|
||||
@ -158,10 +158,10 @@ test_script_1 = """
|
||||
where sp.schedule = 16651
|
||||
and fr.packages > 0
|
||||
);
|
||||
|
||||
|
||||
-- 4b. and again, the same query with <> any instead
|
||||
-- not in works correctly
|
||||
|
||||
|
||||
select f2.packages
|
||||
from frrates1 f2
|
||||
where f2.packages <> all
|
||||
@ -172,7 +172,7 @@ test_script_1 = """
|
||||
fr.frrates1=sp.frrates1
|
||||
where sp.schedule = 16651
|
||||
);
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -191,11 +191,11 @@ expected_stdout_1 = """
|
||||
Records affected: 1
|
||||
PACKAGES 2
|
||||
Records affected: 1
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -41,5 +41,5 @@ expected_stdout_1 = """ID_YLK PH HPBH CD
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0088
|
||||
# title: Join on diffrent datatypes
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-88
|
||||
# min_versions: []
|
||||
# versions: 2.5
|
||||
@ -80,5 +80,5 @@ PLAN (TEST_B NATURAL)
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0089
|
||||
# title: Using where params in SUM return incorrect results
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0089
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -23,7 +23,7 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
test_script_1 = """
|
||||
-- DDL and data are based on text file (report) that is attached to ticket.
|
||||
-- No difference between FB 1.5.6 and 4.0.0 found.
|
||||
-- Added PK on table categorygroup and index "schemacategories(typecol)"
|
||||
-- Added PK on table categorygroup and index "schemacategories(typecol)"
|
||||
-- after analyzing text of queries - it seems to me that such indices
|
||||
-- does exist on real schema.
|
||||
|
||||
@ -37,7 +37,7 @@ test_script_1 = """
|
||||
);
|
||||
commit;
|
||||
create index sch_cat_typecol on schemacategories(typecol);
|
||||
|
||||
|
||||
recreate table categorygroup(
|
||||
id int primary key
|
||||
,parent int
|
||||
@ -47,7 +47,7 @@ test_script_1 = """
|
||||
,displaytype int
|
||||
);
|
||||
commit;
|
||||
|
||||
|
||||
insert into schemacategories values(11, 472, 10, 1, 10000175, 'TRUE');
|
||||
insert into schemacategories values(11, 463, 10, 1, 10000175, 'TRUE');
|
||||
insert into schemacategories values(11, 464, 10, 1, 10000175, 'TRUE');
|
||||
@ -90,8 +90,8 @@ test_script_1 = """
|
||||
insert into schemacategories values(11, 455, 1, 1, 10000090, 'TRUE');
|
||||
insert into schemacategories values(11, 456, 1, 1, 10000090, 'TRUE');
|
||||
commit;
|
||||
|
||||
|
||||
|
||||
|
||||
insert into categorygroup values(1,0,1,'TRUE',1,1);
|
||||
insert into categorygroup values(2,0,1,'TRUE',1,2);
|
||||
insert into categorygroup values(3,0,1,'TRUE',1,2);
|
||||
@ -103,13 +103,13 @@ test_script_1 = """
|
||||
insert into categorygroup values(9,0,1,'TRUE',1,2);
|
||||
insert into categorygroup values(10,0,1,'TRUE',1,2);
|
||||
commit;
|
||||
|
||||
|
||||
set list on;
|
||||
select sc.schemanr,sc.catnr,sc.typecol,cg.id
|
||||
from schemacategories sc, categorygroup cg
|
||||
select sc.schemanr,sc.catnr,sc.typecol,cg.id
|
||||
from schemacategories sc, categorygroup cg
|
||||
where sc.schemanr = 11 and sc.typecol = cg.id
|
||||
order by sc.catnr;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -318,11 +318,11 @@ expected_stdout_1 = """
|
||||
CATNR 509
|
||||
TYPECOL 5
|
||||
ID 5
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0099
|
||||
# title: Strange/Inconsistent query results
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-99
|
||||
# min_versions: []
|
||||
# versions: 2.1
|
||||
@ -49,5 +49,5 @@ F1 F2
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0101
|
||||
# title: JOIN the same table - problem with alias names
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0101
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -57,7 +57,7 @@ test_script_1 = """
|
||||
join (select id from test order by id) b on test.id = b.id
|
||||
) order by 1,2
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -101,11 +101,11 @@ expected_stdout_1 = """
|
||||
|
||||
A_ID 2
|
||||
B_ID 2
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0104
|
||||
# title: Dropping and recreating a table in the same txn disables PK
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-104
|
||||
# min_versions: []
|
||||
# versions: 2.5.3
|
||||
@ -46,5 +46,5 @@ violation of PRIMARY or UNIQUE KEY constraint "INTEG_4" on table "TEST"
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0115
|
||||
# title: bug with ALL keyword
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0115
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -41,7 +41,7 @@ test_script_1 = """
|
||||
select * from test where i > 0 and i > all(select i from test where i > 0);
|
||||
|
||||
set count off;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -57,11 +57,11 @@ expected_stdout_1 = """
|
||||
PLAN (TEST INDEX (TEST_PK))
|
||||
PLAN (TEST INDEX (TEST_PK))
|
||||
Records affected: 0
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# id: bugs.core_0116
|
||||
# title: CREATE TABLE - no blob for external
|
||||
# decription: CREATE TABLE - blob not allow for external tables
|
||||
#
|
||||
#
|
||||
# Dependencies:
|
||||
# CREATE DATABASE
|
||||
# CREATE TABLE
|
||||
@ -27,10 +27,10 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
test_script_1 = """
|
||||
-- Untill build 3.0.0.31721 STDERR was:
|
||||
-- -Data type BLOB is not supported ... field '<Missing arg #3 - possibly status vector overflow>'
|
||||
-- Since WI-T3.0.0.31733 STDERR became normal - contains name of field.
|
||||
-- Since WI-T3.0.0.31733 STDERR became normal - contains name of field.
|
||||
-- See correction in 'expected_stderr' secsion (23.03.2015).
|
||||
create table ext_log external file '$(DATABASE_LOCATION)z.dat' (F1 INT, F2 BLOB SUB_TYPE TEXT);
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -41,11 +41,11 @@ expected_stderr_1 = """
|
||||
-SQL error code = -607
|
||||
-Invalid command
|
||||
-Data type BLOB is not supported for EXTERNAL TABLES. Relation 'EXT_LOG', field 'F2'
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0117
|
||||
# title: Expression evaluation not supported on LEFT JOIN
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0117
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -30,20 +30,20 @@ test_script_1 = """
|
||||
date1 date,
|
||||
constraint pk_t1 primary key (id)
|
||||
);
|
||||
|
||||
|
||||
recreate table t2(
|
||||
id numeric( 18, 0) not null,
|
||||
id2 numeric( 18,0),
|
||||
date1 date,
|
||||
constraint pk_t2 primary key (id)
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
insert into t1(id, id2, date1) values (1, 1, '10/13/2003');
|
||||
insert into t1(id, id2, date1) values (2, 2, '09/13/2003');
|
||||
insert into t2(id, id2, date1) values (1, 1, '09/13/2003');
|
||||
commit;
|
||||
|
||||
|
||||
--executing the following query in isql returns the error
|
||||
--message "expression evaluation not supported" after
|
||||
--retrieving the
|
||||
@ -59,7 +59,7 @@ test_script_1 = """
|
||||
extract(month from t_2.date1)
|
||||
;
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -67,11 +67,11 @@ expected_stdout_1 = """
|
||||
ID2 1
|
||||
D1 2003-10-13
|
||||
D2 2003-09-13
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0119
|
||||
# title: numeric div in dialect 3 mangles data
|
||||
# decription:
|
||||
# decription:
|
||||
# NOTE. Results for FB 4.0 become differ from old one. Discussed with Alex, 30.10.2019.
|
||||
# Precise value of 70000 / 1.95583 is: 35790.431683735296 (checked on https://www.wolframalpha.com )
|
||||
# Section 'expected-stdout' was adjusted to be match for results that are issued in recent FB.
|
||||
@ -11,13 +11,13 @@
|
||||
# 4.0.0.1635 SS: 0.909s.
|
||||
# 3.0.5.33182 SS: 0.740s.
|
||||
# 2.5.9.27146 SC: 0.212s.
|
||||
#
|
||||
#
|
||||
# 21.06.2020, 4.0.0.2068 (see also: CORE-6337):
|
||||
# changed subtype from 0 to 1 for cast (-70000 as numeric (18,5)) / cast (1.95583 as numeric (18,5))
|
||||
# (after discuss with dimitr, letter 21.06.2020 08:43).
|
||||
#
|
||||
#
|
||||
# 25.06.2020, 4.0.0.2076: changed types in SQLDA from numeric to int128 // after discuss with Alex about CORE-6342.
|
||||
#
|
||||
#
|
||||
# tracker_id: CORE-0119
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 4.0
|
||||
@ -46,7 +46,7 @@ test_script_1 = """
|
||||
|
||||
select QUANTIZE(cast(-70000 as decfloat(34)) / cast (1.95583 as decfloat(34)), 9.9999999999) as div_result_2 from rdb$database;
|
||||
select (-4611686018427387904)/-0.5 div_result_3 from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -58,18 +58,18 @@ expected_stdout_1 = """
|
||||
DIV_RESULT_2 -35790.4316837353
|
||||
|
||||
01: sqltype: 32752 INT128 scale: -1 subtype: 0 len: 16
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 22003
|
||||
arithmetic exception, numeric overflow, or string truncation
|
||||
-numeric value is out of range
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=4.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0142
|
||||
# title: index breaks = ANY result
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0142
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -26,7 +26,7 @@ test_script_1 = """
|
||||
|
||||
recreate view v_test(k) as select 1 k from rdb$database;
|
||||
commit;
|
||||
|
||||
|
||||
recreate table customers (
|
||||
cnum integer,
|
||||
cname char(10),
|
||||
@ -34,8 +34,8 @@ test_script_1 = """
|
||||
rating integer,
|
||||
snum integer
|
||||
);
|
||||
|
||||
recreate view v_test(cnum, cname, city, rating, snum) as
|
||||
|
||||
recreate view v_test(cnum, cname, city, rating, snum) as
|
||||
select *
|
||||
from customers c
|
||||
where not c.rating = any
|
||||
@ -43,7 +43,7 @@ test_script_1 = """
|
||||
from customers r
|
||||
where r.city = 'san jose');
|
||||
commit;
|
||||
|
||||
|
||||
insert into customers values (2001, 'hoffman', 'london', 100, 1001);
|
||||
insert into customers values (2002, 'giovanni', 'rome', 200, 1003);
|
||||
insert into customers values (2003, 'lui', 'san jose', 200, 1002);
|
||||
@ -52,51 +52,51 @@ test_script_1 = """
|
||||
insert into customers values (2008, 'cisneros', 'san jose', 300, 1007);
|
||||
insert into customers values (2007, 'pereira', 'rome', 100, 1004);
|
||||
commit;
|
||||
|
||||
|
||||
set list on;
|
||||
|
||||
select * from v_test order by cnum;
|
||||
commit;
|
||||
|
||||
|
||||
create index byrating on customers (rating);
|
||||
commit;
|
||||
|
||||
|
||||
select * from v_test order by cnum;
|
||||
commit;
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
CNUM 2001
|
||||
CNAME hoffman
|
||||
CITY london
|
||||
CNAME hoffman
|
||||
CITY london
|
||||
RATING 100
|
||||
SNUM 1001
|
||||
|
||||
CNUM 2007
|
||||
CNAME pereira
|
||||
CITY rome
|
||||
CNAME pereira
|
||||
CITY rome
|
||||
RATING 100
|
||||
SNUM 1004
|
||||
|
||||
CNUM 2001
|
||||
CNAME hoffman
|
||||
CITY london
|
||||
CNAME hoffman
|
||||
CITY london
|
||||
RATING 100
|
||||
SNUM 1001
|
||||
|
||||
CNUM 2007
|
||||
CNAME pereira
|
||||
CITY rome
|
||||
CNAME pereira
|
||||
CITY rome
|
||||
RATING 100
|
||||
SNUM 1004
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0143
|
||||
# title: Using where params in SUM return incorrect results
|
||||
# decription:
|
||||
# decription:
|
||||
# 30.10.2019. NB: new datatype in FB 4.0 was introduces: numeric(38,0).
|
||||
# It can lead to additional ident of values when we show them in form "SET LIST ON",
|
||||
# so we have to ignore all internal spaces - see added 'substitution' section below.
|
||||
@ -10,7 +10,7 @@
|
||||
# 4.0.0.1635 SS: 1.061s.
|
||||
# 3.0.5.33182 SS: 0.754s.
|
||||
# 2.5.9.27146 SC: 0.190s.
|
||||
#
|
||||
#
|
||||
# tracker_id: CORE-0143
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -37,20 +37,20 @@ test_script_1 = """
|
||||
constraint pk_yeardata primary key (id)
|
||||
);
|
||||
commit;
|
||||
|
||||
|
||||
insert into yeardata(id, ayear, avalue) values (1, 2005, 3.40);
|
||||
insert into yeardata(id, ayear, avalue) values (2, 2005, 6.60);
|
||||
insert into yeardata(id, ayear, avalue) values (3, 2004, 5.20);
|
||||
insert into yeardata(id, ayear, avalue) values (4, 2004, 5.80);
|
||||
insert into yeardata(id, ayear, avalue) values (5, 2004, 5.00);
|
||||
commit;
|
||||
|
||||
|
||||
set list on;
|
||||
select
|
||||
sum(case when ayear = 2004 then avalue else null end) as avalue_2004_1
|
||||
,sum(case when ayear = 2005 then avalue else null end) as avalue_2005_1
|
||||
from yeardata;
|
||||
|
||||
|
||||
set term ^;
|
||||
execute block returns( avalue_2004_2 numeric( 18, 2), avalue_2005_2 numeric( 18, 2)) as
|
||||
begin
|
||||
@ -66,7 +66,7 @@ test_script_1 = """
|
||||
end
|
||||
^
|
||||
set term ;^
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -75,11 +75,11 @@ expected_stdout_1 = """
|
||||
AVALUE_2005_1 10.00
|
||||
AVALUE_2004_2 16.00
|
||||
AVALUE_2005_2 10.00
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0148
|
||||
# title: SELECT '1' UNION SELECT '12'
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0148
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -39,18 +39,18 @@ test_script_1 = """
|
||||
select '12' || b.y
|
||||
from test_b b
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
RESULT 12888888
|
||||
RESULT 19999999
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0149
|
||||
# title: Left joining views with null fails
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-0149
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5
|
||||
@ -22,63 +22,63 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
test_script_1 = """
|
||||
set list on;
|
||||
|
||||
|
||||
-- Initial comment by johnsparrowuk, 19/Mar/04 12:00 AM:
|
||||
recreate view currentpeople(k) as select 1 as k from rdb$database;
|
||||
recreate view finishedpeople(k) as select 1 as k from rdb$database;
|
||||
recreate view finishedpeople(k) as select 1 as k from rdb$database;
|
||||
commit;
|
||||
|
||||
|
||||
recreate table mytable (
|
||||
person varchar(20) not null,
|
||||
status int not null, primary key (person,status)
|
||||
);
|
||||
|
||||
recreate view currentpeople(person) as
|
||||
|
||||
recreate view currentpeople(person) as
|
||||
select distinct person as person
|
||||
from mytable where status = 1;
|
||||
|
||||
recreate view finishedpeople(person) as
|
||||
|
||||
recreate view finishedpeople(person) as
|
||||
select distinct person as person
|
||||
from mytable where status = 2;
|
||||
|
||||
|
||||
insert into mytable values ('john',1);
|
||||
insert into mytable values ('john',2);
|
||||
insert into mytable values ('fred',1);
|
||||
commit;
|
||||
|
||||
|
||||
-- This works fine: fred-null, john-john
|
||||
select *
|
||||
from currentpeople c
|
||||
select *
|
||||
from currentpeople c
|
||||
left join finishedpeople f on c.person = f.person
|
||||
order by c.person, f.person
|
||||
;
|
||||
|
||||
|
||||
-- This is as expected too: john-john
|
||||
select *
|
||||
from currentpeople c
|
||||
from currentpeople c
|
||||
left join finishedpeople f
|
||||
on c.person = f.person where f.person = 'john'
|
||||
order by c.person, f.person
|
||||
;
|
||||
|
||||
|
||||
-- WHATS HAPPENING HERE????? fred-null, JOHN-NULL where does the john-null come from???
|
||||
select *
|
||||
from currentpeople c
|
||||
select *
|
||||
from currentpeople c
|
||||
left join finishedpeople f on c.person = f.person
|
||||
where f.person is null
|
||||
order by c.person, f.person
|
||||
;
|
||||
commit;
|
||||
|
||||
|
||||
--#################################################
|
||||
|
||||
|
||||
-- Alice F. Bird added a comment - 14/Jun/06 09:32 AM
|
||||
recreate table test (
|
||||
id int not null,
|
||||
name varchar(15),
|
||||
pid integer
|
||||
);
|
||||
|
||||
|
||||
insert into test(id, name, pid) values(1, 'Car', null);
|
||||
insert into test(id, name, pid) values(2, 'Engine', 1);
|
||||
insert into test(id, name, pid) values(3, 'Body', 1);
|
||||
@ -87,7 +87,7 @@ test_script_1 = """
|
||||
insert into test(id, name, pid) values(6, 'Door Left', 3);
|
||||
insert into test(id, name, pid) values(7, 'Door Right',3);
|
||||
commit;
|
||||
|
||||
|
||||
-- This query issued WRONG result on 1.5.6
|
||||
-- (because first data source - 'TEST' - has not alias)
|
||||
select *
|
||||
@ -96,7 +96,7 @@ test_script_1 = """
|
||||
on test.pid=t2.id
|
||||
order by test.id, t2.id
|
||||
;
|
||||
|
||||
|
||||
-- This works fine:
|
||||
select *
|
||||
from test t1
|
||||
@ -104,133 +104,133 @@ test_script_1 = """
|
||||
on t1.pid=t2.id
|
||||
order by t1.id, t2.id
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
PERSON fred
|
||||
PERSON <null>
|
||||
|
||||
|
||||
PERSON john
|
||||
PERSON john
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PERSON john
|
||||
PERSON john
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
PERSON fred
|
||||
PERSON <null>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ID 1
|
||||
NAME Car
|
||||
PID <null>
|
||||
ID <null>
|
||||
NAME <null>
|
||||
PID <null>
|
||||
|
||||
|
||||
ID 2
|
||||
NAME Engine
|
||||
PID 1
|
||||
ID 1
|
||||
NAME Car
|
||||
PID <null>
|
||||
|
||||
|
||||
ID 3
|
||||
NAME Body
|
||||
PID 1
|
||||
ID 1
|
||||
NAME Car
|
||||
PID <null>
|
||||
|
||||
|
||||
ID 4
|
||||
NAME Oil Filter
|
||||
PID 2
|
||||
ID 2
|
||||
NAME Engine
|
||||
PID 1
|
||||
|
||||
|
||||
ID 5
|
||||
NAME Air Filter
|
||||
PID 2
|
||||
ID 2
|
||||
NAME Engine
|
||||
PID 1
|
||||
|
||||
|
||||
ID 6
|
||||
NAME Door Left
|
||||
PID 3
|
||||
ID 3
|
||||
NAME Body
|
||||
PID 1
|
||||
|
||||
|
||||
ID 7
|
||||
NAME Door Right
|
||||
PID 3
|
||||
ID 3
|
||||
NAME Body
|
||||
PID 1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ID 1
|
||||
NAME Car
|
||||
PID <null>
|
||||
ID <null>
|
||||
NAME <null>
|
||||
PID <null>
|
||||
|
||||
|
||||
ID 2
|
||||
NAME Engine
|
||||
PID 1
|
||||
ID 1
|
||||
NAME Car
|
||||
PID <null>
|
||||
|
||||
|
||||
ID 3
|
||||
NAME Body
|
||||
PID 1
|
||||
ID 1
|
||||
NAME Car
|
||||
PID <null>
|
||||
|
||||
|
||||
ID 4
|
||||
NAME Oil Filter
|
||||
PID 2
|
||||
ID 2
|
||||
NAME Engine
|
||||
PID 1
|
||||
|
||||
|
||||
ID 5
|
||||
NAME Air Filter
|
||||
PID 2
|
||||
ID 2
|
||||
NAME Engine
|
||||
PID 1
|
||||
|
||||
|
||||
ID 6
|
||||
NAME Door Left
|
||||
PID 3
|
||||
ID 3
|
||||
NAME Body
|
||||
PID 1
|
||||
|
||||
|
||||
ID 7
|
||||
NAME Door Right
|
||||
PID 3
|
||||
ID 3
|
||||
NAME Body
|
||||
PID 1
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -24,7 +24,7 @@ test_script_1 = """
|
||||
set sqlda_display;
|
||||
set list on;
|
||||
select current_timestamp - current_timestamp dts_diff from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -32,11 +32,11 @@ expected_stdout_1 = """
|
||||
01: sqltype: 580 INT64 scale: -9 subtype: 1 len: 8
|
||||
: name: SUBTRACT alias: DTS_DIFF
|
||||
DTS_DIFF 0.000000000
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -65,7 +65,7 @@ test_script_1 = """
|
||||
where i.id = j.id
|
||||
and j.y = (select max(x.y) from v_test2 x)
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -74,11 +74,11 @@ expected_stdout_1 = """
|
||||
X 456
|
||||
ID_2 2
|
||||
Y 456
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -62,7 +62,7 @@ test_script_1 = """
|
||||
|
||||
select c.*
|
||||
from company c order by c.id;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -126,11 +126,11 @@ expected_stdout_1 = """
|
||||
ID 106
|
||||
CONTACT_ID 3
|
||||
COMPANY_NAME Firebird Foundation
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -47,23 +47,23 @@ test_script_1 = """
|
||||
rollback;
|
||||
set list on;
|
||||
select count(*) from test;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
COUNT 6
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 22000
|
||||
no current record for fetch operation
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -120,7 +120,7 @@ test_script_1 = """
|
||||
select * from test_a;
|
||||
select * from test_b;
|
||||
select * from v_ctx_data;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -154,11 +154,11 @@ expected_stdout_1 = """
|
||||
|
||||
|
||||
Records affected: 7
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -49,6 +49,6 @@ def test_1(act_1: Action, user_1: User):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -109,7 +109,7 @@ test_script_1 = """
|
||||
|
||||
update tbl_bugcheck291b set Data=1 where Flag = 16;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
|
@ -67,7 +67,7 @@ test_script_1 = """
|
||||
order by t.d1
|
||||
;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -107,11 +107,11 @@ expected_stdout_1 = """
|
||||
D2 97
|
||||
V1 xx
|
||||
DATA three
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -47,5 +47,5 @@ expected_stdout_1 = """ COUNT
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -83,5 +83,5 @@ BES
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -111,7 +111,7 @@ test_script_1 = """
|
||||
select * from v_test4 v4; -- 15
|
||||
|
||||
select * from v_test4 v4 PLAN (V4 V_TEST3 T INDEX (TEST_X_Y)); -- 16
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -150,11 +150,11 @@ expected_stdout_1 = """
|
||||
|
||||
PLAN (V4 V_TEST3 T INDEX (TEST_X_Y))
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -70,7 +70,7 @@ test_script_1 = """
|
||||
update v_test set col='x' where id=13;
|
||||
|
||||
select * from test;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -117,7 +117,7 @@ expected_stdout_1 = """
|
||||
ID 14
|
||||
COL E
|
||||
Records affected: 4
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 23000
|
||||
validation error for column "TEST"."COL", value "Z"
|
||||
@ -125,13 +125,13 @@ expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 23000
|
||||
validation error for column "TEST"."COL", value "X"
|
||||
-At trigger 'V_TEST_BIU' line: 8, col: 5
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -29,18 +29,18 @@ test_script_1 = """
|
||||
from rdb$database r
|
||||
group by r.rdb$relation_id
|
||||
having count(*) not in (select r2.rdb$relation_id from rdb$database r2);
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
RDB$RELATION_ID 134
|
||||
COUNT 1
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.0.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -27,7 +27,7 @@ init_script_1 = """
|
||||
-- about possible regression. After multiple runs it was found that ratio for
|
||||
-- 2.1 vs 2.2 is about 1.05 ... 1.10. Constant <X> (threshold) was selected
|
||||
-- to be enough for not to be "violated".
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -180,7 +180,7 @@ test_script_1 = """
|
||||
|
||||
end
|
||||
^ set term ;^
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -190,11 +190,11 @@ expected_stdout_1 = """
|
||||
RATIO_FOR_1E3 Acceptable, <= 3.0000
|
||||
RATIO_FOR_1E4 Acceptable, <= 3.0000
|
||||
RATIO_FOR_1E5 Acceptable, <= 3.0000
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -64,7 +64,7 @@ def test_1(act_1: Action):
|
||||
begin
|
||||
insert into log (PK) values (new.pk);
|
||||
end
|
||||
"""
|
||||
"""
|
||||
while i <= 4000:
|
||||
c.execute(cmd % i)
|
||||
i += 1
|
||||
|
@ -41,7 +41,7 @@ test_script_1 = """
|
||||
-- Here values must be sorted as TEXT:
|
||||
select * from test1 order by x;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -53,7 +53,7 @@ expected_stdout_1 = """
|
||||
X 100000000
|
||||
X 2000000000
|
||||
X 50000000
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 42000
|
||||
unsuccessful metadata update
|
||||
@ -64,13 +64,13 @@ expected_stderr_1 = """
|
||||
unsuccessful metadata update
|
||||
-ALTER TABLE TEST1 failed
|
||||
-New size specified for column X must be at least 11 characters.
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -46,6 +46,6 @@ def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -56,5 +56,5 @@ text
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -122,7 +122,7 @@ test_script_1 = """
|
||||
select count(*) from test;
|
||||
select * from groups;
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -132,11 +132,11 @@ expected_stdout_1 = """
|
||||
GR_NAME Group1
|
||||
GR_ID 2
|
||||
GR_NAME Group2
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -153,7 +153,7 @@ expected_stderr_1 = """
|
||||
|
||||
Statement failed, SQLSTATE = 28000
|
||||
unsuccessful metadata update
|
||||
-DROP TABLE V_TEST failed
|
||||
-DROP VIEW V_TEST failed
|
||||
-no permission for DROP access to VIEW V_TEST
|
||||
|
||||
Statement failed, SQLSTATE = 28000
|
||||
@ -204,7 +204,7 @@ expected_stderr_1 = """
|
||||
def test_1(act_1: Action, user_1: User):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
# version: 4.0
|
||||
# resources: None
|
||||
@ -408,5 +408,4 @@ unsuccessful metadata update
|
||||
def test_2(act_2: Action, user_2: User):
|
||||
act_2.expected_stderr = expected_stderr_2
|
||||
act_2.execute()
|
||||
assert act_2.clean_expected_stderr == act_2.clean_stderr
|
||||
|
||||
assert act_2.clean_stderr == act_2.clean_expected_stderr
|
||||
|
@ -29,7 +29,7 @@ init_script_1 = """
|
||||
commit;
|
||||
insert into test select 1 from rdb$types rows 10;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -562,25 +562,25 @@ test_script_1 = """
|
||||
select first 5 * from test ------------------- last allowed in 3.0
|
||||
union all select first 5 * from test;
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
ID 1
|
||||
Records affected: 1
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 54001
|
||||
Dynamic SQL Error
|
||||
-Too many Contexts of Relation/Procedure/Views. Maximum allowed is 256
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -35,5 +35,5 @@ expected_stdout_1 = """ADD
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -135,7 +135,7 @@ expected_stdout_1 = """
|
||||
Client SQL dialect is set to: 3. No database has been connected.
|
||||
|
||||
SET SQL DIALECT 1;
|
||||
"""
|
||||
"""
|
||||
|
||||
expected_stderr_1 = """
|
||||
Use CONNECT or CREATE DATABASE to specify a database
|
||||
@ -160,12 +160,12 @@ def test_1(act_1: Action):
|
||||
SHOW DATABASE;
|
||||
SHOW SQL DIALECT;
|
||||
SET SQL DIALECT 1;
|
||||
"""
|
||||
"""
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute(do_not_connect=True)
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
act_1.db.create()
|
||||
|
||||
|
||||
|
@ -454,7 +454,7 @@ test_script_1 = """
|
||||
=
|
||||
vv.vrsta)
|
||||
FROM vv;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
|
@ -24,7 +24,7 @@ init_script_1 = """
|
||||
insert into t values(2);
|
||||
insert into t values(null);
|
||||
insert into t values(null);
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -61,7 +61,7 @@ test_script_1 = """
|
||||
|
||||
order by 1 nulls first
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -100,11 +100,11 @@ expected_stdout_1 = """
|
||||
22
|
||||
222
|
||||
2222
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.0.7')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -143,5 +143,5 @@ zo
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -524,18 +524,18 @@ test_script_1 = """
|
||||
;
|
||||
|
||||
select 'Query from issue 2002-jul-12 passed OK' as msg from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
MSG Query from issue 2000-oct-18 passed OK
|
||||
MSG Query from issue 2002-jul-12 passed OK
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -37,17 +37,17 @@ test_script_1 = """
|
||||
)
|
||||
as curr_gen
|
||||
from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
CURR_GEN 3
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -76,7 +76,7 @@ test_script_1 = """
|
||||
on getChilds.code = test.code
|
||||
order by name desc
|
||||
;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -130,11 +130,11 @@ expected_stdout_1 = """
|
||||
CODE 1
|
||||
NAME AA
|
||||
PARENT 0
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5.6')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -143,19 +143,19 @@ test_script_1 = """
|
||||
SET COUNT ON;
|
||||
|
||||
select * from v_check;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
Records affected: 0
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0,<4.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
# version: 4.0
|
||||
# resources: None
|
||||
@ -278,17 +278,17 @@ test_script_2 = """
|
||||
SET COUNT ON;
|
||||
|
||||
select * from v_check;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_2 = isql_act('db_2', test_script_2, substitutions=substitutions_2)
|
||||
|
||||
expected_stdout_2 = """
|
||||
Records affected: 0
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=4.0')
|
||||
def test_2(act_2: Action):
|
||||
act_2.expected_stdout = expected_stdout_2
|
||||
act_2.execute()
|
||||
assert act_2.clean_expected_stdout == act_2.clean_stdout
|
||||
assert act_2.clean_stdout == act_2.clean_expected_stdout
|
||||
|
||||
|
@ -38,5 +38,5 @@ unsuccessful metadata update
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -356,7 +356,7 @@ test_script_1 = """
|
||||
from rdb$database
|
||||
where coalesce(3 + cast(? as bigint), null) = 0;
|
||||
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -1032,7 +1032,7 @@ arithmetic exception, numeric overflow, or string truncation
|
||||
Statement failed, SQLSTATE = 07002
|
||||
Dynamic SQL Error
|
||||
-SQLDA error
|
||||
-Wrong number of parameters (expected 3, got 0)
|
||||
-No SQLDA for input values provided
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0,<4')
|
||||
@ -1040,8 +1040,8 @@ def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
act_2 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -1076,12 +1076,13 @@ Dynamic SQL Error
|
||||
-SQLDA error
|
||||
-No SQLDA for input values provided
|
||||
"""
|
||||
#-Wrong number of parameters (expected 3, got 0)
|
||||
|
||||
@pytest.mark.version('>=4.0')
|
||||
def test_2(act_2: Action):
|
||||
act_2.expected_stdout = expected_stdout_1
|
||||
act_2.expected_stderr = expected_stderr_2
|
||||
act_2.execute()
|
||||
assert act_2.clean_expected_stderr == act_2.clean_stderr
|
||||
assert act_2.clean_expected_stdout == act_2.clean_stdout
|
||||
assert act_2.clean_stderr == act_2.clean_expected_stderr
|
||||
assert act_2.clean_stdout == act_2.clean_expected_stdout
|
||||
|
||||
|
@ -27,7 +27,7 @@ test_script_1 = """
|
||||
from rdb$relations r left join rdb$relation_constraints rc
|
||||
on r.rdb$relation_name = rc.rdb$relation_name
|
||||
order by rdb$relation_name;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -37,11 +37,11 @@ expected_stderr_1 = """
|
||||
-SQL error code = -204
|
||||
-Ambiguous field name between a field and a field in the select list with name
|
||||
-RDB$RELATION_NAME
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -56,23 +56,23 @@ test_script_1 = """
|
||||
connect '$(DSN)' user sysdba password 'masterkey';
|
||||
drop user tmp$c0521;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
WHOAMI TMP$C0521
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 28000
|
||||
no permission for EXECUTE access to PROCEDURE PeRm
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -67,7 +67,7 @@ test_script_1 = """
|
||||
select name "test-3"
|
||||
from test a
|
||||
where cast(a.name as char(31)) starting with coalesce(null, '');
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -161,11 +161,11 @@ expected_stdout_1 = """
|
||||
test-3 RDB$TRIGGER_34
|
||||
test-3 RDB$TRIGGER_35
|
||||
test-3 RDB$TRIGGER_36
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -45,7 +45,7 @@ test_script_1 = """
|
||||
select * from test1;
|
||||
update test1 set i=2 where i = 6;
|
||||
select * from test1;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -54,18 +54,18 @@ expected_stdout_1 = """
|
||||
Records affected: 0
|
||||
Records affected: 0
|
||||
Records affected: 0
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 23000
|
||||
Operation violates CHECK constraint TEST1_CHK on view or table TEST1
|
||||
-At trigger 'CHECK_3'
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -87,7 +87,7 @@ test_script_1 = """
|
||||
-- #############################################################################################
|
||||
delete from mon$attachments where mon$attachment_id != current_connection;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -107,7 +107,7 @@ expected_stderr_1 = """
|
||||
Statement : select data from "t t"
|
||||
Data source : Firebird::localhost:C:\\FBTESTING\\QA\\FBT-REPO\\TMP\\E30.FDB
|
||||
-At block line: 3, col: 7
|
||||
"""
|
||||
"""
|
||||
|
||||
for_cvc_role = role_factory('db_1', name='"FOR CVC"')
|
||||
for_role = role_factory('db_1', name='"FOR"')
|
||||
@ -118,6 +118,6 @@ def test_1(act_1: Action, cvc_user: User, for_role: Role, for_cvc_role: Role):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -40,7 +40,7 @@ test_script_1 = """
|
||||
group by a.id
|
||||
order by a.id;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -50,11 +50,11 @@ expected_stdout_1 = """
|
||||
SUM 2
|
||||
ID 2
|
||||
SUM 4
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.1.7')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -30,7 +30,7 @@ test_script_1 = """
|
||||
set list on;
|
||||
select skip 0 id from a order by id;
|
||||
select skip 2 id from a order by id;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -39,11 +39,11 @@ expected_stdout_1 = """
|
||||
ID 2
|
||||
ID 3
|
||||
ID 3
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.1.7')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -83,7 +83,7 @@ test_script_1 = """
|
||||
commit;
|
||||
select * from vvp1;
|
||||
select * from vvp1 order by f_entrada;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -116,11 +116,11 @@ expected_stdout_1 = """
|
||||
2 2001-07-13 2 2
|
||||
4 2001-08-10 <null> <null>
|
||||
3 2001-08-12 <null> <null>
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.1.7')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -41,17 +41,17 @@ test_script_1 = """
|
||||
-- NB: PLAN up to 2.5 contains TWO parenthesis:
|
||||
-- PLAN SORT ((CUSTOMERS ORDER CUSTOMERS_COUNTRY))
|
||||
-- ^^ ^^
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
PLAN SORT CUSTOMERS ORDER CUSTOMERS_COUNTRY
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.1.7')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -90,7 +90,7 @@ test_script_1 = """
|
||||
commit;
|
||||
|
||||
select c from test group by c;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -113,11 +113,11 @@ expected_stdout_1 = """
|
||||
|
||||
C <null>
|
||||
C 15:00:29.1910
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -29,7 +29,7 @@ test_script_1 = """select cast(lower(f1) as varchar(20)) lf1, cast(upper(f1) as
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """Database: localhost:C:btest mpugs.core_655.fdb, User: SYSDBA
|
||||
expected_stdout_1 = """Database: localhost:C:\\fbtest\\tmp\\bugs.core_655.fdb, User: SYSDBA
|
||||
SQL>
|
||||
LF1 UF1 TF1 CF1 SF1
|
||||
==================== ==================== ==================== ==================== ====================
|
||||
@ -41,5 +41,5 @@ SQL>"""
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -74,7 +74,7 @@ init_script_1 = """
|
||||
^
|
||||
set term ;^
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
|
@ -300,5 +300,5 @@ true true 'a' SIMILAR TO '[^[:DIGIT:]]'
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -72,5 +72,5 @@ SQL> SQL> SQL> SQL>
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -45,7 +45,7 @@ init_script_1 = """
|
||||
collate name_coll
|
||||
;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(charset='UTF8', sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -89,7 +89,7 @@ act_1 = python_act('db_1', substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
ALTER DOMAIN DM_TEST ADD CONSTRAINT
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
|
@ -148,7 +148,7 @@ test_script_1 = """
|
||||
drop user tmp$c0805_junior;
|
||||
drop role tmp$r4junior;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -162,11 +162,11 @@ expected_stdout_1 = """
|
||||
WHAT_IS_MY_ROLE TMP$R4JUNIOR
|
||||
ID 1
|
||||
X 100
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -42,5 +42,5 @@ true true 'EEAAUOEEEAAUO' = 'ÉÈÀÂÛÔÊéèàâûô' COLLATE UNICODE_C
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -60,5 +60,5 @@ expected_stdout_1 = """
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -25,7 +25,7 @@ init_script_1 = """
|
||||
|
||||
insert into t (f1,f2) values ('0123456789','abcdefghij');
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -49,7 +49,7 @@ test_script_1 = """
|
||||
from rdb$fields a
|
||||
join rdb$relation_fields b on a.rdb$field_name = b.rdb$field_source
|
||||
where b.rdb$field_name = upper('CF');
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -67,19 +67,19 @@ expected_stdout_1 = """
|
||||
|
||||
FIELD_NAME CF
|
||||
COMPUTED_SOURCE_AFTER_ALTERING (f1 || ' - ' || f2)
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 42000
|
||||
unsuccessful metadata update
|
||||
-ALTER TABLE T failed
|
||||
-Cannot add or remove COMPUTED from column CF
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -37,5 +37,5 @@ unsuccessful metadata update
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -37,5 +37,5 @@ unsuccessful metadata update
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -24,17 +24,17 @@ db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
test_script_1 = """
|
||||
set list on;
|
||||
select substring(current_user from 4) from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
SUBSTRING DBA
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -39,5 +39,5 @@ Dynamic SQL Error
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -52,7 +52,7 @@ test_script_1 = """
|
||||
|
||||
drop user tmp$c0856;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -69,11 +69,11 @@ expected_stdout_1 = """
|
||||
ASCII_VAL <null>
|
||||
ASCII_VAL 9
|
||||
ASCII_VAL 10
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -51,7 +51,7 @@ set bail on;
|
||||
commit;
|
||||
create view v_test as
|
||||
select octet_length(t.f01) - octet_length(replace(t.f01, 'ß', '')) as "octet_length diff:" from test t;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(charset='WIN1252', sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -85,7 +85,7 @@ expected_stdout_1 = """
|
||||
ci_ai result: 1
|
||||
between result: 1
|
||||
octet_length diff: 1
|
||||
"""
|
||||
"""
|
||||
|
||||
test_script_1 = """
|
||||
set list on;
|
||||
@ -107,6 +107,6 @@ act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ test_script_1 = """
|
||||
|
||||
drop external function sright;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -73,13 +73,13 @@ expected_stdout_1 = """
|
||||
RDB$LEGACY_FLAG 1
|
||||
|
||||
SRIGHT_RESULT ty
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0,<4.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
# version: 4.0
|
||||
# resources: None
|
||||
@ -96,7 +96,7 @@ test_script_2 = """
|
||||
-- It is STRONGLY RECOMMENDED to add this ticket
|
||||
-- in the 'excluded-list file:
|
||||
-- %FBT_REPO% ests\\qa4x-exclude-list.txt
|
||||
"""
|
||||
"""
|
||||
|
||||
act_2 = isql_act('db_2', test_script_2, substitutions=substitutions_2)
|
||||
|
||||
|
@ -63,10 +63,14 @@ act_1 = python_act('db_1', substitutions=substitutions_1)
|
||||
def test_1(act_1: Action):
|
||||
with act_1.db.connect() as con:
|
||||
c = con.cursor()
|
||||
c.prepare('select * from t order by b')
|
||||
# Use with to free the Statement immediately
|
||||
with c.prepare('select * from t order by b'):
|
||||
pass
|
||||
with pytest.raises(DatabaseError, match='.*Datatype ARRAY is not supported for sorting operation.*'):
|
||||
c.prepare('select * from t order by a')
|
||||
c.prepare('select b, count(*) from t group by b')
|
||||
# Use with to free the Statement immediately
|
||||
with c.prepare('select b, count(*) from t group by b'):
|
||||
pass
|
||||
with pytest.raises(DatabaseError, match='.*Datatype ARRAY is not supported for sorting operation.*'):
|
||||
c.prepare('select a, count(*) from t group by a')
|
||||
# Passed.
|
||||
|
@ -23,7 +23,7 @@ init_script_1 = """
|
||||
);
|
||||
insert into test (id, col) values (1, 'data');
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -34,7 +34,7 @@ test_script_1 = """
|
||||
commit;
|
||||
|
||||
update test set col = null where id = 1;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -43,11 +43,11 @@ expected_stderr_1 = """
|
||||
UPDATE operation is not allowed for system table RDB$RELATION_FIELDS
|
||||
Statement failed, SQLSTATE = 23000
|
||||
validation error for column "TEST"."COL", value "*** null ***"
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -22,17 +22,17 @@ db_1 = db_factory(page_size=4096, sql_dialect=3, init=init_script_1)
|
||||
|
||||
test_script_1 = """
|
||||
set list on; select 'Extracted .fdb file has not supported ODS for using on Firebird 3.0' as msg from rdb$database;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """
|
||||
MSG Extracted .fdb file has not supported ODS for using on Firebird 3.0
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -46,5 +46,5 @@ expected_stdout_1 = """A B
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -70,5 +70,5 @@ I2 INTEGER Nullable
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -27,7 +27,7 @@ test_script_1 = """
|
||||
drop table tab;
|
||||
commit;
|
||||
show table tab;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -36,11 +36,11 @@ expected_stderr_1 = """
|
||||
unsuccessful metadata update
|
||||
-key size exceeds implementation restriction for index "IX"
|
||||
There is no table TAB in this database
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=2.5')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
|
||||
|
@ -44,6 +44,6 @@ def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -26,7 +26,7 @@ test_script_1 = """
|
||||
select rdb$procedure_blr
|
||||
from rdb$procedures
|
||||
where rdb$procedure_name = upper('sp1');
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -131,11 +131,11 @@ RDB$PROCEDURE_BLR 1a:f1
|
||||
blr_end,
|
||||
blr_end,
|
||||
blr_eoc
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -97,7 +97,7 @@ test_script_1 = """
|
||||
--drop role modifier;
|
||||
drop table test;
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -176,6 +176,6 @@ def test_1(act_1: Action, user_1_senior: User, user_1_junior: User, role_1: Role
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# id: bugs.core_0886
|
||||
# title: SPs in views
|
||||
# decription:
|
||||
# decription:
|
||||
# tracker_id: CORE-886
|
||||
# min_versions: ['2.5.0']
|
||||
# versions: 2.5.0
|
||||
@ -39,7 +39,7 @@ select *from a_view;
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
expected_stdout_1 = """Database: localhost:C:btest2 mpugs.core_0886.fdb, User: SYSDBA
|
||||
expected_stdout_1 = """Database: localhost:C:\\fbtest2\\tmp\\bugs.core_0886.fdb, User: SYSDBA
|
||||
SQL> CON> SQL> SQL> OUTPUT1 INTEGER Nullable
|
||||
View Source:
|
||||
==== ======
|
||||
@ -56,5 +56,5 @@ SQL> SQL>"""
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -40,5 +40,5 @@ SUBSTRING
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -137,6 +137,6 @@ def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -64,5 +64,5 @@ expected_stdout_1 = """
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
@ -25,7 +25,7 @@ init_script_1 = """
|
||||
commit;
|
||||
alter table crash add a5 computed by (a2*a3*a4);
|
||||
commit;
|
||||
"""
|
||||
"""
|
||||
|
||||
db_1 = db_factory(sql_dialect=3, init=init_script_1)
|
||||
|
||||
@ -58,7 +58,7 @@ test_script_1 = """
|
||||
update crash set a1=null, a2=null, a3=null,a4=null rows 1;
|
||||
commit;
|
||||
show table crash;
|
||||
"""
|
||||
"""
|
||||
|
||||
act_1 = isql_act('db_1', test_script_1, substitutions=substitutions_1)
|
||||
|
||||
@ -68,20 +68,20 @@ expected_stdout_1 = """
|
||||
A3 INTEGER Not Null
|
||||
A4 INTEGER Not Null
|
||||
A5 Computed by: (a2*a3*a4)
|
||||
"""
|
||||
"""
|
||||
expected_stderr_1 = """
|
||||
Statement failed, SQLSTATE = 22006
|
||||
unsuccessful metadata update
|
||||
-Cannot make field A5 of table CRASH NOT NULL because there are NULLs present
|
||||
Statement failed, SQLSTATE = 23000
|
||||
validation error for column "CRASH"."A1", value "*** null ***"
|
||||
"""
|
||||
"""
|
||||
|
||||
@pytest.mark.version('>=3.0')
|
||||
def test_1(act_1: Action):
|
||||
act_1.expected_stdout = expected_stdout_1
|
||||
act_1.expected_stderr = expected_stderr_1
|
||||
act_1.execute()
|
||||
assert act_1.clean_expected_stderr == act_1.clean_stderr
|
||||
assert act_1.clean_expected_stdout == act_1.clean_stdout
|
||||
assert act_1.clean_stderr == act_1.clean_expected_stderr
|
||||
assert act_1.clean_stdout == act_1.clean_expected_stdout
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user