From 9c79a1f8a054a737bfa07332da1007c928b81708 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 30 May 2007 08:34:12 +0000 Subject: - Patch #147761 by hswong3i: made dblog Oracle-friendly. --- modules/dblog/dblog.module | 2 +- modules/dblog/dblog.schema | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'modules') diff --git a/modules/dblog/dblog.module b/modules/dblog/dblog.module index 6bc52126e..f2a369709 100644 --- a/modules/dblog/dblog.module +++ b/modules/dblog/dblog.module @@ -196,7 +196,7 @@ function dblog_top($type) { array('data' => t('Message'), 'field' => 'message') ); - $result = pager_query("SELECT COUNT(wid) AS count, message, variables FROM {watchdog} WHERE type = '%s' GROUP BY message ". tablesort_sql($header), 30, 0, "SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'", $type); + $result = pager_query("SELECT COUNT(wid) AS count, message, variables FROM {watchdog} WHERE type = '%s' GROUP BY (message, variables) ". tablesort_sql($header), 30, 0, "SELECT COUNT(DISTINCT(message)) FROM {watchdog} WHERE type = '%s'", $type); $rows = array(); while ($dblog = db_fetch_object($result)) { diff --git a/modules/dblog/dblog.schema b/modules/dblog/dblog.schema index 785f1d98f..56cd84a42 100644 --- a/modules/dblog/dblog.schema +++ b/modules/dblog/dblog.schema @@ -7,8 +7,8 @@ function dblog_schema() { 'wid' => array('type' => 'serial', 'not null' => TRUE), 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, 'default' => ''), - 'message' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), - 'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'big'), + 'message' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), + 'variables' => array('type' => 'text', 'not null' => TRUE, 'size' => 'medium'), 'severity' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'size' => 'tiny'), 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''), 'location' => array('type' => 'text', 'not null' => TRUE), -- cgit v1.2.3