stmtcache1.sql
来自「derby database source code.good for you.」· SQL 代码 · 共 53 行
SQL
53 行
---- testing a cache size of 1-- a little bit self-defeating since you can never remove-- the emptyCache statement from the cache and the-- statement to test what is in removes the previous one...--autocommit off;-- set up aliasesCREATE FUNCTION ConsistencyChecker() RETURNS VARCHAR(128)EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.T_ConsistencyChecker.runConsistencyChecker'LANGUAGE JAVA PARAMETER STYLE JAVA;CREATE PROCEDURE EC()EXTERNAL NAME 'org.apache.derby.diag.StatementCache.emptyCache'LANGUAGE JAVA PARAMETER STYLE JAVA;autocommit off;run resource 'stmtCacheAliases.subsql';commit;-- see that it starts out almost empty; well, just us...select count(*) from SC_CONTENTS;-- see if we can detect ourselves in the cache;-- again, because the size is one, this is the-- only statement we can look for...select SQL_TEXT from SC_CONTENTS;prepare p1 as 'values 1';select SQL_TEXT from SC_CONTENTS;-- kick 'em all out and then test the sizecall EC();select count(*) from SC_CONTENTS;execute p1;select SQL_TEXT from SC_CONTENTS;remove p1;call EC();select count(*) from SC_CONTENTS;-- expect everything to be okay-- is a dependency on EMPTYCACHEvalues ConsistencyChecker();commit;-- clean up aliasesrun resource 'stmtCacheAliasesRemove.subsql';commit;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?