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

📄 stmtcache1.sql

📁 derby database source code.good for you.
💻 SQL
字号:
---- 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -