summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2008-04-03 10:36:54 +0000
committerthomascube <thomas@roundcube.net>2008-04-03 10:36:54 +0000
commit50e5eef2e35479f27253323f087beeec6d6ad169 (patch)
treea07b7115942a01af6aa99de738b302c6c51630fb
parentedc63c2e3845c1a7ec21898bb0636daddd124a27 (diff)
New test-query that does not violate any foreign key contraints
-rw-r--r--installer/test.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/installer/test.php b/installer/test.php
index 04259dd1c..5be343a31 100644
--- a/installer/test.php
+++ b/installer/test.php
@@ -120,12 +120,12 @@ if ($db_working) {
// more database tests
if ($db_working) {
// write test
- $db_write = $DB->query("INSERT INTO {$RCI->config['db_table_cache']} (session_id, cache_key, data, user_id) VALUES (?, ?, ?, 0)", '1234567890abcdef', 'test', 'test');
- $insert_id = $DB->insert_id($RCI->config['db_sequence_cache']);
-
- if ($db_write && $insert_id) {
+ $insert_id = md5(uniqid());
+ $db_write = $DB->query("INSERT INTO {$RCI->config['db_table_session']} (sess_id, created, ip, vars) VALUES (?, ".$DB->now().", '127.0.0.1', 'foo')", $insert_id);
+
+ if ($db_write) {
$RCI->pass('DB Write');
- $DB->query("DELETE FROM {$RCI->config['db_table_cache']} WHERE cache_id=?", $insert_id);
+ $DB->query("DELETE FROM {$RCI->config['db_table_session']} WHERE sess_id=?", $insert_id);
}
else {
$RCI->fail('DB Write', $RCI->get_error());