#91 mysql/sqlite의 getNextSequence()에 대해 10000개 단위로 삭제하도록하고 mysql에서 0이라는 값을 입력하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2364 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-08-21 08:35:02 +00:00
parent c35d05b4e3
commit 0c749854f4
4 changed files with 19 additions and 11 deletions

View file

@ -196,9 +196,11 @@
$this->_prepare($query);
$result = $this->_execute();
$sequence = $this->handler->lastInsertId();
$query = sprintf("delete from %ssequence where seq < %d", $this->prefix, $sequence);
$this->_prepare($query);
$result = $this->_execute();
if($seqnece % 10000 == 0) {
$query = sprintf("delete from %ssequence where seq < %d", $this->prefix, $sequence);
$this->_prepare($query);
$result = $this->_execute();
}
return $sequence;
}