diff options
author | xue <> | 2006-08-27 23:26:55 +0000 |
---|---|---|
committer | xue <> | 2006-08-27 23:26:55 +0000 |
commit | c1937cccd0985e86e247287faa9ac60870feecd7 (patch) | |
tree | 95ec7083c7be815184c74cd8aa27d02a69d2ea77 /framework/Caching | |
parent | 887da1b3668499821f046665b461aeadb0a9fb2e (diff) |
Merge from 3.0 branch till 1350.
Diffstat (limited to 'framework/Caching')
-rw-r--r-- | framework/Caching/TSqliteCache.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/Caching/TSqliteCache.php b/framework/Caching/TSqliteCache.php index b94b39fe..acf42906 100644 --- a/framework/Caching/TSqliteCache.php +++ b/framework/Caching/TSqliteCache.php @@ -117,7 +117,7 @@ class TSqliteCache extends TCache $error='';
if(($this->_db=new SQLiteDatabase($this->_file,0666,$error))===false)
throw new TConfigurationException('sqlitecache_connection_failed',$error);
- if(($res=$this->_db->query('SELECT * FROM sqlite_master WHERE tbl_name=\''.self::CACHE_TABLE.'\' AND type=\'table\''))!=false)
+ if(($res=$this->_db->query('SELECT * FROM sqlite_master WHERE tbl_name=\''.self::CACHE_TABLE.'\' AND type=\'table\' LIMIT 1'))!=false)
{
if($res->numRows()===0)
{
@@ -161,7 +161,7 @@ class TSqliteCache extends TCache */
protected function getValue($key)
{
- $sql='SELECT value FROM '.self::CACHE_TABLE.' WHERE key=\''.$key.'\' AND (expire=0 OR expire>'.time().')';
+ $sql='SELECT value FROM '.self::CACHE_TABLE.' WHERE key=\''.$key.'\' AND (expire=0 OR expire>'.time().') LIMIT 1';
if(($ret=$this->_db->query($sql))!=false && ($row=$ret->fetch(SQLITE_ASSOC))!==false)
return $row['value'];
else
|