Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
b1bdd4ac
Commit
b1bdd4ac
authored
Feb 20, 2006
by
Dries Buytaert
Browse files
- Patch
#41870
by fgm: improved debugging support.
parent
68820e23
Changes
4
Hide whitespace changes
Inline
Side-by-side
includes/database.mysql.inc
View file @
b1bdd4ac
...
...
@@ -101,6 +101,8 @@ function _db_query($query, $debug = 0) {
$result
=
mysql_query
(
$query
,
$active_db
);
if
(
variable_get
(
'dev_query'
,
0
))
{
$bt
=
debug_backtrace
();
$query
=
$bt
[
2
][
'function'
]
.
"
\n
"
.
$query
;
list
(
$usec
,
$sec
)
=
explode
(
' '
,
microtime
());
$stop
=
(
float
)
$usec
+
(
float
)
$sec
;
$diff
=
$stop
-
$timer
;
...
...
includes/database.mysqli.inc
View file @
b1bdd4ac
...
...
@@ -102,6 +102,8 @@ function _db_query($query, $debug = 0) {
$result
=
mysqli_query
(
$active_db
,
$query
);
if
(
variable_get
(
'dev_query'
,
0
))
{
$bt
=
debug_backtrace
();
$query
=
$bt
[
2
][
'function'
]
.
"
\n
"
.
$query
;
list
(
$usec
,
$sec
)
=
explode
(
' '
,
microtime
());
$stop
=
(
float
)
$usec
+
(
float
)
$sec
;
$diff
=
$stop
-
$timer
;
...
...
includes/database.pgsql.inc
View file @
b1bdd4ac
...
...
@@ -84,6 +84,8 @@ function _db_query($query, $debug = 0) {
$last_result
=
pg_query
(
$active_db
,
$query
);
if
(
variable_get
(
'dev_query'
,
0
))
{
$bt
=
debug_backtrace
();
$query
=
$bt
[
2
][
'function'
]
.
"
\n
"
.
$query
;
list
(
$usec
,
$sec
)
=
explode
(
' '
,
microtime
());
$stop
=
(
float
)
$usec
+
(
float
)
$sec
;
$diff
=
$stop
-
$timer
;
...
...
includes/session.inc
View file @
b1bdd4ac
...
...
@@ -53,8 +53,8 @@ function sess_write($key, $value) {
$result
=
db_query
(
"SELECT sid FROM
{
sessions
}
WHERE sid = '%s'"
,
$key
);
if
(
!
db_num_rows
(
$result
))
{
// Only save session data when when the browser sends a cookie. This keeps
// crawlers out of session table. This improves speed up queries, reduces
// Only save session data when when the browser sends a cookie. This keeps
// crawlers out of session table. This improves speed up queries, reduces
// memory, and gives more useful statistics. We can't eliminate anonymous
// session table rows without breaking throttle modulee and "Who's Online"
// block.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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