Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
08564574
Commit
08564574
authored
Nov 24, 2006
by
Dries
Browse files
- Patch
#99128
by robertDouglass and RobRoy: added an index to the watchdog tab.le.
parent
7782ea28
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/system/system.install
View file @
08564574
...
...
@@ -541,7 +541,8 @@ function system_install() {
referer varchar(128) NOT NULL default '',
hostname varchar(128) NOT NULL default '',
timestamp int NOT NULL default '0',
PRIMARY KEY (wid)
PRIMARY KEY (wid),
KEY (type)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ "
);
break
;
...
...
@@ -1007,6 +1008,7 @@ function system_install() {
timestamp int NOT NULL default '0',
PRIMARY KEY (wid)
)"
);
db_query
(
"CREATE INDEX
{
watchdog
}
_type_idx ON
{
watchdog
}
(type)"
);
break
;
}
...
...
@@ -3068,6 +3070,24 @@ function system_update_182() {
return
$ret
;
}
/**
* Add an index on watchdog type.
*/
function
system_update_183
()
{
$ret
=
array
();
switch
(
$GLOBALS
[
'db_type'
])
{
case
'mysql'
:
case
'mysqli'
:
$ret
[]
=
update_sql
(
'ALTER TABLE {watchdog} ADD INDEX (type)'
);
break
;
case
'pgsql'
:
$ret
[]
=
update_sql
(
'CREATE INDEX {watchdog}_type_idx ON {watchdog}(type)'
);
break
;
}
return
$ret
;
}
/**
* @defgroup updates-4.7-to-5.0 System updates from 4.7 to 5.0
* @{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment