-
-
Notifications
You must be signed in to change notification settings - Fork 45
SQLiteJournal 'Too many variables' bug test added [Ref #25] #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -21,7 +21,7 @@ class SQLiteJournalTest extends IJournalTestCase | |||
|
|||
public function createJournal() | |||
{ | |||
return new SQLiteJournal; | |||
return new SQLiteJournal(TEMP_DIR . '/sqlitejournal_' . uniqid() . '.sqlite'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For "in memory" SQLite storage there were problems :o
See https://travis-ci.org/nette/caching/builds/71373010
It looks like that test cases shared the same database but it was OK before my changes, I don't know why...
Now, it is OK: https://travis-ci.org/nette/caching/builds/71373257
@@ -108,25 +108,26 @@ public function clean(array $conditions) | |||
} | |||
|
|||
if (!empty($conditions[Cache::PRIORITY])) { | |||
$priority = (int) $conditions[Cache::PRIORITY]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this new variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'll remove it... It's trace after 239a9f6
Can you squash it to single commit? |
I've cleaned it up. Really should I squash these commits?
|
This is fine, thanks! |
tests: SQLiteJournal 'Too many variables' bug test added [Ref #25]
@@ -21,7 +21,8 @@ class SQLiteJournalTest extends IJournalTestCase | |||
|
|||
public function createJournal() | |||
{ | |||
return new SQLiteJournal; | |||
static $id = 0; | |||
return new SQLiteJournal(TEMP_DIR . '/sqlitejournal_' . ++$id . '.sqlite'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not possible share :memory: SQLite nor after these changes:
https://github.com/nette/caching/pull/27/files#diff-88c1903cdb7494caec03523cf64621b1R121
Nor if I replace BEGIN IMMEDIATE
with BEGIN EXCLUSIVE
.
Fixes #25 with test case for the bug.