Commit 9c79a1f8 authored by Dries's avatar Dries

- Patch #147761 by hswong3i: made dblog Oracle-friendly.

parent 4fd54aab
......@@ -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)) {
......
......@@ -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),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment