-- DBMS_AQADM.GET_MAX_STREAMS_POOL, SET_MAX_STREAMS_POOL,
|
-- GET_MIN_STREAMS_POOL, SET_MIN_STREAMS_POOL
|
-- Expected скопирован из oracle/dbms_aqadm_streams_pool.sql.
|
-- Вызов от суперпользователя: на стенде файл шёл от SYS.
|
-- Кейсы 5 и 7 на стенде — ORA-65040. В rudb PDB нет, запись проходит.
|
-- Кейсы 4 и 6 — ORA-22063.
|
|
DO $$
|
DECLARE
|
l_max number;
|
l_min number;
|
BEGIN
|
RAISE NOTICE 'Expected: max=0|min=0';
|
l_max := dbms_aqadm_get_max_streams_pool();
|
l_min := dbms_aqadm_get_min_streams_pool();
|
RAISE NOTICE 'Actual: max=%|min=%',
|
COALESCE(l_max::text, 'NULL'), COALESCE(l_min::text, 'NULL');
|
END $$;
|
|
DO $$
|
DECLARE
|
l_max number;
|
BEGIN
|
RAISE NOTICE 'Expected: v=0';
|
PERFORM dbms_aqadm_set_max_streams_pool(0);
|
l_max := dbms_aqadm_get_max_streams_pool();
|
RAISE NOTICE 'Actual: v=%', COALESCE(l_max::text, 'NULL');
|
END $$;
|
|
DO $$
|
DECLARE
|
l_max number;
|
BEGIN
|
RAISE NOTICE 'Expected: v=0';
|
PERFORM dbms_aqadm_set_max_streams_pool(NULL);
|
l_max := dbms_aqadm_get_max_streams_pool();
|
RAISE NOTICE 'Actual: v=%', COALESCE(l_max::text, 'NULL');
|
END $$;
|
|
DO $$
|
BEGIN
|
RAISE NOTICE 'Expected: Caught exception';
|
PERFORM dbms_aqadm_set_max_streams_pool(-1);
|
RAISE NOTICE 'Actual: set';
|
EXCEPTION
|
WHEN SQLSTATE '22003' THEN
|
RAISE NOTICE 'Actual: Caught exception';
|
END $$;
|
|
DO $$
|
BEGIN
|
RAISE NOTICE 'Expected: Caught exception';
|
PERFORM dbms_aqadm_set_min_streams_pool(0);
|
RAISE NOTICE 'Actual: set';
|
END $$;
|
|
DO $$
|
BEGIN
|
RAISE NOTICE 'Expected: Caught exception';
|
PERFORM dbms_aqadm_set_min_streams_pool(-1);
|
RAISE NOTICE 'Actual: set';
|
EXCEPTION
|
WHEN SQLSTATE '22003' THEN
|
RAISE NOTICE 'Actual: Caught exception';
|
END $$;
|
|
DO $$
|
BEGIN
|
RAISE NOTICE 'Expected: Caught exception';
|
PERFORM dbms_aqadm_set_min_streams_pool(NULL);
|
RAISE NOTICE 'Actual: set';
|
END $$;
|