⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readbtreecursorlocks.subsql

📁 derby database source code.good for you.
💻 SUBSQL
📖 第 1 页 / 共 2 页
字号:
close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;---------------------------------------------------------------------------------- TEST 5: btree cursor scan, group fetch = 2 (scan with committed deleted rows)-- Test full cursor scan on a data set with some deleted rows (the "even" ones).--    ALL MODES        - TABLE IS, "scan page lockname of form (pageno, 1) --    SERIALIZABLE     - row S locks as it visits each row, held until end xact--    REPEATABLE READ  - row S locks as it visits each row, held until end xact--    READ COMMITTED   - row S lock on current row, released on move to next row--    READ UNCOMMITTED - no row locks.---- At this point the base table should look like:-- 1, 10, 'one'-- 3, 30, 'three'-- 5, 50, 'five'-- 7, 70, 'seven'--------------------------------------------------------------------------------CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault','2');-- RESOLVE: missing row locks-- WORKAROUND: creating an index and dropping it -- to force the statement to be recompiledcreate index ix1 on a(a);drop index ix1;commit;get cursor scan_cursor as    'select a from a';call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;---------------------------------------------------------------------------------- TEST 6: btree cursor scan, group fetch = 1 (scan with "<" qualifier)-- Test "less than" qualified cursor scan on a data set.--    ALL MODES        - TABLE IS, "scan page lockname of form (pageno, 1) --    SERIALIZABLE     - row S locks as it visits each row, held until end xact--    REPEATABLE READ  - row S locks as it visits each row, held until end xact--    READ COMMITTED   - row S lock on current row, released on move to next row--    READ UNCOMMITTED - no row locks.---- At this point the base table should look like:-- 1, 10, 'one'-- 3, 30, 'three'-- 5, 50, 'five'-- 7, 70, 'seven'--------------------------------------------------------------------------------CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault','1');-- RESOLVE: missing row locks-- WORKAROUND: creating an index and dropping it -- to force the statement to be recompiledcreate index ix1 on a(a);drop index ix1;commit;get cursor scan_cursor as    'select a from a where a < 3';call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;---------------------------------------------------------------------------------- TEST 7: btree cursor scan, group fetch = 2 (scan with "<" qualifier)-- Test "less than" qualified cursor scan on a data set.--    ALL MODES        - TABLE IS, "scan page lockname of form (pageno, 1) --    SERIALIZABLE     - row S locks as it visits each row, held until end xact--    REPEATABLE READ  - row S locks as it visits each row, held until end xact--    READ COMMITTED   - row S lock on current row, released on move to next row--    READ UNCOMMITTED - no row locks.---- At this point the base table should look like:-- 1, 10, 'one'-- 3, 30, 'three'-- 5, 50, 'five'-- 7, 70, 'seven'--------------------------------------------------------------------------------CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault','2');-- RESOLVE: missing row locks-- WORKAROUND: creating an index and dropping it -- to force the statement to be recompiledcreate index ix1 on a(a);drop index ix1;commit;get cursor scan_cursor as    'select a from a where a < 3';call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;---------------------------------------------------------------------------------- TEST 8: btree cursor scan, group fetch = 1 (scan with equals qualifier)-- Test "equals" qualified cursor scan on a data set.--    ALL MODES        - TABLE IS, "scan page lockname of form (pageno, 1) --    SERIALIZABLE     - row S locks as it visits each row, held until end xact--    REPEATABLE READ  - row S locks as it visits each row, held until end xact--    READ COMMITTED   - row S lock on current row, released on move to next row--    READ UNCOMMITTED - no row locks.---- At this point the base table should look like:-- 1, 10, 'one'-- 3, 30, 'three'-- 5, 50, 'five'-- 7, 70, 'seven'--------------------------------------------------------------------------------CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault','1');-- RESOLVE: missing row locks-- WORKAROUND: creating an index and dropping it -- to force the statement to be recompiledcreate index ix1 on a(a);drop index ix1;commit;get cursor scan_cursor as    'select a from a where a = 5';call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;---------------------------------------------------------------------------------- TEST 9: btree cursor scan, group fetch = 2 (scan with equals qualifier)-- Test "equals" qualified cursor scan on a data set.--    ALL MODES        - TABLE IS, "scan page lockname of form (pageno, 1) --    SERIALIZABLE     - row S locks as it visits each row, held until end xact--    REPEATABLE READ  - row S locks as it visits each row, held until end xact--    READ COMMITTED   - row S lock on current row, released on move to next row--    READ UNCOMMITTED - no row locks.---- At this point the base table should look like:-- 1, 10, 'one'-- 3, 30, 'three'-- 5, 50, 'five'-- 7, 70, 'seven'--------------------------------------------------------------------------------CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault','2');-- RESOLVE: missing row locks-- WORKAROUND: creating an index and dropping it -- to force the statement to be recompiledcreate index ix1 on a(a);drop index ix1;commit;get cursor scan_cursor as    'select a from a where a = 5 or a = 7';call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;---------------------------------------------------------------------------------- TEST 10: btree cursor scan, group fetch = 1 (equals qualifier, no rows return)-- Test "equals" qualified cursor scan on a data set, no rows returned.--    ALL MODES        - TABLE IS, "scan page lockname of form (pageno, 1) --    SERIALIZABLE     - row S locks as it visits each row, held until end xact--    REPEATABLE READ  - row S locks as it visits each row, held until end xact--    READ COMMITTED   - row S lock on current row, released on move to next row--    READ UNCOMMITTED - no row locks.---- At this point the base table should look like:-- 1, 10, 'one'-- 3, 30, 'three'-- 5, 50, 'five'-- 7, 70, 'seven'---------------------------------------------------------------------------------- no rows expected to qualifyCALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault','1');-- RESOLVE: missing row locks-- WORKAROUND: creating an index and dropping it -- to force the statement to be recompiledcreate index ix1 on a(a);drop index ix1;commit;get cursor scan_cursor as    'select a from a where a = 42';call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.language.bulkFetchDefault', '16');select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;next scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;close scan_cursor;select * from lock_table order by tabname, type desc, mode, cnt, lockname;commit;drop table a;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -